summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_instance.py
diff options
context:
space:
mode:
Diffstat (limited to 'snaps/openstack/create_instance.py')
-rw-r--r--snaps/openstack/create_instance.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py
index d7300e6..0105ef0 100644
--- a/snaps/openstack/create_instance.py
+++ b/snaps/openstack/create_instance.py
@@ -23,6 +23,7 @@ from snaps.openstack.openstack_creator import OpenStackComputeObject
from snaps.openstack.utils import glance_utils, cinder_utils, settings_utils
from snaps.openstack.utils import neutron_utils
from snaps.openstack.utils import nova_utils
+from snaps.openstack.utils.nova_utils import RebootType
from snaps.provisioning import ansible_utils
__author__ = 'spisarski'
@@ -787,6 +788,17 @@ class OpenStackVmInstance(OpenStackComputeObject):
logger.warning('Security group not removed - ' + str(e))
return False
+ def reboot(self, reboot_type=RebootType.soft):
+ """
+ Issues a reboot call
+ :param reboot_type: instance of
+ snaps.openstack.utils.nova_utils.RebootType
+ enumeration
+ :return:
+ """
+ nova_utils.reboot_server(
+ self._nova, self.__vm, reboot_type=reboot_type)
+
def generate_creator(os_creds, vm_inst, image_config, keypair_config=None):
"""