huaweicloudsdkclouddc 3.1.176__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.
Files changed (143) hide show
  1. huaweicloudsdkclouddc/__init__.py +0 -0
  2. huaweicloudsdkclouddc/v1/__init__.py +140 -0
  3. huaweicloudsdkclouddc/v1/clouddc_async_client.py +2255 -0
  4. huaweicloudsdkclouddc/v1/clouddc_client.py +2252 -0
  5. huaweicloudsdkclouddc/v1/model/__init__.py +137 -0
  6. huaweicloudsdkclouddc/v1/model/alarm_daily_trend.py +166 -0
  7. huaweicloudsdkclouddc/v1/model/alarm_device_info.py +137 -0
  8. huaweicloudsdkclouddc/v1/model/alarm_group.py +166 -0
  9. huaweicloudsdkclouddc/v1/model/alarm_history.py +336 -0
  10. huaweicloudsdkclouddc/v1/model/alarm_host.py +166 -0
  11. huaweicloudsdkclouddc/v1/model/alarm_info.py +166 -0
  12. huaweicloudsdkclouddc/v1/model/alarm_level_info.py +137 -0
  13. huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_request.py +132 -0
  14. huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_response.py +81 -0
  15. huaweicloudsdkclouddc/v1/model/batch_create_tags_request.py +160 -0
  16. huaweicloudsdkclouddc/v1/model/batch_create_tags_response.py +81 -0
  17. huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_request.py +132 -0
  18. huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_response.py +81 -0
  19. huaweicloudsdkclouddc/v1/model/batch_delete_options.py +108 -0
  20. huaweicloudsdkclouddc/v1/model/batch_delete_tags_request.py +160 -0
  21. huaweicloudsdkclouddc/v1/model/batch_delete_tags_response.py +81 -0
  22. huaweicloudsdkclouddc/v1/model/capacity_bytes.py +77 -0
  23. huaweicloudsdkclouddc/v1/model/change_instance_password_options.py +136 -0
  24. huaweicloudsdkclouddc/v1/model/change_instance_password_request.py +104 -0
  25. huaweicloudsdkclouddc/v1/model/change_instance_password_response.py +112 -0
  26. huaweicloudsdkclouddc/v1/model/change_server_power_state_request.py +104 -0
  27. huaweicloudsdkclouddc/v1/model/change_server_power_state_response.py +112 -0
  28. huaweicloudsdkclouddc/v1/model/create_instance_opitons.py +302 -0
  29. huaweicloudsdkclouddc/v1/model/create_instance_opitons_placement.py +108 -0
  30. huaweicloudsdkclouddc/v1/model/create_instance_request.py +104 -0
  31. huaweicloudsdkclouddc/v1/model/create_instance_response.py +112 -0
  32. huaweicloudsdkclouddc/v1/model/delete_instance_request.py +107 -0
  33. huaweicloudsdkclouddc/v1/model/delete_instance_response.py +108 -0
  34. huaweicloudsdkclouddc/v1/model/delete_instances_request.py +104 -0
  35. huaweicloudsdkclouddc/v1/model/delete_instances_response.py +112 -0
  36. huaweicloudsdkclouddc/v1/model/dimension.py +137 -0
  37. huaweicloudsdkclouddc/v1/model/download_server_logs_request.py +135 -0
  38. huaweicloudsdkclouddc/v1/model/download_server_logs_response.py +158 -0
  39. huaweicloudsdkclouddc/v1/model/drive.py +630 -0
  40. huaweicloudsdkclouddc/v1/model/error_status.py +163 -0
  41. huaweicloudsdkclouddc/v1/model/event_info.py +311 -0
  42. huaweicloudsdkclouddc/v1/model/export_server_logs_request.py +107 -0
  43. huaweicloudsdkclouddc/v1/model/export_server_logs_response.py +274 -0
  44. huaweicloudsdkclouddc/v1/model/fan.py +278 -0
  45. huaweicloudsdkclouddc/v1/model/fault_host_info.py +166 -0
  46. huaweicloudsdkclouddc/v1/model/firmware_details.py +195 -0
  47. huaweicloudsdkclouddc/v1/model/hardware_metric.py +137 -0
  48. huaweicloudsdkclouddc/v1/model/hardware_summary.py +221 -0
  49. huaweicloudsdkclouddc/v1/model/health.py +83 -0
  50. huaweicloudsdkclouddc/v1/model/i_dc.py +201 -0
  51. huaweicloudsdkclouddc/v1/model/i_rack.py +514 -0
  52. huaweicloudsdkclouddc/v1/model/i_rack_request.py +108 -0
  53. huaweicloudsdkclouddc/v1/model/image.py +163 -0
  54. huaweicloudsdkclouddc/v1/model/image_id.py +77 -0
  55. huaweicloudsdkclouddc/v1/model/instance.py +273 -0
  56. huaweicloudsdkclouddc/v1/model/instance_id.py +77 -0
  57. huaweicloudsdkclouddc/v1/model/instance_state.py +89 -0
  58. huaweicloudsdkclouddc/v1/model/list_alarms_request.py +340 -0
  59. huaweicloudsdkclouddc/v1/model/list_alarms_response.py +141 -0
  60. huaweicloudsdkclouddc/v1/model/list_events_request.py +251 -0
  61. huaweicloudsdkclouddc/v1/model/list_events_response.py +141 -0
  62. huaweicloudsdkclouddc/v1/model/list_i_dcs_request.py +194 -0
  63. huaweicloudsdkclouddc/v1/model/list_i_dcs_response.py +133 -0
  64. huaweicloudsdkclouddc/v1/model/list_i_racks_request.py +194 -0
  65. huaweicloudsdkclouddc/v1/model/list_i_racks_response.py +133 -0
  66. huaweicloudsdkclouddc/v1/model/list_instances_request.py +224 -0
  67. huaweicloudsdkclouddc/v1/model/list_instances_response.py +166 -0
  68. huaweicloudsdkclouddc/v1/model/list_servers_request.py +166 -0
  69. huaweicloudsdkclouddc/v1/model/list_servers_response.py +166 -0
  70. huaweicloudsdkclouddc/v1/model/location.py +166 -0
  71. huaweicloudsdkclouddc/v1/model/manage_state.py +84 -0
  72. huaweicloudsdkclouddc/v1/model/memory.py +572 -0
  73. huaweicloudsdkclouddc/v1/model/metric.py +137 -0
  74. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request.py +132 -0
  75. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body.py +137 -0
  76. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body_nics.py +136 -0
  77. huaweicloudsdkclouddc/v1/model/modify_instance_ip_response.py +81 -0
  78. huaweicloudsdkclouddc/v1/model/network_adapter.py +485 -0
  79. huaweicloudsdkclouddc/v1/model/network_interface.py +136 -0
  80. huaweicloudsdkclouddc/v1/model/network_port.py +340 -0
  81. huaweicloudsdkclouddc/v1/model/page_info.py +166 -0
  82. huaweicloudsdkclouddc/v1/model/password.py +77 -0
  83. huaweicloudsdkclouddc/v1/model/physical_server.py +395 -0
  84. huaweicloudsdkclouddc/v1/model/power.py +481 -0
  85. huaweicloudsdkclouddc/v1/model/power_action.py +136 -0
  86. huaweicloudsdkclouddc/v1/model/power_state.py +84 -0
  87. huaweicloudsdkclouddc/v1/model/processors.py +630 -0
  88. huaweicloudsdkclouddc/v1/model/query_instance_response_body.py +492 -0
  89. huaweicloudsdkclouddc/v1/model/reinstall_os_options.py +165 -0
  90. huaweicloudsdkclouddc/v1/model/reinstall_os_request.py +104 -0
  91. huaweicloudsdkclouddc/v1/model/reinstall_os_response.py +112 -0
  92. huaweicloudsdkclouddc/v1/model/resource_name.py +77 -0
  93. huaweicloudsdkclouddc/v1/model/resource_tags.py +108 -0
  94. huaweicloudsdkclouddc/v1/model/resource_uuid.py +77 -0
  95. huaweicloudsdkclouddc/v1/model/run_instances_options.py +360 -0
  96. huaweicloudsdkclouddc/v1/model/run_instances_options_network_interfaces.py +107 -0
  97. huaweicloudsdkclouddc/v1/model/run_instances_options_placement.py +108 -0
  98. huaweicloudsdkclouddc/v1/model/run_instances_request.py +104 -0
  99. huaweicloudsdkclouddc/v1/model/run_instances_response.py +112 -0
  100. huaweicloudsdkclouddc/v1/model/sas_address.py +77 -0
  101. huaweicloudsdkclouddc/v1/model/server_instance_id_set.py +108 -0
  102. huaweicloudsdkclouddc/v1/model/server_power_status.py +164 -0
  103. huaweicloudsdkclouddc/v1/model/server_state.py +135 -0
  104. huaweicloudsdkclouddc/v1/model/server_status.py +272 -0
  105. huaweicloudsdkclouddc/v1/model/servers_response_physical_servers.py +108 -0
  106. huaweicloudsdkclouddc/v1/model/show_alarm_summary_request.py +77 -0
  107. huaweicloudsdkclouddc/v1/model/show_alarm_summary_response.py +199 -0
  108. huaweicloudsdkclouddc/v1/model/show_alarm_trend_request.py +135 -0
  109. huaweicloudsdkclouddc/v1/model/show_alarm_trend_response.py +141 -0
  110. huaweicloudsdkclouddc/v1/model/show_event_request.py +107 -0
  111. huaweicloudsdkclouddc/v1/model/show_event_response.py +373 -0
  112. huaweicloudsdkclouddc/v1/model/show_instance_status_request.py +107 -0
  113. huaweicloudsdkclouddc/v1/model/show_instance_status_response.py +133 -0
  114. huaweicloudsdkclouddc/v1/model/show_logs_export_status_request.py +135 -0
  115. huaweicloudsdkclouddc/v1/model/show_logs_export_status_response.py +199 -0
  116. huaweicloudsdkclouddc/v1/model/show_remote_console_request.py +107 -0
  117. huaweicloudsdkclouddc/v1/model/show_remote_console_response.py +112 -0
  118. huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_request.py +107 -0
  119. huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_response.py +112 -0
  120. huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_request.py +107 -0
  121. huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_response.py +311 -0
  122. huaweicloudsdkclouddc/v1/model/show_server_request.py +107 -0
  123. huaweicloudsdkclouddc/v1/model/show_server_response.py +407 -0
  124. huaweicloudsdkclouddc/v1/model/show_server_status_request.py +77 -0
  125. huaweicloudsdkclouddc/v1/model/show_server_status_response.py +133 -0
  126. huaweicloudsdkclouddc/v1/model/state.py +82 -0
  127. huaweicloudsdkclouddc/v1/model/status.py +129 -0
  128. huaweicloudsdkclouddc/v1/model/storage_controller.py +601 -0
  129. huaweicloudsdkclouddc/v1/model/tag.py +136 -0
  130. huaweicloudsdkclouddc/v1/model/update_i_dcs_request.py +104 -0
  131. huaweicloudsdkclouddc/v1/model/update_i_dcs_response.py +108 -0
  132. huaweicloudsdkclouddc/v1/model/update_i_rack_request.py +132 -0
  133. huaweicloudsdkclouddc/v1/model/update_i_rack_response.py +108 -0
  134. huaweicloudsdkclouddc/v1/model/user_data.py +77 -0
  135. huaweicloudsdkclouddc/v1/model/volume.py +452 -0
  136. huaweicloudsdkclouddc/v1/model/volume_status.py +133 -0
  137. huaweicloudsdkclouddc/v1/model/vpc_id.py +77 -0
  138. huaweicloudsdkclouddc/v1/region/__init__.py +0 -0
  139. huaweicloudsdkclouddc/v1/region/clouddc_region.py +40 -0
  140. huaweicloudsdkclouddc-3.1.176.dist-info/METADATA +25 -0
  141. huaweicloudsdkclouddc-3.1.176.dist-info/RECORD +143 -0
  142. huaweicloudsdkclouddc-3.1.176.dist-info/WHEEL +4 -0
  143. huaweicloudsdkclouddc-3.1.176.dist-info/licenses/LICENSE +13 -0
@@ -0,0 +1,108 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class IRackRequest:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'description': 'str'
19
+ }
20
+
21
+ attribute_map = {
22
+ 'description': 'description'
23
+ }
24
+
25
+ def __init__(self, description=None):
26
+ r"""IRackRequest
27
+
28
+ The model defined in huaweicloud sdk
29
+
30
+ :param description: 机柜描述,大小不超过512字节
31
+ :type description: str
32
+ """
33
+
34
+
35
+
36
+ self._description = None
37
+ self.discriminator = None
38
+
39
+ if description is not None:
40
+ self.description = description
41
+
42
+ @property
43
+ def description(self):
44
+ r"""Gets the description of this IRackRequest.
45
+
46
+ 机柜描述,大小不超过512字节
47
+
48
+ :return: The description of this IRackRequest.
49
+ :rtype: str
50
+ """
51
+ return self._description
52
+
53
+ @description.setter
54
+ def description(self, description):
55
+ r"""Sets the description of this IRackRequest.
56
+
57
+ 机柜描述,大小不超过512字节
58
+
59
+ :param description: The description of this IRackRequest.
60
+ :type description: str
61
+ """
62
+ self._description = description
63
+
64
+ def to_dict(self):
65
+ result = {}
66
+
67
+ for attr, _ in self.openapi_types.items():
68
+ value = getattr(self, attr)
69
+ if isinstance(value, list):
70
+ result[attr] = list(map(
71
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
72
+ value
73
+ ))
74
+ elif hasattr(value, "to_dict"):
75
+ result[attr] = value.to_dict()
76
+ elif isinstance(value, dict):
77
+ result[attr] = dict(map(
78
+ lambda item: (item[0], item[1].to_dict())
79
+ if hasattr(item[1], "to_dict") else item,
80
+ value.items()
81
+ ))
82
+ else:
83
+ if attr in self.sensitive_list:
84
+ result[attr] = "****"
85
+ else:
86
+ result[attr] = value
87
+
88
+ return result
89
+
90
+ def to_str(self):
91
+ """Returns the string representation of the model"""
92
+ import simplejson as json
93
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
94
+
95
+ def __repr__(self):
96
+ """For `print`"""
97
+ return self.to_str()
98
+
99
+ def __eq__(self, other):
100
+ """Returns true if both objects are equal"""
101
+ if not isinstance(other, IRackRequest):
102
+ return False
103
+
104
+ return self.__dict__ == other.__dict__
105
+
106
+ def __ne__(self, other):
107
+ """Returns true if both objects are not equal"""
108
+ return not self == other
@@ -0,0 +1,163 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class Image:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'id': 'str',
19
+ 'name': 'str',
20
+ 'os_type': 'str'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'id': 'id',
25
+ 'name': 'name',
26
+ 'os_type': 'os_type'
27
+ }
28
+
29
+ def __init__(self, id=None, name=None, os_type=None):
30
+ r"""Image
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param id: 镜像ID,格式为UUID。
35
+ :type id: str
36
+ :param name: 镜像名称
37
+ :type name: str
38
+ :param os_type: 镜像os类型
39
+ :type os_type: str
40
+ """
41
+
42
+
43
+
44
+ self._id = None
45
+ self._name = None
46
+ self._os_type = None
47
+ self.discriminator = None
48
+
49
+ self.id = id
50
+ self.name = name
51
+ self.os_type = os_type
52
+
53
+ @property
54
+ def id(self):
55
+ r"""Gets the id of this Image.
56
+
57
+ 镜像ID,格式为UUID。
58
+
59
+ :return: The id of this Image.
60
+ :rtype: str
61
+ """
62
+ return self._id
63
+
64
+ @id.setter
65
+ def id(self, id):
66
+ r"""Sets the id of this Image.
67
+
68
+ 镜像ID,格式为UUID。
69
+
70
+ :param id: The id of this Image.
71
+ :type id: str
72
+ """
73
+ self._id = id
74
+
75
+ @property
76
+ def name(self):
77
+ r"""Gets the name of this Image.
78
+
79
+ 镜像名称
80
+
81
+ :return: The name of this Image.
82
+ :rtype: str
83
+ """
84
+ return self._name
85
+
86
+ @name.setter
87
+ def name(self, name):
88
+ r"""Sets the name of this Image.
89
+
90
+ 镜像名称
91
+
92
+ :param name: The name of this Image.
93
+ :type name: str
94
+ """
95
+ self._name = name
96
+
97
+ @property
98
+ def os_type(self):
99
+ r"""Gets the os_type of this Image.
100
+
101
+ 镜像os类型
102
+
103
+ :return: The os_type of this Image.
104
+ :rtype: str
105
+ """
106
+ return self._os_type
107
+
108
+ @os_type.setter
109
+ def os_type(self, os_type):
110
+ r"""Sets the os_type of this Image.
111
+
112
+ 镜像os类型
113
+
114
+ :param os_type: The os_type of this Image.
115
+ :type os_type: str
116
+ """
117
+ self._os_type = os_type
118
+
119
+ def to_dict(self):
120
+ result = {}
121
+
122
+ for attr, _ in self.openapi_types.items():
123
+ value = getattr(self, attr)
124
+ if isinstance(value, list):
125
+ result[attr] = list(map(
126
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
127
+ value
128
+ ))
129
+ elif hasattr(value, "to_dict"):
130
+ result[attr] = value.to_dict()
131
+ elif isinstance(value, dict):
132
+ result[attr] = dict(map(
133
+ lambda item: (item[0], item[1].to_dict())
134
+ if hasattr(item[1], "to_dict") else item,
135
+ value.items()
136
+ ))
137
+ else:
138
+ if attr in self.sensitive_list:
139
+ result[attr] = "****"
140
+ else:
141
+ result[attr] = value
142
+
143
+ return result
144
+
145
+ def to_str(self):
146
+ """Returns the string representation of the model"""
147
+ import simplejson as json
148
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
149
+
150
+ def __repr__(self):
151
+ """For `print`"""
152
+ return self.to_str()
153
+
154
+ def __eq__(self, other):
155
+ """Returns true if both objects are equal"""
156
+ if not isinstance(other, Image):
157
+ return False
158
+
159
+ return self.__dict__ == other.__dict__
160
+
161
+ def __ne__(self, other):
162
+ """Returns true if both objects are not equal"""
163
+ return not self == other
@@ -0,0 +1,77 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class ImageId:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ }
19
+
20
+ attribute_map = {
21
+ }
22
+
23
+ def __init__(self):
24
+ r"""ImageId
25
+
26
+ The model defined in huaweicloud sdk
27
+
28
+ """
29
+
30
+
31
+ self.discriminator = None
32
+
33
+ def to_dict(self):
34
+ result = {}
35
+
36
+ for attr, _ in self.openapi_types.items():
37
+ value = getattr(self, attr)
38
+ if isinstance(value, list):
39
+ result[attr] = list(map(
40
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
41
+ value
42
+ ))
43
+ elif hasattr(value, "to_dict"):
44
+ result[attr] = value.to_dict()
45
+ elif isinstance(value, dict):
46
+ result[attr] = dict(map(
47
+ lambda item: (item[0], item[1].to_dict())
48
+ if hasattr(item[1], "to_dict") else item,
49
+ value.items()
50
+ ))
51
+ else:
52
+ if attr in self.sensitive_list:
53
+ result[attr] = "****"
54
+ else:
55
+ result[attr] = value
56
+
57
+ return result
58
+
59
+ def to_str(self):
60
+ """Returns the string representation of the model"""
61
+ import simplejson as json
62
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
63
+
64
+ def __repr__(self):
65
+ """For `print`"""
66
+ return self.to_str()
67
+
68
+ def __eq__(self, other):
69
+ """Returns true if both objects are equal"""
70
+ if not isinstance(other, ImageId):
71
+ return False
72
+
73
+ return self.__dict__ == other.__dict__
74
+
75
+ def __ne__(self, other):
76
+ """Returns true if both objects are not equal"""
77
+ return not self == other
@@ -0,0 +1,273 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class Instance:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'id': 'str',
19
+ 'name': 'str',
20
+ 'vpc_id': 'str',
21
+ 'network_interfaces': 'list[NetworkInterface]',
22
+ 'tags': 'list[Tag]',
23
+ 'image': 'Image',
24
+ 'description': 'str'
25
+ }
26
+
27
+ attribute_map = {
28
+ 'id': 'id',
29
+ 'name': 'name',
30
+ 'vpc_id': 'vpc_id',
31
+ 'network_interfaces': 'network_interfaces',
32
+ 'tags': 'tags',
33
+ 'image': 'image',
34
+ 'description': 'description'
35
+ }
36
+
37
+ def __init__(self, id=None, name=None, vpc_id=None, network_interfaces=None, tags=None, image=None, description=None):
38
+ r"""Instance
39
+
40
+ The model defined in huaweicloud sdk
41
+
42
+ :param id: UUID(Universally Unique Identifier)是一个 128 位的数字,通常以 32 个十六进制数字的形式表示,分为 5 组,用连字符分隔。具体格式如下: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 其中: 每个 x 是一个十六进制数字(0-9 或 a-f)。 5 组的长度分别是:8 位、4 位、4 位、4 位 和 12 位。 为了匹配这种格式的 UUID,可以使用以下正则表达式: regex ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
43
+ :type id: str
44
+ :param name: instance name
45
+ :type name: str
46
+ :param vpc_id: VPC ID
47
+ :type vpc_id: str
48
+ :param network_interfaces: 指定裸机实例的网卡信息。 约束: 一个裸机实例最多挂载2个网卡,参数中第一个网卡会作为裸机实例的主网卡。若用户指定了多组网卡参数,需保证各组参数都属于同一VPC。
49
+ :type network_interfaces: list[:class:`huaweicloudsdkclouddc.v1.NetworkInterface`]
50
+ :param tags: 标签
51
+ :type tags: list[:class:`huaweicloudsdkclouddc.v1.Tag`]
52
+ :param image:
53
+ :type image: :class:`huaweicloudsdkclouddc.v1.Image`
54
+ :param description: 云服务器描述信息,默认为空字符串。
55
+ :type description: str
56
+ """
57
+
58
+
59
+
60
+ self._id = None
61
+ self._name = None
62
+ self._vpc_id = None
63
+ self._network_interfaces = None
64
+ self._tags = None
65
+ self._image = None
66
+ self._description = None
67
+ self.discriminator = None
68
+
69
+ self.id = id
70
+ self.name = name
71
+ self.vpc_id = vpc_id
72
+ if network_interfaces is not None:
73
+ self.network_interfaces = network_interfaces
74
+ self.tags = tags
75
+ self.image = image
76
+ if description is not None:
77
+ self.description = description
78
+
79
+ @property
80
+ def id(self):
81
+ r"""Gets the id of this Instance.
82
+
83
+ UUID(Universally Unique Identifier)是一个 128 位的数字,通常以 32 个十六进制数字的形式表示,分为 5 组,用连字符分隔。具体格式如下: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 其中: 每个 x 是一个十六进制数字(0-9 或 a-f)。 5 组的长度分别是:8 位、4 位、4 位、4 位 和 12 位。 为了匹配这种格式的 UUID,可以使用以下正则表达式: regex ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
84
+
85
+ :return: The id of this Instance.
86
+ :rtype: str
87
+ """
88
+ return self._id
89
+
90
+ @id.setter
91
+ def id(self, id):
92
+ r"""Sets the id of this Instance.
93
+
94
+ UUID(Universally Unique Identifier)是一个 128 位的数字,通常以 32 个十六进制数字的形式表示,分为 5 组,用连字符分隔。具体格式如下: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 其中: 每个 x 是一个十六进制数字(0-9 或 a-f)。 5 组的长度分别是:8 位、4 位、4 位、4 位 和 12 位。 为了匹配这种格式的 UUID,可以使用以下正则表达式: regex ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
95
+
96
+ :param id: The id of this Instance.
97
+ :type id: str
98
+ """
99
+ self._id = id
100
+
101
+ @property
102
+ def name(self):
103
+ r"""Gets the name of this Instance.
104
+
105
+ instance name
106
+
107
+ :return: The name of this Instance.
108
+ :rtype: str
109
+ """
110
+ return self._name
111
+
112
+ @name.setter
113
+ def name(self, name):
114
+ r"""Sets the name of this Instance.
115
+
116
+ instance name
117
+
118
+ :param name: The name of this Instance.
119
+ :type name: str
120
+ """
121
+ self._name = name
122
+
123
+ @property
124
+ def vpc_id(self):
125
+ r"""Gets the vpc_id of this Instance.
126
+
127
+ VPC ID
128
+
129
+ :return: The vpc_id of this Instance.
130
+ :rtype: str
131
+ """
132
+ return self._vpc_id
133
+
134
+ @vpc_id.setter
135
+ def vpc_id(self, vpc_id):
136
+ r"""Sets the vpc_id of this Instance.
137
+
138
+ VPC ID
139
+
140
+ :param vpc_id: The vpc_id of this Instance.
141
+ :type vpc_id: str
142
+ """
143
+ self._vpc_id = vpc_id
144
+
145
+ @property
146
+ def network_interfaces(self):
147
+ r"""Gets the network_interfaces of this Instance.
148
+
149
+ 指定裸机实例的网卡信息。 约束: 一个裸机实例最多挂载2个网卡,参数中第一个网卡会作为裸机实例的主网卡。若用户指定了多组网卡参数,需保证各组参数都属于同一VPC。
150
+
151
+ :return: The network_interfaces of this Instance.
152
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.NetworkInterface`]
153
+ """
154
+ return self._network_interfaces
155
+
156
+ @network_interfaces.setter
157
+ def network_interfaces(self, network_interfaces):
158
+ r"""Sets the network_interfaces of this Instance.
159
+
160
+ 指定裸机实例的网卡信息。 约束: 一个裸机实例最多挂载2个网卡,参数中第一个网卡会作为裸机实例的主网卡。若用户指定了多组网卡参数,需保证各组参数都属于同一VPC。
161
+
162
+ :param network_interfaces: The network_interfaces of this Instance.
163
+ :type network_interfaces: list[:class:`huaweicloudsdkclouddc.v1.NetworkInterface`]
164
+ """
165
+ self._network_interfaces = network_interfaces
166
+
167
+ @property
168
+ def tags(self):
169
+ r"""Gets the tags of this Instance.
170
+
171
+ 标签
172
+
173
+ :return: The tags of this Instance.
174
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.Tag`]
175
+ """
176
+ return self._tags
177
+
178
+ @tags.setter
179
+ def tags(self, tags):
180
+ r"""Sets the tags of this Instance.
181
+
182
+ 标签
183
+
184
+ :param tags: The tags of this Instance.
185
+ :type tags: list[:class:`huaweicloudsdkclouddc.v1.Tag`]
186
+ """
187
+ self._tags = tags
188
+
189
+ @property
190
+ def image(self):
191
+ r"""Gets the image of this Instance.
192
+
193
+ :return: The image of this Instance.
194
+ :rtype: :class:`huaweicloudsdkclouddc.v1.Image`
195
+ """
196
+ return self._image
197
+
198
+ @image.setter
199
+ def image(self, image):
200
+ r"""Sets the image of this Instance.
201
+
202
+ :param image: The image of this Instance.
203
+ :type image: :class:`huaweicloudsdkclouddc.v1.Image`
204
+ """
205
+ self._image = image
206
+
207
+ @property
208
+ def description(self):
209
+ r"""Gets the description of this Instance.
210
+
211
+ 云服务器描述信息,默认为空字符串。
212
+
213
+ :return: The description of this Instance.
214
+ :rtype: str
215
+ """
216
+ return self._description
217
+
218
+ @description.setter
219
+ def description(self, description):
220
+ r"""Sets the description of this Instance.
221
+
222
+ 云服务器描述信息,默认为空字符串。
223
+
224
+ :param description: The description of this Instance.
225
+ :type description: str
226
+ """
227
+ self._description = description
228
+
229
+ def to_dict(self):
230
+ result = {}
231
+
232
+ for attr, _ in self.openapi_types.items():
233
+ value = getattr(self, attr)
234
+ if isinstance(value, list):
235
+ result[attr] = list(map(
236
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
237
+ value
238
+ ))
239
+ elif hasattr(value, "to_dict"):
240
+ result[attr] = value.to_dict()
241
+ elif isinstance(value, dict):
242
+ result[attr] = dict(map(
243
+ lambda item: (item[0], item[1].to_dict())
244
+ if hasattr(item[1], "to_dict") else item,
245
+ value.items()
246
+ ))
247
+ else:
248
+ if attr in self.sensitive_list:
249
+ result[attr] = "****"
250
+ else:
251
+ result[attr] = value
252
+
253
+ return result
254
+
255
+ def to_str(self):
256
+ """Returns the string representation of the model"""
257
+ import simplejson as json
258
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
259
+
260
+ def __repr__(self):
261
+ """For `print`"""
262
+ return self.to_str()
263
+
264
+ def __eq__(self, other):
265
+ """Returns true if both objects are equal"""
266
+ if not isinstance(other, Instance):
267
+ return False
268
+
269
+ return self.__dict__ == other.__dict__
270
+
271
+ def __ne__(self, other):
272
+ """Returns true if both objects are not equal"""
273
+ return not self == other
@@ -0,0 +1,77 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class InstanceId:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ }
19
+
20
+ attribute_map = {
21
+ }
22
+
23
+ def __init__(self):
24
+ r"""InstanceId
25
+
26
+ The model defined in huaweicloud sdk
27
+
28
+ """
29
+
30
+
31
+ self.discriminator = None
32
+
33
+ def to_dict(self):
34
+ result = {}
35
+
36
+ for attr, _ in self.openapi_types.items():
37
+ value = getattr(self, attr)
38
+ if isinstance(value, list):
39
+ result[attr] = list(map(
40
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
41
+ value
42
+ ))
43
+ elif hasattr(value, "to_dict"):
44
+ result[attr] = value.to_dict()
45
+ elif isinstance(value, dict):
46
+ result[attr] = dict(map(
47
+ lambda item: (item[0], item[1].to_dict())
48
+ if hasattr(item[1], "to_dict") else item,
49
+ value.items()
50
+ ))
51
+ else:
52
+ if attr in self.sensitive_list:
53
+ result[attr] = "****"
54
+ else:
55
+ result[attr] = value
56
+
57
+ return result
58
+
59
+ def to_str(self):
60
+ """Returns the string representation of the model"""
61
+ import simplejson as json
62
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
63
+
64
+ def __repr__(self):
65
+ """For `print`"""
66
+ return self.to_str()
67
+
68
+ def __eq__(self, other):
69
+ """Returns true if both objects are equal"""
70
+ if not isinstance(other, InstanceId):
71
+ return False
72
+
73
+ return self.__dict__ == other.__dict__
74
+
75
+ def __ne__(self, other):
76
+ """Returns true if both objects are not equal"""
77
+ return not self == other