@@ -106,49 +106,14 @@ def test_positive_userdata_image_provision_end_to_end(
106106 :steps:
107107 1. Create OCP compute resource
108108 2. Create image for the compute resource
109- 3. Create userdata provisioning template and associate with OS
110- 4. Create hostgroup
111- 5. Provision a host using image-based provisioning
112- 6. Check if the host status is installed.
109+ 3. Create hostgroup
110+ 4. Provision a host using userdata image-based provisioning
111+ 5. Check if the host status is installed.
113112
114113 :expectedresults: Host is provisioned successfully on OpenShift Virtualization
115114 """
116115 name = gen_string ('alpha' ).lower ()
117116 sat = module_ocpv_sat
118- os = module_ocpv_image .os
119-
120- USERDATA_TEMPLATE = """\
121- #cloud-config
122- <%# Contact Foreman to confirm instance is built -%>
123- phone_home:
124- url: <%= foreman_url('built') %>
125- post: []
126- tries: 10
127- """
128-
129- # Get the user_data template kind
130- template_kind = sat .api .TemplateKind ().search (query = {'search' : 'name=user_data' })[0 ]
131-
132- # Create custom userdata provisioning template to check host status.
133- userdata_template = sat .api .ProvisioningTemplate (
134- name = gen_string ('alpha' ),
135- organization = [module_org ],
136- location = [module_location ],
137- snippet = False ,
138- template_kind = template_kind ,
139- operatingsystem = [os ],
140- template = USERDATA_TEMPLATE ,
141- ).create ()
142-
143- # assign the userdata template to the os
144- os .provisioning_template .append (userdata_template )
145- os .update (['provisioning_template' ])
146-
147- sat .api .OSDefaultTemplate (
148- operatingsystem = os ,
149- provisioning_template = userdata_template ,
150- template_kind = template_kind ,
151- ).create ()
152117
153118 host = sat .api .Host (
154119 hostgroup = module_ocpv_hostgroup ,
0 commit comments