Skip to content
Snippets Groups Projects
Commit afdeb915 authored by Juraj Paluba's avatar Juraj Paluba
Browse files

update imports and types of attributes

parent 6d1a56d3
No related branches found
No related tags found
No related merge requests found
Pipeline #137608 passed
from kypo.cloud_commons.cloud_client_base import KypoCloudClientBase from .cloud_client_base import KypoCloudClientBase
from kypo.cloud_commons.topology_instance import TopologyInstance from .cloud_client_elements import Image, Limits, QuotaSet, Quota, HardwareUsage
from kypo.cloud_commons.transformation_configuration import TransformationConfiguration from .exceptions import KypoException, StackException, StackCreationFailed, \
from kypo.cloud_commons.exceptions import KypoException, StackException, StackCreationFailed,\
InvalidTopologyDefinition
from kypo.cloud_commons.topology_elements import MAN, SecurityGroups, Link, NodeToNodeLinkPair
from kypo.cloud_commons.exceptions import KypoException, StackException, StackCreationFailed,\
InvalidTopologyDefinition, StackNotFound InvalidTopologyDefinition, StackNotFound
from kypo.cloud_commons.cloud_client_elements import Image, Limits, QuotaSet, HardwareUsage from .topology_elements import MAN, SecurityGroups, Link, NodeToNodeLinkPair
from .topology_instance import TopologyInstance, MAN_NAME, MAN_NET_NAME
from .transformation_configuration import TransformationConfiguration
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import List from typing import List
from kypo.topology_definition.models import TopologyDefinition
from kypo.cloud_commons.cloud_client_elements import Image, QuotaSet, HardwareUsage, Limits from kypo.cloud_commons.cloud_client_elements import Image, QuotaSet, HardwareUsage, Limits
from kypo.cloud_commons.topology_instance import TopologyInstance
class KypoCloudClientBase(ABC): class KypoCloudClientBase(ABC):
...@@ -10,12 +10,12 @@ class KypoCloudClientBase(ABC): ...@@ -10,12 +10,12 @@ class KypoCloudClientBase(ABC):
Base class for KYPO cloud clients. Base class for KYPO cloud clients.
""" """
@abstractmethod @abstractmethod
def create_terraform_template(self, topology_definition: TopologyDefinition, *args, **kwargs)\ def create_terraform_template(self, topology_instance: TopologyInstance, *args, **kwargs)\
-> str: -> str:
""" """
Create terraform template that will be deployed. Create terraform template that will be deployed.
:param topology_definition: TopologyDefinition instance used to create template :param topology_instance: TopologyInstance used to create template
:keyword key_pair_name_ssh: The name of SSH key pair in the cloud :keyword key_pair_name_ssh: The name of SSH key pair in the cloud
:keyword key_pair_name_cert: The name of certificate key pair in the cloud :keyword key_pair_name_cert: The name of certificate key pair in the cloud
:keyword resource_prefix: The prefix of all resources :keyword resource_prefix: The prefix of all resources
...@@ -35,7 +35,7 @@ class KypoCloudClientBase(ABC): ...@@ -35,7 +35,7 @@ class KypoCloudClientBase(ABC):
pass pass
@abstractmethod @abstractmethod
def get_image(self, image_id: int) -> Image: def get_image(self, image_id: str) -> Image:
""" """
Get Image object based on its ID. Get Image object based on its ID.
...@@ -45,7 +45,7 @@ class KypoCloudClientBase(ABC): ...@@ -45,7 +45,7 @@ class KypoCloudClientBase(ABC):
pass pass
@abstractmethod @abstractmethod
def resume_node(self, node_id: int) -> None: def resume_node(self, node_id: str) -> None:
""" """
Resume node. Resume node.
...@@ -56,7 +56,7 @@ class KypoCloudClientBase(ABC): ...@@ -56,7 +56,7 @@ class KypoCloudClientBase(ABC):
pass pass
@abstractmethod @abstractmethod
def start_node(self, node_id: int) -> None: def start_node(self, node_id: str) -> None:
""" """
Start node. Start node.
...@@ -67,7 +67,7 @@ class KypoCloudClientBase(ABC): ...@@ -67,7 +67,7 @@ class KypoCloudClientBase(ABC):
pass pass
@abstractmethod @abstractmethod
def reboot_node(self, node_id: int) -> None: def reboot_node(self, node_id: str) -> None:
""" """
Reboot node. Reboot node.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment