Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kypo-python-commons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MUNI-KYPO-CRP
backend-python
kypo-python-commons
Commits
afdeb915
Commit
afdeb915
authored
3 years ago
by
Juraj Paluba
Browse files
Options
Downloads
Patches
Plain Diff
update imports and types of attributes
parent
6d1a56d3
No related branches found
No related tags found
No related merge requests found
Pipeline
#137608
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kypo/cloud_commons/__init__.py
+6
-8
6 additions, 8 deletions
kypo/cloud_commons/__init__.py
kypo/cloud_commons/cloud_client_base.py
+7
-7
7 additions, 7 deletions
kypo/cloud_commons/cloud_client_base.py
with
13 additions
and
15 deletions
kypo/cloud_commons/__init__.py
+
6
−
8
View file @
afdeb915
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
This diff is collapsed.
Click to expand it.
kypo/cloud_commons/cloud_client_base.py
+
7
−
7
View file @
afdeb915
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 i
nstance used to create template
:param topology_
instance: TopologyI
nstance 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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment