lightning-sdk 0.2.5__py3-none-any.whl → 0.2.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/cli/serve.py +29 -9
- lightning_sdk/lightning_cloud/openapi/__init__.py +8 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +9 -9
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +15 -3
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +8 -0
- lightning_sdk/lightning_cloud/openapi/models/environmenttemplates_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cluster.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/server_id_alerts_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +131 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_server_alert_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +55 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +1 -29
- lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_registry_repository_image_artifact_versions_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_metadata.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_reservation_details.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_severity.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_subnet_spec.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +79 -79
- lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py +29 -29
- lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py +1 -27
- lightning_sdk/lightning_cloud/rest_client.py +44 -42
- lightning_sdk/serve.py +5 -3
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/RECORD +40 -32
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.5.dist-info → lightning_sdk-0.2.6.dist-info}/top_level.txt +0 -0
|
@@ -42,6 +42,7 @@ class ProjectIdCloudspacesBody(object):
|
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'can_download_source_code': 'bool',
|
|
45
|
+
'cloud_space_environment_template_id': 'str',
|
|
45
46
|
'cloud_space_instance_cpu_image_override': 'str',
|
|
46
47
|
'cloud_space_instance_gpu_image_override': 'str',
|
|
47
48
|
'cluster_id': 'str',
|
|
@@ -59,6 +60,7 @@ class ProjectIdCloudspacesBody(object):
|
|
|
59
60
|
|
|
60
61
|
attribute_map = {
|
|
61
62
|
'can_download_source_code': 'canDownloadSourceCode',
|
|
63
|
+
'cloud_space_environment_template_id': 'cloudSpaceEnvironmentTemplateId',
|
|
62
64
|
'cloud_space_instance_cpu_image_override': 'cloudSpaceInstanceCpuImageOverride',
|
|
63
65
|
'cloud_space_instance_gpu_image_override': 'cloudSpaceInstanceGpuImageOverride',
|
|
64
66
|
'cluster_id': 'clusterId',
|
|
@@ -74,9 +76,10 @@ class ProjectIdCloudspacesBody(object):
|
|
|
74
76
|
'spot': 'spot'
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
def __init__(self, can_download_source_code: 'bool' =None, cloud_space_instance_cpu_image_override: 'str' =None, cloud_space_instance_gpu_image_override: 'str' =None, cluster_id: 'str' =None, compute_name: 'str' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, disk_size: 'str' =None, display_name: 'str' =None, name: 'str' =None, plugins: 'list[str]' =None, requested_run_duration_seconds: 'str' =None, same_compute_on_resume: 'bool' =None, seed_files: 'list[V1CloudSpaceSeedFile]' =None, spot: 'bool' =None): # noqa: E501
|
|
79
|
+
def __init__(self, can_download_source_code: 'bool' =None, cloud_space_environment_template_id: 'str' =None, cloud_space_instance_cpu_image_override: 'str' =None, cloud_space_instance_gpu_image_override: 'str' =None, cluster_id: 'str' =None, compute_name: 'str' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, disk_size: 'str' =None, display_name: 'str' =None, name: 'str' =None, plugins: 'list[str]' =None, requested_run_duration_seconds: 'str' =None, same_compute_on_resume: 'bool' =None, seed_files: 'list[V1CloudSpaceSeedFile]' =None, spot: 'bool' =None): # noqa: E501
|
|
78
80
|
"""ProjectIdCloudspacesBody - a model defined in Swagger""" # noqa: E501
|
|
79
81
|
self._can_download_source_code = None
|
|
82
|
+
self._cloud_space_environment_template_id = None
|
|
80
83
|
self._cloud_space_instance_cpu_image_override = None
|
|
81
84
|
self._cloud_space_instance_gpu_image_override = None
|
|
82
85
|
self._cluster_id = None
|
|
@@ -93,6 +96,8 @@ class ProjectIdCloudspacesBody(object):
|
|
|
93
96
|
self.discriminator = None
|
|
94
97
|
if can_download_source_code is not None:
|
|
95
98
|
self.can_download_source_code = can_download_source_code
|
|
99
|
+
if cloud_space_environment_template_id is not None:
|
|
100
|
+
self.cloud_space_environment_template_id = cloud_space_environment_template_id
|
|
96
101
|
if cloud_space_instance_cpu_image_override is not None:
|
|
97
102
|
self.cloud_space_instance_cpu_image_override = cloud_space_instance_cpu_image_override
|
|
98
103
|
if cloud_space_instance_gpu_image_override is not None:
|
|
@@ -141,6 +146,27 @@ class ProjectIdCloudspacesBody(object):
|
|
|
141
146
|
|
|
142
147
|
self._can_download_source_code = can_download_source_code
|
|
143
148
|
|
|
149
|
+
@property
|
|
150
|
+
def cloud_space_environment_template_id(self) -> 'str':
|
|
151
|
+
"""Gets the cloud_space_environment_template_id of this ProjectIdCloudspacesBody. # noqa: E501
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
:return: The cloud_space_environment_template_id of this ProjectIdCloudspacesBody. # noqa: E501
|
|
155
|
+
:rtype: str
|
|
156
|
+
"""
|
|
157
|
+
return self._cloud_space_environment_template_id
|
|
158
|
+
|
|
159
|
+
@cloud_space_environment_template_id.setter
|
|
160
|
+
def cloud_space_environment_template_id(self, cloud_space_environment_template_id: 'str'):
|
|
161
|
+
"""Sets the cloud_space_environment_template_id of this ProjectIdCloudspacesBody.
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
:param cloud_space_environment_template_id: The cloud_space_environment_template_id of this ProjectIdCloudspacesBody. # noqa: E501
|
|
165
|
+
:type: str
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
self._cloud_space_environment_template_id = cloud_space_environment_template_id
|
|
169
|
+
|
|
144
170
|
@property
|
|
145
171
|
def cloud_space_instance_cpu_image_override(self) -> 'str':
|
|
146
172
|
"""Gets the cloud_space_instance_cpu_image_override of this ProjectIdCloudspacesBody. # noqa: E501
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class ServerIdAlertsBody(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
'message': 'str',
|
|
45
|
+
'severity': 'V1ServerAlertSeverity',
|
|
46
|
+
'type': 'V1ServerAlertType'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
attribute_map = {
|
|
50
|
+
'message': 'message',
|
|
51
|
+
'severity': 'severity',
|
|
52
|
+
'type': 'type'
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
def __init__(self, message: 'str' =None, severity: 'V1ServerAlertSeverity' =None, type: 'V1ServerAlertType' =None): # noqa: E501
|
|
56
|
+
"""ServerIdAlertsBody - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self._message = None
|
|
58
|
+
self._severity = None
|
|
59
|
+
self._type = None
|
|
60
|
+
self.discriminator = None
|
|
61
|
+
if message is not None:
|
|
62
|
+
self.message = message
|
|
63
|
+
if severity is not None:
|
|
64
|
+
self.severity = severity
|
|
65
|
+
if type is not None:
|
|
66
|
+
self.type = type
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def message(self) -> 'str':
|
|
70
|
+
"""Gets the message of this ServerIdAlertsBody. # noqa: E501
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:return: The message of this ServerIdAlertsBody. # noqa: E501
|
|
74
|
+
:rtype: str
|
|
75
|
+
"""
|
|
76
|
+
return self._message
|
|
77
|
+
|
|
78
|
+
@message.setter
|
|
79
|
+
def message(self, message: 'str'):
|
|
80
|
+
"""Sets the message of this ServerIdAlertsBody.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:param message: The message of this ServerIdAlertsBody. # noqa: E501
|
|
84
|
+
:type: str
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
self._message = message
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def severity(self) -> 'V1ServerAlertSeverity':
|
|
91
|
+
"""Gets the severity of this ServerIdAlertsBody. # noqa: E501
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
:return: The severity of this ServerIdAlertsBody. # noqa: E501
|
|
95
|
+
:rtype: V1ServerAlertSeverity
|
|
96
|
+
"""
|
|
97
|
+
return self._severity
|
|
98
|
+
|
|
99
|
+
@severity.setter
|
|
100
|
+
def severity(self, severity: 'V1ServerAlertSeverity'):
|
|
101
|
+
"""Sets the severity of this ServerIdAlertsBody.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:param severity: The severity of this ServerIdAlertsBody. # noqa: E501
|
|
105
|
+
:type: V1ServerAlertSeverity
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
self._severity = severity
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def type(self) -> 'V1ServerAlertType':
|
|
112
|
+
"""Gets the type of this ServerIdAlertsBody. # noqa: E501
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
:return: The type of this ServerIdAlertsBody. # noqa: E501
|
|
116
|
+
:rtype: V1ServerAlertType
|
|
117
|
+
"""
|
|
118
|
+
return self._type
|
|
119
|
+
|
|
120
|
+
@type.setter
|
|
121
|
+
def type(self, type: 'V1ServerAlertType'):
|
|
122
|
+
"""Sets the type of this ServerIdAlertsBody.
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:param type: The type of this ServerIdAlertsBody. # noqa: E501
|
|
126
|
+
:type: V1ServerAlertType
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
self._type = type
|
|
130
|
+
|
|
131
|
+
def to_dict(self) -> dict:
|
|
132
|
+
"""Returns the model properties as a dict"""
|
|
133
|
+
result = {}
|
|
134
|
+
|
|
135
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
136
|
+
value = getattr(self, attr)
|
|
137
|
+
if isinstance(value, list):
|
|
138
|
+
result[attr] = list(map(
|
|
139
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
140
|
+
value
|
|
141
|
+
))
|
|
142
|
+
elif hasattr(value, "to_dict"):
|
|
143
|
+
result[attr] = value.to_dict()
|
|
144
|
+
elif isinstance(value, dict):
|
|
145
|
+
result[attr] = dict(map(
|
|
146
|
+
lambda item: (item[0], item[1].to_dict())
|
|
147
|
+
if hasattr(item[1], "to_dict") else item,
|
|
148
|
+
value.items()
|
|
149
|
+
))
|
|
150
|
+
else:
|
|
151
|
+
result[attr] = value
|
|
152
|
+
if issubclass(ServerIdAlertsBody, dict):
|
|
153
|
+
for key, value in self.items():
|
|
154
|
+
result[key] = value
|
|
155
|
+
|
|
156
|
+
return result
|
|
157
|
+
|
|
158
|
+
def to_str(self) -> str:
|
|
159
|
+
"""Returns the string representation of the model"""
|
|
160
|
+
return pprint.pformat(self.to_dict())
|
|
161
|
+
|
|
162
|
+
def __repr__(self) -> str:
|
|
163
|
+
"""For `print` and `pprint`"""
|
|
164
|
+
return self.to_str()
|
|
165
|
+
|
|
166
|
+
def __eq__(self, other: 'ServerIdAlertsBody') -> bool:
|
|
167
|
+
"""Returns true if both objects are equal"""
|
|
168
|
+
if not isinstance(other, ServerIdAlertsBody):
|
|
169
|
+
return False
|
|
170
|
+
|
|
171
|
+
return self.__dict__ == other.__dict__
|
|
172
|
+
|
|
173
|
+
def __ne__(self, other: 'ServerIdAlertsBody') -> bool:
|
|
174
|
+
"""Returns true if both objects are not equal"""
|
|
175
|
+
return not self == other
|
|
@@ -41,6 +41,7 @@ class V1CloudSpaceEnvironmentTemplate(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
+
'config': 'V1CloudSpaceEnvironmentTemplateConfig',
|
|
44
45
|
'created_at': 'datetime',
|
|
45
46
|
'id': 'str',
|
|
46
47
|
'name': 'str',
|
|
@@ -50,6 +51,7 @@ class V1CloudSpaceEnvironmentTemplate(object):
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
attribute_map = {
|
|
54
|
+
'config': 'config',
|
|
53
55
|
'created_at': 'createdAt',
|
|
54
56
|
'id': 'id',
|
|
55
57
|
'name': 'name',
|
|
@@ -58,8 +60,9 @@ class V1CloudSpaceEnvironmentTemplate(object):
|
|
|
58
60
|
'user_id': 'userId'
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
def __init__(self, created_at: 'datetime' =None, id: 'str' =None, name: 'str' =None, org_id: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
|
|
63
|
+
def __init__(self, config: 'V1CloudSpaceEnvironmentTemplateConfig' =None, created_at: 'datetime' =None, id: 'str' =None, name: 'str' =None, org_id: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
|
|
62
64
|
"""V1CloudSpaceEnvironmentTemplate - a model defined in Swagger""" # noqa: E501
|
|
65
|
+
self._config = None
|
|
63
66
|
self._created_at = None
|
|
64
67
|
self._id = None
|
|
65
68
|
self._name = None
|
|
@@ -67,6 +70,8 @@ class V1CloudSpaceEnvironmentTemplate(object):
|
|
|
67
70
|
self._updated_at = None
|
|
68
71
|
self._user_id = None
|
|
69
72
|
self.discriminator = None
|
|
73
|
+
if config is not None:
|
|
74
|
+
self.config = config
|
|
70
75
|
if created_at is not None:
|
|
71
76
|
self.created_at = created_at
|
|
72
77
|
if id is not None:
|
|
@@ -80,6 +85,27 @@ class V1CloudSpaceEnvironmentTemplate(object):
|
|
|
80
85
|
if user_id is not None:
|
|
81
86
|
self.user_id = user_id
|
|
82
87
|
|
|
88
|
+
@property
|
|
89
|
+
def config(self) -> 'V1CloudSpaceEnvironmentTemplateConfig':
|
|
90
|
+
"""Gets the config of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
:return: The config of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
|
|
94
|
+
:rtype: V1CloudSpaceEnvironmentTemplateConfig
|
|
95
|
+
"""
|
|
96
|
+
return self._config
|
|
97
|
+
|
|
98
|
+
@config.setter
|
|
99
|
+
def config(self, config: 'V1CloudSpaceEnvironmentTemplateConfig'):
|
|
100
|
+
"""Sets the config of this V1CloudSpaceEnvironmentTemplate.
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
:param config: The config of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
|
|
104
|
+
:type: V1CloudSpaceEnvironmentTemplateConfig
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
self._config = config
|
|
108
|
+
|
|
83
109
|
@property
|
|
84
110
|
def created_at(self) -> 'datetime':
|
|
85
111
|
"""Gets the created_at of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1CloudSpaceEnvironmentTemplateConfig(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
'machine_image_version': 'str'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'machine_image_version': 'machineImageVersion'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, machine_image_version: 'str' =None): # noqa: E501
|
|
52
|
+
"""V1CloudSpaceEnvironmentTemplateConfig - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._machine_image_version = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if machine_image_version is not None:
|
|
56
|
+
self.machine_image_version = machine_image_version
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def machine_image_version(self) -> 'str':
|
|
60
|
+
"""Gets the machine_image_version of this V1CloudSpaceEnvironmentTemplateConfig. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The machine_image_version of this V1CloudSpaceEnvironmentTemplateConfig. # noqa: E501
|
|
64
|
+
:rtype: str
|
|
65
|
+
"""
|
|
66
|
+
return self._machine_image_version
|
|
67
|
+
|
|
68
|
+
@machine_image_version.setter
|
|
69
|
+
def machine_image_version(self, machine_image_version: 'str'):
|
|
70
|
+
"""Sets the machine_image_version of this V1CloudSpaceEnvironmentTemplateConfig.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param machine_image_version: The machine_image_version of this V1CloudSpaceEnvironmentTemplateConfig. # noqa: E501
|
|
74
|
+
:type: str
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._machine_image_version = machine_image_version
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> dict:
|
|
80
|
+
"""Returns the model properties as a dict"""
|
|
81
|
+
result = {}
|
|
82
|
+
|
|
83
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
84
|
+
value = getattr(self, attr)
|
|
85
|
+
if isinstance(value, list):
|
|
86
|
+
result[attr] = list(map(
|
|
87
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
88
|
+
value
|
|
89
|
+
))
|
|
90
|
+
elif hasattr(value, "to_dict"):
|
|
91
|
+
result[attr] = value.to_dict()
|
|
92
|
+
elif isinstance(value, dict):
|
|
93
|
+
result[attr] = dict(map(
|
|
94
|
+
lambda item: (item[0], item[1].to_dict())
|
|
95
|
+
if hasattr(item[1], "to_dict") else item,
|
|
96
|
+
value.items()
|
|
97
|
+
))
|
|
98
|
+
else:
|
|
99
|
+
result[attr] = value
|
|
100
|
+
if issubclass(V1CloudSpaceEnvironmentTemplateConfig, dict):
|
|
101
|
+
for key, value in self.items():
|
|
102
|
+
result[key] = value
|
|
103
|
+
|
|
104
|
+
return result
|
|
105
|
+
|
|
106
|
+
def to_str(self) -> str:
|
|
107
|
+
"""Returns the string representation of the model"""
|
|
108
|
+
return pprint.pformat(self.to_dict())
|
|
109
|
+
|
|
110
|
+
def __repr__(self) -> str:
|
|
111
|
+
"""For `print` and `pprint`"""
|
|
112
|
+
return self.to_str()
|
|
113
|
+
|
|
114
|
+
def __eq__(self, other: 'V1CloudSpaceEnvironmentTemplateConfig') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1CloudSpaceEnvironmentTemplateConfig):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1CloudSpaceEnvironmentTemplateConfig') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -46,6 +46,7 @@ class V1ClusterSecurityOptions(object):
|
|
|
46
46
|
'disable_public_ip': 'bool',
|
|
47
47
|
'encrypt_cluster_bucket': 'bool',
|
|
48
48
|
'encrypt_instance_volumes': 'bool',
|
|
49
|
+
'extra_firewall_cidr_ranges': 'list[str]',
|
|
49
50
|
'extra_policy': 'str',
|
|
50
51
|
'kms_key_id': 'str',
|
|
51
52
|
'protect_instance_metadata': 'bool',
|
|
@@ -60,6 +61,7 @@ class V1ClusterSecurityOptions(object):
|
|
|
60
61
|
'disable_public_ip': 'disablePublicIp',
|
|
61
62
|
'encrypt_cluster_bucket': 'encryptClusterBucket',
|
|
62
63
|
'encrypt_instance_volumes': 'encryptInstanceVolumes',
|
|
64
|
+
'extra_firewall_cidr_ranges': 'extraFirewallCidrRanges',
|
|
63
65
|
'extra_policy': 'extraPolicy',
|
|
64
66
|
'kms_key_id': 'kmsKeyId',
|
|
65
67
|
'protect_instance_metadata': 'protectInstanceMetadata',
|
|
@@ -68,13 +70,14 @@ class V1ClusterSecurityOptions(object):
|
|
|
68
70
|
'ssh_disabled': 'sshDisabled'
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
def __init__(self, bucket_kms_key: 'str' =None, containers_non_privileged: 'bool' =None, disable_public_ip: 'bool' =None, encrypt_cluster_bucket: 'bool' =None, encrypt_instance_volumes: 'bool' =None, extra_policy: 'str' =None, kms_key_id: 'str' =None, protect_instance_metadata: 'bool' =None, rootless_docker: 'bool' =None, setup_network_load_balancer: 'bool' =None, ssh_disabled: 'bool' =None): # noqa: E501
|
|
73
|
+
def __init__(self, bucket_kms_key: 'str' =None, containers_non_privileged: 'bool' =None, disable_public_ip: 'bool' =None, encrypt_cluster_bucket: 'bool' =None, encrypt_instance_volumes: 'bool' =None, extra_firewall_cidr_ranges: 'list[str]' =None, extra_policy: 'str' =None, kms_key_id: 'str' =None, protect_instance_metadata: 'bool' =None, rootless_docker: 'bool' =None, setup_network_load_balancer: 'bool' =None, ssh_disabled: 'bool' =None): # noqa: E501
|
|
72
74
|
"""V1ClusterSecurityOptions - a model defined in Swagger""" # noqa: E501
|
|
73
75
|
self._bucket_kms_key = None
|
|
74
76
|
self._containers_non_privileged = None
|
|
75
77
|
self._disable_public_ip = None
|
|
76
78
|
self._encrypt_cluster_bucket = None
|
|
77
79
|
self._encrypt_instance_volumes = None
|
|
80
|
+
self._extra_firewall_cidr_ranges = None
|
|
78
81
|
self._extra_policy = None
|
|
79
82
|
self._kms_key_id = None
|
|
80
83
|
self._protect_instance_metadata = None
|
|
@@ -92,6 +95,8 @@ class V1ClusterSecurityOptions(object):
|
|
|
92
95
|
self.encrypt_cluster_bucket = encrypt_cluster_bucket
|
|
93
96
|
if encrypt_instance_volumes is not None:
|
|
94
97
|
self.encrypt_instance_volumes = encrypt_instance_volumes
|
|
98
|
+
if extra_firewall_cidr_ranges is not None:
|
|
99
|
+
self.extra_firewall_cidr_ranges = extra_firewall_cidr_ranges
|
|
95
100
|
if extra_policy is not None:
|
|
96
101
|
self.extra_policy = extra_policy
|
|
97
102
|
if kms_key_id is not None:
|
|
@@ -210,6 +215,27 @@ class V1ClusterSecurityOptions(object):
|
|
|
210
215
|
|
|
211
216
|
self._encrypt_instance_volumes = encrypt_instance_volumes
|
|
212
217
|
|
|
218
|
+
@property
|
|
219
|
+
def extra_firewall_cidr_ranges(self) -> 'list[str]':
|
|
220
|
+
"""Gets the extra_firewall_cidr_ranges of this V1ClusterSecurityOptions. # noqa: E501
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
:return: The extra_firewall_cidr_ranges of this V1ClusterSecurityOptions. # noqa: E501
|
|
224
|
+
:rtype: list[str]
|
|
225
|
+
"""
|
|
226
|
+
return self._extra_firewall_cidr_ranges
|
|
227
|
+
|
|
228
|
+
@extra_firewall_cidr_ranges.setter
|
|
229
|
+
def extra_firewall_cidr_ranges(self, extra_firewall_cidr_ranges: 'list[str]'):
|
|
230
|
+
"""Sets the extra_firewall_cidr_ranges of this V1ClusterSecurityOptions.
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
:param extra_firewall_cidr_ranges: The extra_firewall_cidr_ranges of this V1ClusterSecurityOptions. # noqa: E501
|
|
234
|
+
:type: list[str]
|
|
235
|
+
"""
|
|
236
|
+
|
|
237
|
+
self._extra_firewall_cidr_ranges = extra_firewall_cidr_ranges
|
|
238
|
+
|
|
213
239
|
@property
|
|
214
240
|
def extra_policy(self) -> 'str':
|
|
215
241
|
"""Gets the extra_policy of this V1ClusterSecurityOptions. # noqa: E501
|