def get_system_config(self): if self.is_vm_image(): return None sc = self.virtual_environment[AZURE_UNIT.SYSTEM_CONFIG] # check whether virtual machine is Windows or Linux if sc[AZURE_UNIT.SYSTEM_CONFIG_OS_FAMILY] == AZURE_UNIT.WINDOWS: system_config = WindowsConfigurationSet(computer_name=sc[AZURE_UNIT.SYSTEM_CONFIG_HOST_NAME], admin_password=sc[AZURE_UNIT.SYSTEM_CONFIG_USER_PASSWORD], admin_username=sc[AZURE_UNIT.SYSTEM_CONFIG_USER_NAME]) system_config.domain_join = None system_config.win_rm = None else: system_config = LinuxConfigurationSet(host_name=sc[AZURE_UNIT.SYSTEM_CONFIG_HOST_NAME], user_name=sc[AZURE_UNIT.SYSTEM_CONFIG_USER_NAME], user_password=sc[AZURE_UNIT.SYSTEM_CONFIG_USER_PASSWORD], disable_ssh_password_authentication=False) return system_config
def get_system_config(self): if self.is_vm_image(): return None sc = self.virtual_environment[AZURE_UNIT.SYSTEM_CONFIG] # check whether virtual machine is Windows or Linux if sc[AZURE_UNIT.SYSTEM_CONFIG_OS_FAMILY] == AZURE_UNIT.WINDOWS: system_config = WindowsConfigurationSet( computer_name=sc[AZURE_UNIT.SYSTEM_CONFIG_HOST_NAME], admin_password=sc[AZURE_UNIT.SYSTEM_CONFIG_USER_PASSWORD], admin_username=sc[AZURE_UNIT.SYSTEM_CONFIG_USER_NAME]) system_config.domain_join = None system_config.win_rm = None else: system_config = LinuxConfigurationSet( host_name=sc[AZURE_UNIT.SYSTEM_CONFIG_HOST_NAME], user_name=sc[AZURE_UNIT.SYSTEM_CONFIG_USER_NAME], user_password=sc[AZURE_UNIT.SYSTEM_CONFIG_USER_PASSWORD], disable_ssh_password_authentication=False) return system_config
def get_system_config(self): """ Return None if image type is vm :return: """ if self.is_vm_image(): return None sc = self.virtual_environment[self.T_SC] # check whether virtual machine is Windows or Linux if sc[self.T_SC_OF] == self.WINDOWS: system_config = WindowsConfigurationSet(computer_name=sc[self.T_SC_HN], admin_password=sc[self.T_SC_UP], admin_username=sc[self.T_SC_UN]) system_config.domain_join = None system_config.win_rm = None else: system_config = LinuxConfigurationSet(host_name=sc[self.T_SC_HN], user_name=sc[self.T_SC_UN], user_password=sc[self.T_SC_UP], disable_ssh_password_authentication=False) return system_config
def get_system_config(self): """ Return None if image type is vm :return: """ if self.is_vm_image(): return None sc = self.virtual_environment[self.T_SC] # check whether virtual machine is Windows or Linux if sc[self.T_SC_OF] == self.WINDOWS: system_config = WindowsConfigurationSet( computer_name=sc[self.T_SC_HN], admin_password=sc[self.T_SC_UP], admin_username=sc[self.T_SC_UN]) system_config.domain_join = None system_config.win_rm = None else: system_config = LinuxConfigurationSet( host_name=sc[self.T_SC_HN], user_name=sc[self.T_SC_UN], user_password=sc[self.T_SC_UP], disable_ssh_password_authentication=False) return system_config