标签:
cloud-init for windows
plugin_name = plugin.get_name() status = self._get_plugin_status(osutils, instance_id, plugin_name) LOG.info(‘Executing plugin \‘%s\‘‘, plugin_name) try: (status, reboot_required) = plugin.execute(service, shared_data) self._set_plugin_status(osutils, instance_id, plugin_name, status) return reboot_required except Exception, ex: LOG.error(‘plugin \‘%(plugin_name)s\‘ failed with error ‘ ‘\‘%(ex)s\‘‘, {‘plugin_name‘: plugin_name, ‘ex‘: ex}) LOG.exception(ex)
import os def test() : fl = open(‘c:\hujin.log‘,‘wb‘) fl.write(‘hello,world‘) fl.close() if main == ‘name‘: test()
‘cloudbaseinit.metadata.services.httpservice.HttpService‘, ‘cloudbaseinit.metadata.services.configdrive.ConfigDriveService‘, ‘cloudbaseinit.metadata.services.ec2service.EC2Service‘, ‘cloudbaseinit.metadata.services.maasservice.MaaSHttpService‘
‘cloudbaseinit.plugins.windows.mtu.MTUPlugin‘, ‘cloudbaseinit.plugins.windows.ntpclient.NTPClientPlugin‘, ‘cloudbaseinit.plugins.windows.sethostname.SetHostNamePlugin‘, ‘cloudbaseinit.plugins.windows.createuser.CreateUserPlugin‘, ‘cloudbaseinit.plugins.windows.networkconfig.NetworkConfigPlugin‘, ‘cloudbaseinit.plugins.windows.licensing.WindowsLicensingPlugin‘, ‘cloudbaseinit.plugins.windows.sshpublickeys.‘ ‘SetUserSSHPublicKeysPlugin‘, ‘cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin‘, ‘cloudbaseinit.plugins.windows.userdata.UserDataPlugin‘, ‘cloudbaseinit.plugins.windows.setuserpassword.‘ ‘SetUserPasswordPlugin‘, ‘cloudbaseinit.plugins.windows.winrmlistener.‘ ‘ConfigWinRMListenerPlugin‘, ‘cloudbaseinit.plugins.windows.winrmcertificateauth.‘ ‘ConfigWinRMCertificateAuthPlugin‘, ‘cloudbaseinit.plugins.windows.localscripts.LocalScriptsPlugin‘,
标签:
原文地址:http://www.cnblogs.com/smallcoderhujin/p/4238609.html