Reformat files according to new black validation
[osm/RO.git] / RO-VIM-gcp / osm_rovim_gcp / vimconn_gcp.py
index 35ccd87..04e459d 100644 (file)
@@ -40,7 +40,6 @@ if getenv("OSMRO_PDB_DEBUG"):
 
 
 class vimconnector(vimconn.VimConnector):
-
     # Translate Google Cloud provisioning state to OSM provision state
     # The first three ones are the transitional status once a user initiated action has been requested
     # Once the operation is complete, it will transition into the states Succeeded or Failed
@@ -306,7 +305,6 @@ class vimconnector(vimconn.VimConnector):
         self.logger.debug("create network name %s, ip_profile %s", net_name, ip_profile)
 
         try:
-
             self.logger.debug("creating network_name: {}".format(net_name))
 
             network = "projects/{}/global/networks/default".format(self.project)
@@ -375,7 +373,6 @@ class vimconnector(vimconn.VimConnector):
         )
 
         try:
-
             self.logger.debug("creating subnet_name: {}".format(subnet_name))
 
             subnetwork_body = {
@@ -424,7 +421,6 @@ class vimconnector(vimconn.VimConnector):
         )
 
         try:
-
             if self.reload_client:
                 self._reload_connection()
 
@@ -504,7 +500,6 @@ class vimconnector(vimconn.VimConnector):
         self.logger.debug("Deleting network: {}".format(str(net_id)))
 
         try:
-
             net_name = self._get_resource_name_from_resource_id(net_id)
 
             # Check associated VMs
@@ -1118,7 +1113,7 @@ class vimconnector(vimconn.VimConnector):
         self.logger.debug("get_vminstance Return: response %s", response)
         return response
 
-    def delete_vminstance(self, vm_id, created_items=None):
+    def delete_vminstance(self, vm_id, created_items=None, volumes_to_hold=None):
         """Deletes a vm instance from the vim."""
         self.logger.debug(
             "delete_vminstance begin: vm_id %s created_items %s",
@@ -1485,3 +1480,23 @@ class vimconnector(vimconn.VimConnector):
                 )
             )
             self._format_vimconn_exception(e)
+
+    def migrate_instance(self, vm_id, compute_host=None):
+        """
+        Migrate a vdu
+        param:
+            vm_id: ID of an instance
+            compute_host: Host to migrate the vdu to
+        """
+        # TODO: Add support for migration
+        raise vimconn.VimConnNotImplemented("Not implemented")
+
+    def resize_instance(self, vm_id, flavor_id=None):
+        """
+        resize a vdu
+        param:
+            vm_id: ID of an instance
+            flavor_id: flavor_id to resize the vdu to
+        """
+        # TODO: Add support for resize
+        raise vimconn.VimConnNotImplemented("Not implemented")