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
Branches
Tags v0.1.1
No related merge requests found
Pipeline #137608 passed
from kypo.cloud_commons.cloud_client_base import KypoCloudClientBase
from kypo.cloud_commons.topology_instance import TopologyInstance
from kypo.cloud_commons.transformation_configuration import TransformationConfiguration
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,\
from .cloud_client_base import KypoCloudClientBase
from .cloud_client_elements import Image, Limits, QuotaSet, Quota, HardwareUsage
from .exceptions import KypoException, StackException, StackCreationFailed, \
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 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.topology_instance import TopologyInstance
class KypoCloudClientBase(ABC):
......@@ -10,12 +10,12 @@ class KypoCloudClientBase(ABC):
Base class for KYPO cloud clients.
"""
@abstractmethod
def create_terraform_template(self, topology_definition: TopologyDefinition, *args, **kwargs)\
def create_terraform_template(self, topology_instance: TopologyInstance, *args, **kwargs)\
-> str:
"""
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_cert: The name of certificate key pair in the cloud
:keyword resource_prefix: The prefix of all resources
......@@ -35,7 +35,7 @@ class KypoCloudClientBase(ABC):
pass
@abstractmethod
def get_image(self, image_id: int) -> Image:
def get_image(self, image_id: str) -> Image:
"""
Get Image object based on its ID.
......@@ -45,7 +45,7 @@ class KypoCloudClientBase(ABC):
pass
@abstractmethod
def resume_node(self, node_id: int) -> None:
def resume_node(self, node_id: str) -> None:
"""
Resume node.
......@@ -56,7 +56,7 @@ class KypoCloudClientBase(ABC):
pass
@abstractmethod
def start_node(self, node_id: int) -> None:
def start_node(self, node_id: str) -> None:
"""
Start node.
......@@ -67,7 +67,7 @@ class KypoCloudClientBase(ABC):
pass
@abstractmethod
def reboot_node(self, node_id: int) -> None:
def reboot_node(self, node_id: str) -> None:
"""
Reboot node.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment