Changes for bypassing metadata/cloud init and use config drive
Change-Id: I5d04d7c7613b372d54b0ea16e388e08ec6de3978
This commit is contained in:
parent
4f3b5b0774
commit
5282156bc3
@ -64,6 +64,10 @@ floating_ip: True
|
|||||||
# and reuse existing VM
|
# and reuse existing VM
|
||||||
reuse_existing_vm :
|
reuse_existing_vm :
|
||||||
|
|
||||||
|
# Set config drive to true to bypass metadata service and use config drive
|
||||||
|
# An option of config_drive to True is provided to nova boot to enable this
|
||||||
|
config_drive:
|
||||||
|
|
||||||
# Default name for the router to use to connect the internal mgmt network
|
# Default name for the router to use to connect the internal mgmt network
|
||||||
# with the external network. If a router exists with this name it will be
|
# with the external network. If a router exists with this name it will be
|
||||||
# reused, otherwise a new router will be created
|
# reused, otherwise a new router will be created
|
||||||
|
@ -145,6 +145,7 @@ class Compute(object):
|
|||||||
# if exists delete and recreate
|
# if exists delete and recreate
|
||||||
def create_server(self, vmname, image, flavor, key_name,
|
def create_server(self, vmname, image, flavor, key_name,
|
||||||
nic, sec_group, avail_zone=None, user_data=None,
|
nic, sec_group, avail_zone=None, user_data=None,
|
||||||
|
config_drive=None,
|
||||||
retry_count=10):
|
retry_count=10):
|
||||||
|
|
||||||
# Also attach the created security group for the test
|
# Also attach the created security group for the test
|
||||||
@ -155,6 +156,7 @@ class Compute(object):
|
|||||||
nics=nic,
|
nics=nic,
|
||||||
availability_zone=avail_zone,
|
availability_zone=avail_zone,
|
||||||
userdata=user_data,
|
userdata=user_data,
|
||||||
|
config_drive=config_drive,
|
||||||
security_groups=[sec_group.id])
|
security_groups=[sec_group.id])
|
||||||
flag_exist = self.find_server(vmname, retry_count)
|
flag_exist = self.find_server(vmname, retry_count)
|
||||||
if flag_exist:
|
if flag_exist:
|
||||||
|
@ -95,6 +95,7 @@ class Instance(object):
|
|||||||
sec_group,
|
sec_group,
|
||||||
az,
|
az,
|
||||||
user_data,
|
user_data,
|
||||||
|
self.config_drive,
|
||||||
self.config.generic_retry_count)
|
self.config.generic_retry_count)
|
||||||
if user_data:
|
if user_data:
|
||||||
user_data.close()
|
user_data.close()
|
||||||
|
@ -30,6 +30,11 @@ class PerfInstance(Instance):
|
|||||||
self.tp_tool = config.tp_tool(self, config.perf_tool_path)
|
self.tp_tool = config.tp_tool(self, config.perf_tool_path)
|
||||||
else:
|
else:
|
||||||
self.tp_tool = None
|
self.tp_tool = None
|
||||||
|
# Override the config drive option to save in instance
|
||||||
|
if config.config_drive:
|
||||||
|
self.config_drive = True
|
||||||
|
else:
|
||||||
|
self.config_drive = None
|
||||||
|
|
||||||
# No args is reserved for native host server
|
# No args is reserved for native host server
|
||||||
def create(self, image=None, flavor_type=None,
|
def create(self, image=None, flavor_type=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user