Beispiel #1
0
 def class_byos_ft_host(
     self,
     azurermclient,
     module_azurerm_byos_finishimg,
     module_azurerm_cr,
     default_architecture,
     module_domain,
     module_location,
     module_org,
     default_os,
     default_smart_proxy,
     module_puppet_environment,
 ):
     """
     Provisions the host on AzureRM with BYOS Image
     Later in tests this host will be used to perform assertions
     """
     set_hammer_api_timeout()
     skip_yum_update_during_provisioning(
         template='Kickstart default finish')
     host = Host.create(
         {
             'name': self.hostname,
             'compute-resource': module_azurerm_cr.name,
             'compute-attributes': self.compute_attrs,
             'interface': self.interfaces_attributes,
             'location-id': module_location.id,
             'organization-id': module_org.id,
             'domain-id': module_domain.id,
             'architecture-id': default_architecture.id,
             'operatingsystem-id': default_os.id,
             'root-password': gen_string('alpha'),
             'image': module_azurerm_byos_finishimg.name,
             'volume': "disk_size_gb=5",
         },
         timeout=1800,
     )
     yield host
     skip_yum_update_during_provisioning(
         template='Kickstart default finish', reverse=True)
     Host.delete({'name': self.fullhostname}, timeout=1800)
     set_hammer_api_timeout(reverse=True)
Beispiel #2
0
 def class_host_ud(
     self,
     azurermclient,
     module_azurerm_cloudimg,
     module_azurerm_cr,
     default_architecture,
     module_domain,
     module_location,
     module_org,
     default_os,
     default_smart_proxy,
     module_puppet_environment,
     azurerm_hostgroup,
 ):
     """
     Provisions the host on AzureRM using UserData template
     Later in tests this host will be used to perform assertions
     """
     set_hammer_api_timeout()
     skip_yum_update_during_provisioning(
         template='Kickstart default user data')
     host = Host.create(
         {
             'name': self.hostname,
             'compute-attributes': self.compute_attrs,
             'interface': self.interfaces_attributes,
             'image': module_azurerm_cloudimg.name,
             'hostgroup': azurerm_hostgroup.name,
             'location': module_location.name,
             'organization': module_org.name,
             'operatingsystem-id': default_os.id,
         },
         timeout=1800,
     )
     yield host
     skip_yum_update_during_provisioning(
         template='Kickstart default user data', reverse=True)
     Host.delete({'name': self.fullhostname}, timeout=1800)
     set_hammer_api_timeout(reverse=True)