waldur-api-client 7.7.7__py3-none-any.whl → 7.7.9__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.

Potentially problematic release.


This version of waldur-api-client might be problematic. Click here for more details.

Files changed (140) hide show
  1. waldur_api_client/api/customer_permissions_reviews/customer_permissions_reviews_count.py +19 -0
  2. waldur_api_client/api/customer_permissions_reviews/customer_permissions_reviews_list.py +19 -0
  3. waldur_api_client/api/customers/customers_users_list.py +141 -53
  4. waldur_api_client/api/invoices/invoices_items_retrieve.py +20 -0
  5. waldur_api_client/api/managed_rancher_cluster_resources/__init__.py +1 -0
  6. waldur_api_client/api/managed_rancher_cluster_resources/managed_rancher_cluster_resources_add_node.py +162 -0
  7. waldur_api_client/api/managed_rancher_cluster_resources/managed_rancher_cluster_resources_count.py +172 -0
  8. waldur_api_client/api/managed_rancher_cluster_resources/managed_rancher_cluster_resources_list.py +196 -0
  9. waldur_api_client/api/managed_rancher_cluster_resources/managed_rancher_cluster_resources_retrieve.py +171 -0
  10. waldur_api_client/api/marketplace_course_accounts/__init__.py +1 -0
  11. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_count.py +244 -0
  12. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_create.py +148 -0
  13. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_create_bulk.py +152 -0
  14. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_destroy.py +89 -0
  15. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_list.py +245 -0
  16. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_retrieve.py +140 -0
  17. waldur_api_client/api/marketplace_customer_service_accounts/marketplace_customer_service_accounts_count.py +25 -0
  18. waldur_api_client/api/marketplace_customer_service_accounts/marketplace_customer_service_accounts_list.py +25 -0
  19. waldur_api_client/api/marketplace_project_service_accounts/marketplace_project_service_accounts_count.py +25 -0
  20. waldur_api_client/api/marketplace_project_service_accounts/marketplace_project_service_accounts_list.py +25 -0
  21. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_component_stats_list.py +30 -0
  22. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_costs_list.py +30 -0
  23. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_count.py +30 -0
  24. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_customers_list.py +30 -0
  25. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_count.py +30 -0
  26. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_list.py +30 -0
  27. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list.py +30 -0
  28. waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_count.py +30 -0
  29. waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_list.py +30 -0
  30. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_course_accounts_list.py +284 -0
  31. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_list.py +30 -0
  32. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_service_accounts_list.py +29 -0
  33. waldur_api_client/api/project_permissions_reviews/__init__.py +1 -0
  34. waldur_api_client/api/project_permissions_reviews/project_permissions_reviews_close.py +91 -0
  35. waldur_api_client/api/project_permissions_reviews/project_permissions_reviews_count.py +266 -0
  36. waldur_api_client/api/project_permissions_reviews/project_permissions_reviews_list.py +269 -0
  37. waldur_api_client/api/project_permissions_reviews/project_permissions_reviews_retrieve.py +142 -0
  38. waldur_api_client/api/projects/projects_other_users_list.py +98 -23
  39. waldur_api_client/api/projects/projects_sync_user_roles.py +10 -9
  40. waldur_api_client/api/support_issue_statuses/__init__.py +1 -0
  41. waldur_api_client/api/support_issue_statuses/support_issue_statuses_count.py +172 -0
  42. waldur_api_client/api/support_issue_statuses/support_issue_statuses_create.py +148 -0
  43. waldur_api_client/api/support_issue_statuses/support_issue_statuses_destroy.py +89 -0
  44. waldur_api_client/api/support_issue_statuses/support_issue_statuses_list.py +173 -0
  45. waldur_api_client/api/support_issue_statuses/support_issue_statuses_partial_update.py +162 -0
  46. waldur_api_client/api/support_issue_statuses/support_issue_statuses_retrieve.py +140 -0
  47. waldur_api_client/api/support_issue_statuses/support_issue_statuses_update.py +162 -0
  48. waldur_api_client/api/user_group_invitations/user_group_invitations_submit_request.py +12 -12
  49. waldur_api_client/api/user_invitations/user_invitations_count.py +30 -0
  50. waldur_api_client/api/user_invitations/user_invitations_list.py +30 -0
  51. waldur_api_client/api/user_permission_requests/user_permission_requests_cancel_request.py +146 -0
  52. waldur_api_client/models/__init__.py +76 -2
  53. waldur_api_client/models/cancel_request_response.py +75 -0
  54. waldur_api_client/models/constance_settings.py +18 -0
  55. waldur_api_client/models/constance_settings_request.py +18 -0
  56. waldur_api_client/models/course_account.py +187 -0
  57. waldur_api_client/models/course_account_create_nested.py +68 -0
  58. waldur_api_client/models/course_account_create_nested_request.py +68 -0
  59. waldur_api_client/models/course_account_request.py +80 -0
  60. waldur_api_client/models/course_accounts_bulk_create.py +82 -0
  61. waldur_api_client/models/course_accounts_bulk_create_request.py +82 -0
  62. waldur_api_client/models/customer.py +9 -0
  63. waldur_api_client/models/customer_permission_review.py +16 -16
  64. waldur_api_client/models/customer_request.py +9 -0
  65. waldur_api_client/models/customer_service_account.py +9 -0
  66. waldur_api_client/models/customers_list_field_item.py +1 -0
  67. waldur_api_client/models/customers_retrieve_field_item.py +1 -0
  68. waldur_api_client/models/customers_users_list_o.py +9 -0
  69. waldur_api_client/models/customers_users_list_organization_role_item_type_0.py +10 -0
  70. waldur_api_client/models/customers_users_list_project_role_item_type_0.py +10 -0
  71. waldur_api_client/models/dependency_logic_operator_enum.py +9 -0
  72. waldur_api_client/models/event_subscription.py +1 -1
  73. waldur_api_client/models/event_types_enum.py +4 -0
  74. waldur_api_client/models/group_invitation.py +9 -0
  75. waldur_api_client/models/invitation.py +9 -0
  76. waldur_api_client/models/invoices_items_retrieve_o.py +15 -0
  77. waldur_api_client/models/issue_status.py +103 -0
  78. waldur_api_client/models/issue_status_request.py +78 -0
  79. waldur_api_client/models/issue_status_type_enum.py +9 -0
  80. waldur_api_client/models/kind_enum.py +10 -0
  81. waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +82 -0
  82. waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +82 -0
  83. waldur_api_client/models/managed_rancher_create_node_request.py +186 -0
  84. waldur_api_client/models/marketplace_course_accounts_count_state_item.py +10 -0
  85. waldur_api_client/models/marketplace_course_accounts_list_state_item.py +10 -0
  86. waldur_api_client/models/marketplace_customer_service_accounts_count_state_item.py +10 -0
  87. waldur_api_client/models/marketplace_customer_service_accounts_list_state_item.py +10 -0
  88. waldur_api_client/models/marketplace_project_service_accounts_count_state_item.py +10 -0
  89. waldur_api_client/models/marketplace_project_service_accounts_list_state_item.py +10 -0
  90. waldur_api_client/models/marketplace_service_providers_course_accounts_list_state_item.py +10 -0
  91. waldur_api_client/models/marketplace_service_providers_project_service_accounts_list_state_item.py +10 -0
  92. waldur_api_client/models/marketplace_service_providers_projects_list_field_item.py +1 -0
  93. waldur_api_client/models/nested_security_group_rule.py +223 -0
  94. waldur_api_client/models/{open_stack_nested_security_group_rules_item.py → nested_security_group_rule_request.py} +67 -76
  95. waldur_api_client/models/open_stack_backup_restoration_request.py +0 -22
  96. waldur_api_client/models/open_stack_fixed_ip.py +13 -3
  97. waldur_api_client/models/open_stack_fixed_ip_request.py +7 -2
  98. waldur_api_client/models/open_stack_instance_create_order_attributes.py +20 -20
  99. waldur_api_client/models/open_stack_nested_security_group.py +16 -16
  100. waldur_api_client/models/open_stack_port_ip_update_request.py +6 -2
  101. waldur_api_client/models/open_stack_static_route.py +13 -4
  102. waldur_api_client/models/open_stack_static_route_request.py +7 -3
  103. waldur_api_client/models/open_stack_sub_net.py +15 -2
  104. waldur_api_client/models/open_stack_sub_net_allocation_pool.py +27 -8
  105. waldur_api_client/models/open_stack_sub_net_allocation_pool_request.py +14 -5
  106. waldur_api_client/models/open_stack_sub_net_request.py +15 -2
  107. waldur_api_client/models/patched_customer_request.py +9 -0
  108. waldur_api_client/models/patched_issue_status_request.py +76 -0
  109. waldur_api_client/models/patched_open_stack_sub_net_request.py +15 -2
  110. waldur_api_client/models/patched_project_request.py +17 -0
  111. waldur_api_client/models/patched_question_admin_request.py +17 -0
  112. waldur_api_client/models/patched_rancher_service_request.py +1 -1
  113. waldur_api_client/models/permission_request.py +16 -0
  114. waldur_api_client/models/project.py +17 -0
  115. waldur_api_client/models/project_permission_review.py +166 -0
  116. waldur_api_client/models/project_permissions_reviews_count_o_item.py +11 -0
  117. waldur_api_client/models/project_permissions_reviews_list_o_item.py +11 -0
  118. waldur_api_client/models/project_request.py +17 -0
  119. waldur_api_client/models/project_service_account.py +9 -0
  120. waldur_api_client/models/projects_list_field_item.py +1 -0
  121. waldur_api_client/models/projects_other_users_list_o.py +9 -0
  122. waldur_api_client/models/projects_retrieve_field_item.py +1 -0
  123. waldur_api_client/models/proposal.py +8 -0
  124. waldur_api_client/models/proposal_review.py +8 -0
  125. waldur_api_client/models/question_admin.py +17 -0
  126. waldur_api_client/models/question_admin_request.py +17 -0
  127. waldur_api_client/models/rancher_nested_public_ip.py +25 -7
  128. waldur_api_client/models/rancher_service.py +1 -1
  129. waldur_api_client/models/rancher_service_request.py +1 -1
  130. waldur_api_client/models/rmq_connection.py +8 -3
  131. waldur_api_client/models/rmq_subscription.py +7 -3
  132. waldur_api_client/models/robot_account.py +16 -16
  133. waldur_api_client/models/robot_account_details.py +16 -16
  134. waldur_api_client/models/service_account_state.py +10 -0
  135. waldur_api_client/models/submit_request_response.py +75 -0
  136. waldur_api_client/models/visible_invitation_details.py +9 -0
  137. {waldur_api_client-7.7.7.dist-info → waldur_api_client-7.7.9.dist-info}/METADATA +1 -1
  138. {waldur_api_client-7.7.7.dist-info → waldur_api_client-7.7.9.dist-info}/RECORD +140 -78
  139. {waldur_api_client-7.7.7.dist-info → waldur_api_client-7.7.9.dist-info}/LICENSE +0 -0
  140. {waldur_api_client-7.7.7.dist-info → waldur_api_client-7.7.9.dist-info}/WHEEL +0 -0
@@ -4,45 +4,54 @@ from typing import Any, TypeVar, Union, cast
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
+ from ..models.blank_enum import BlankEnum
8
+ from ..models.direction_enum import DirectionEnum
9
+ from ..models.ethertype_enum import EthertypeEnum
10
+ from ..models.protocol_enum import ProtocolEnum
7
11
  from ..types import UNSET, Unset
8
12
 
9
- T = TypeVar("T", bound="OpenStackNestedSecurityGroupRulesItem")
13
+ T = TypeVar("T", bound="NestedSecurityGroupRuleRequest")
10
14
 
11
15
 
12
16
  @_attrs_define
13
- class OpenStackNestedSecurityGroupRulesItem:
17
+ class NestedSecurityGroupRuleRequest:
14
18
  """
15
19
  Attributes:
16
- id (Union[Unset, int]):
17
- protocol (Union[None, Unset, str]):
18
- from_port (Union[None, Unset, int]):
19
- to_port (Union[None, Unset, int]):
20
- cidr (Union[None, Unset, str]):
21
- remote_group (Union[None, Unset, str]):
22
- direction (Union[Unset, str]):
23
- ethertype (Union[Unset, str]):
24
- description (Union[None, Unset, str]):
20
+ ethertype (Union[Unset, EthertypeEnum]):
21
+ direction (Union[Unset, DirectionEnum]):
22
+ protocol (Union[BlankEnum, ProtocolEnum, Unset]): The network protocol (TCP, UDP, ICMP, or empty for any
23
+ protocol)
24
+ from_port (Union[None, Unset, int]): Starting port number in the range (1-65535)
25
+ to_port (Union[None, Unset, int]): Ending port number in the range (1-65535)
26
+ cidr (Union[None, Unset, str]): CIDR notation for the source/destination network address range
27
+ description (Union[Unset, str]):
25
28
  """
26
29
 
27
- id: Union[Unset, int] = UNSET
28
- protocol: Union[None, Unset, str] = UNSET
30
+ ethertype: Union[Unset, EthertypeEnum] = UNSET
31
+ direction: Union[Unset, DirectionEnum] = UNSET
32
+ protocol: Union[BlankEnum, ProtocolEnum, Unset] = UNSET
29
33
  from_port: Union[None, Unset, int] = UNSET
30
34
  to_port: Union[None, Unset, int] = UNSET
31
35
  cidr: Union[None, Unset, str] = UNSET
32
- remote_group: Union[None, Unset, str] = UNSET
33
- direction: Union[Unset, str] = UNSET
34
- ethertype: Union[Unset, str] = UNSET
35
- description: Union[None, Unset, str] = UNSET
36
+ description: Union[Unset, str] = UNSET
36
37
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
38
 
38
39
  def to_dict(self) -> dict[str, Any]:
39
- id = self.id
40
+ ethertype: Union[Unset, str] = UNSET
41
+ if not isinstance(self.ethertype, Unset):
42
+ ethertype = self.ethertype.value
40
43
 
41
- protocol: Union[None, Unset, str]
44
+ direction: Union[Unset, str] = UNSET
45
+ if not isinstance(self.direction, Unset):
46
+ direction = self.direction.value
47
+
48
+ protocol: Union[Unset, str]
42
49
  if isinstance(self.protocol, Unset):
43
50
  protocol = UNSET
51
+ elif isinstance(self.protocol, ProtocolEnum):
52
+ protocol = self.protocol.value
44
53
  else:
45
- protocol = self.protocol
54
+ protocol = self.protocol.value
46
55
 
47
56
  from_port: Union[None, Unset, int]
48
57
  if isinstance(self.from_port, Unset):
@@ -62,27 +71,15 @@ class OpenStackNestedSecurityGroupRulesItem:
62
71
  else:
63
72
  cidr = self.cidr
64
73
 
65
- remote_group: Union[None, Unset, str]
66
- if isinstance(self.remote_group, Unset):
67
- remote_group = UNSET
68
- else:
69
- remote_group = self.remote_group
70
-
71
- direction = self.direction
72
-
73
- ethertype = self.ethertype
74
-
75
- description: Union[None, Unset, str]
76
- if isinstance(self.description, Unset):
77
- description = UNSET
78
- else:
79
- description = self.description
74
+ description = self.description
80
75
 
81
76
  field_dict: dict[str, Any] = {}
82
77
  field_dict.update(self.additional_properties)
83
78
  field_dict.update({})
84
- if id is not UNSET:
85
- field_dict["id"] = id
79
+ if ethertype is not UNSET:
80
+ field_dict["ethertype"] = ethertype
81
+ if direction is not UNSET:
82
+ field_dict["direction"] = direction
86
83
  if protocol is not UNSET:
87
84
  field_dict["protocol"] = protocol
88
85
  if from_port is not UNSET:
@@ -91,12 +88,6 @@ class OpenStackNestedSecurityGroupRulesItem:
91
88
  field_dict["to_port"] = to_port
92
89
  if cidr is not UNSET:
93
90
  field_dict["cidr"] = cidr
94
- if remote_group is not UNSET:
95
- field_dict["remote_group"] = remote_group
96
- if direction is not UNSET:
97
- field_dict["direction"] = direction
98
- if ethertype is not UNSET:
99
- field_dict["ethertype"] = ethertype
100
91
  if description is not UNSET:
101
92
  field_dict["description"] = description
102
93
 
@@ -105,14 +96,36 @@ class OpenStackNestedSecurityGroupRulesItem:
105
96
  @classmethod
106
97
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
107
98
  d = dict(src_dict)
108
- id = d.pop("id", UNSET)
99
+ _ethertype = d.pop("ethertype", UNSET)
100
+ ethertype: Union[Unset, EthertypeEnum]
101
+ if isinstance(_ethertype, Unset):
102
+ ethertype = UNSET
103
+ else:
104
+ ethertype = EthertypeEnum(_ethertype)
109
105
 
110
- def _parse_protocol(data: object) -> Union[None, Unset, str]:
111
- if data is None:
112
- return data
106
+ _direction = d.pop("direction", UNSET)
107
+ direction: Union[Unset, DirectionEnum]
108
+ if isinstance(_direction, Unset):
109
+ direction = UNSET
110
+ else:
111
+ direction = DirectionEnum(_direction)
112
+
113
+ def _parse_protocol(data: object) -> Union[BlankEnum, ProtocolEnum, Unset]:
113
114
  if isinstance(data, Unset):
114
115
  return data
115
- return cast(Union[None, Unset, str], data)
116
+ try:
117
+ if not isinstance(data, str):
118
+ raise TypeError()
119
+ protocol_type_0 = ProtocolEnum(data)
120
+
121
+ return protocol_type_0
122
+ except: # noqa: E722
123
+ pass
124
+ if not isinstance(data, str):
125
+ raise TypeError()
126
+ protocol_type_1 = BlankEnum(data)
127
+
128
+ return protocol_type_1
116
129
 
117
130
  protocol = _parse_protocol(d.pop("protocol", UNSET))
118
131
 
@@ -143,42 +156,20 @@ class OpenStackNestedSecurityGroupRulesItem:
143
156
 
144
157
  cidr = _parse_cidr(d.pop("cidr", UNSET))
145
158
 
146
- def _parse_remote_group(data: object) -> Union[None, Unset, str]:
147
- if data is None:
148
- return data
149
- if isinstance(data, Unset):
150
- return data
151
- return cast(Union[None, Unset, str], data)
152
-
153
- remote_group = _parse_remote_group(d.pop("remote_group", UNSET))
154
-
155
- direction = d.pop("direction", UNSET)
156
-
157
- ethertype = d.pop("ethertype", UNSET)
158
-
159
- def _parse_description(data: object) -> Union[None, Unset, str]:
160
- if data is None:
161
- return data
162
- if isinstance(data, Unset):
163
- return data
164
- return cast(Union[None, Unset, str], data)
159
+ description = d.pop("description", UNSET)
165
160
 
166
- description = _parse_description(d.pop("description", UNSET))
167
-
168
- open_stack_nested_security_group_rules_item = cls(
169
- id=id,
161
+ nested_security_group_rule_request = cls(
162
+ ethertype=ethertype,
163
+ direction=direction,
170
164
  protocol=protocol,
171
165
  from_port=from_port,
172
166
  to_port=to_port,
173
167
  cidr=cidr,
174
- remote_group=remote_group,
175
- direction=direction,
176
- ethertype=ethertype,
177
168
  description=description,
178
169
  )
179
170
 
180
- open_stack_nested_security_group_rules_item.additional_properties = d
181
- return open_stack_nested_security_group_rules_item
171
+ nested_security_group_rule_request.additional_properties = d
172
+ return nested_security_group_rule_request
182
173
 
183
174
  @property
184
175
  def additional_keys(self) -> list[str]:
@@ -9,7 +9,6 @@ from ..types import UNSET, Unset
9
9
  if TYPE_CHECKING:
10
10
  from ..models.open_stack_nested_floating_ip_request import OpenStackNestedFloatingIPRequest
11
11
  from ..models.open_stack_nested_port_request import OpenStackNestedPortRequest
12
- from ..models.open_stack_nested_security_group_request import OpenStackNestedSecurityGroupRequest
13
12
 
14
13
 
15
14
  T = TypeVar("T", bound="OpenStackBackupRestorationRequest")
@@ -24,8 +23,6 @@ class OpenStackBackupRestorationRequest:
24
23
  name (Union[Unset, str]): New instance name. Leave blank to use source instance name.
25
24
  floating_ips (Union[Unset, list['OpenStackNestedFloatingIPRequest']]): Floating IPs that will be assigned to the
26
25
  restored instance
27
- security_groups (Union[Unset, list['OpenStackNestedSecurityGroupRequest']]): Security groups that will be
28
- assigned to the restored instance
29
26
  ports (Union[Unset, list['OpenStackNestedPortRequest']]): Network ports that will be attached to the restored
30
27
  instance
31
28
  """
@@ -33,7 +30,6 @@ class OpenStackBackupRestorationRequest:
33
30
  flavor: str
34
31
  name: Union[Unset, str] = UNSET
35
32
  floating_ips: Union[Unset, list["OpenStackNestedFloatingIPRequest"]] = UNSET
36
- security_groups: Union[Unset, list["OpenStackNestedSecurityGroupRequest"]] = UNSET
37
33
  ports: Union[Unset, list["OpenStackNestedPortRequest"]] = UNSET
38
34
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
39
35
 
@@ -49,13 +45,6 @@ class OpenStackBackupRestorationRequest:
49
45
  floating_ips_item = floating_ips_item_data.to_dict()
50
46
  floating_ips.append(floating_ips_item)
51
47
 
52
- security_groups: Union[Unset, list[dict[str, Any]]] = UNSET
53
- if not isinstance(self.security_groups, Unset):
54
- security_groups = []
55
- for security_groups_item_data in self.security_groups:
56
- security_groups_item = security_groups_item_data.to_dict()
57
- security_groups.append(security_groups_item)
58
-
59
48
  ports: Union[Unset, list[dict[str, Any]]] = UNSET
60
49
  if not isinstance(self.ports, Unset):
61
50
  ports = []
@@ -74,8 +63,6 @@ class OpenStackBackupRestorationRequest:
74
63
  field_dict["name"] = name
75
64
  if floating_ips is not UNSET:
76
65
  field_dict["floating_ips"] = floating_ips
77
- if security_groups is not UNSET:
78
- field_dict["security_groups"] = security_groups
79
66
  if ports is not UNSET:
80
67
  field_dict["ports"] = ports
81
68
 
@@ -85,7 +72,6 @@ class OpenStackBackupRestorationRequest:
85
72
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
86
73
  from ..models.open_stack_nested_floating_ip_request import OpenStackNestedFloatingIPRequest
87
74
  from ..models.open_stack_nested_port_request import OpenStackNestedPortRequest
88
- from ..models.open_stack_nested_security_group_request import OpenStackNestedSecurityGroupRequest
89
75
 
90
76
  d = dict(src_dict)
91
77
  flavor = d.pop("flavor")
@@ -99,13 +85,6 @@ class OpenStackBackupRestorationRequest:
99
85
 
100
86
  floating_ips.append(floating_ips_item)
101
87
 
102
- security_groups = []
103
- _security_groups = d.pop("security_groups", UNSET)
104
- for security_groups_item_data in _security_groups or []:
105
- security_groups_item = OpenStackNestedSecurityGroupRequest.from_dict(security_groups_item_data)
106
-
107
- security_groups.append(security_groups_item)
108
-
109
88
  ports = []
110
89
  _ports = d.pop("ports", UNSET)
111
90
  for ports_item_data in _ports or []:
@@ -117,7 +96,6 @@ class OpenStackBackupRestorationRequest:
117
96
  flavor=flavor,
118
97
  name=name,
119
98
  floating_ips=floating_ips,
120
- security_groups=security_groups,
121
99
  ports=ports,
122
100
  )
123
101
 
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union
2
+ from typing import Any, TypeVar, Union, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
@@ -22,7 +22,11 @@ class OpenStackFixedIp:
22
22
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
23
23
 
24
24
  def to_dict(self) -> dict[str, Any]:
25
- ip_address = self.ip_address
25
+ ip_address: Union[Unset, str]
26
+ if isinstance(self.ip_address, Unset):
27
+ ip_address = UNSET
28
+ else:
29
+ ip_address = self.ip_address
26
30
 
27
31
  subnet_id = self.subnet_id
28
32
 
@@ -39,7 +43,13 @@ class OpenStackFixedIp:
39
43
  @classmethod
40
44
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
41
45
  d = dict(src_dict)
42
- ip_address = d.pop("ip_address", UNSET)
46
+
47
+ def _parse_ip_address(data: object) -> Union[Unset, str]:
48
+ if isinstance(data, Unset):
49
+ return data
50
+ return cast(Union[Unset, str], data)
51
+
52
+ ip_address = _parse_ip_address(d.pop("ip_address", UNSET))
43
53
 
44
54
  subnet_id = d.pop("subnet_id", UNSET)
45
55
 
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar
2
+ from typing import Any, TypeVar, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
@@ -20,6 +20,7 @@ class OpenStackFixedIpRequest:
20
20
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
21
21
 
22
22
  def to_dict(self) -> dict[str, Any]:
23
+ ip_address: str
23
24
  ip_address = self.ip_address
24
25
 
25
26
  subnet_id = self.subnet_id
@@ -38,7 +39,11 @@ class OpenStackFixedIpRequest:
38
39
  @classmethod
39
40
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
40
41
  d = dict(src_dict)
41
- ip_address = d.pop("ip_address")
42
+
43
+ def _parse_ip_address(data: object) -> str:
44
+ return cast(str, data)
45
+
46
+ ip_address = _parse_ip_address(d.pop("ip_address"))
42
47
 
43
48
  subnet_id = d.pop("subnet_id")
44
49
 
@@ -31,8 +31,6 @@ class OpenStackInstanceCreateOrderAttributes:
31
31
  ports (list['OpenStackNestedPortRequest']): Network ports to attach to the instance
32
32
  system_volume_size (int): Size of the system volume in MiB. Minimum size is 1024 MiB (1 GiB)
33
33
  description (Union[Unset, str]):
34
- security_groups (Union[Unset, list['OpenStackNestedSecurityGroupRequest']]): List of security groups to apply to
35
- the instance
36
34
  floating_ips (Union[Unset, list['OpenStackNestedFloatingIPRequest']]): Floating IPs to assign to the instance
37
35
  system_volume_type (Union[None, Unset, str]): Volume type for the system volume
38
36
  data_volume_size (Union[Unset, int]): Size of the data volume in MiB. Minimum size is 1024 MiB (1 GiB)
@@ -44,6 +42,8 @@ class OpenStackInstanceCreateOrderAttributes:
44
42
  external network
45
43
  data_volumes (Union[Unset, list['OpenStackDataVolumeRequest']]): Additional data volumes to attach to the
46
44
  instance
45
+ security_groups (Union[Unset, list['OpenStackNestedSecurityGroupRequest']]): Security groups to attach to the
46
+ instance
47
47
  """
48
48
 
49
49
  name: str
@@ -52,7 +52,6 @@ class OpenStackInstanceCreateOrderAttributes:
52
52
  ports: list["OpenStackNestedPortRequest"]
53
53
  system_volume_size: int
54
54
  description: Union[Unset, str] = UNSET
55
- security_groups: Union[Unset, list["OpenStackNestedSecurityGroupRequest"]] = UNSET
56
55
  floating_ips: Union[Unset, list["OpenStackNestedFloatingIPRequest"]] = UNSET
57
56
  system_volume_type: Union[None, Unset, str] = UNSET
58
57
  data_volume_size: Union[Unset, int] = UNSET
@@ -62,6 +61,7 @@ class OpenStackInstanceCreateOrderAttributes:
62
61
  availability_zone: Union[None, Unset, str] = UNSET
63
62
  connect_directly_to_external_network: Union[Unset, bool] = UNSET
64
63
  data_volumes: Union[Unset, list["OpenStackDataVolumeRequest"]] = UNSET
64
+ security_groups: Union[Unset, list["OpenStackNestedSecurityGroupRequest"]] = UNSET
65
65
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
66
66
 
67
67
  def to_dict(self) -> dict[str, Any]:
@@ -80,13 +80,6 @@ class OpenStackInstanceCreateOrderAttributes:
80
80
 
81
81
  description = self.description
82
82
 
83
- security_groups: Union[Unset, list[dict[str, Any]]] = UNSET
84
- if not isinstance(self.security_groups, Unset):
85
- security_groups = []
86
- for security_groups_item_data in self.security_groups:
87
- security_groups_item = security_groups_item_data.to_dict()
88
- security_groups.append(security_groups_item)
89
-
90
83
  floating_ips: Union[Unset, list[dict[str, Any]]] = UNSET
91
84
  if not isinstance(self.floating_ips, Unset):
92
85
  floating_ips = []
@@ -127,6 +120,13 @@ class OpenStackInstanceCreateOrderAttributes:
127
120
  data_volumes_item = data_volumes_item_data.to_dict()
128
121
  data_volumes.append(data_volumes_item)
129
122
 
123
+ security_groups: Union[Unset, list[dict[str, Any]]] = UNSET
124
+ if not isinstance(self.security_groups, Unset):
125
+ security_groups = []
126
+ for security_groups_item_data in self.security_groups:
127
+ security_groups_item = security_groups_item_data.to_dict()
128
+ security_groups.append(security_groups_item)
129
+
130
130
  field_dict: dict[str, Any] = {}
131
131
  field_dict.update(self.additional_properties)
132
132
  field_dict.update(
@@ -140,8 +140,6 @@ class OpenStackInstanceCreateOrderAttributes:
140
140
  )
141
141
  if description is not UNSET:
142
142
  field_dict["description"] = description
143
- if security_groups is not UNSET:
144
- field_dict["security_groups"] = security_groups
145
143
  if floating_ips is not UNSET:
146
144
  field_dict["floating_ips"] = floating_ips
147
145
  if system_volume_type is not UNSET:
@@ -160,6 +158,8 @@ class OpenStackInstanceCreateOrderAttributes:
160
158
  field_dict["connect_directly_to_external_network"] = connect_directly_to_external_network
161
159
  if data_volumes is not UNSET:
162
160
  field_dict["data_volumes"] = data_volumes
161
+ if security_groups is not UNSET:
162
+ field_dict["security_groups"] = security_groups
163
163
 
164
164
  return field_dict
165
165
 
@@ -188,13 +188,6 @@ class OpenStackInstanceCreateOrderAttributes:
188
188
 
189
189
  description = d.pop("description", UNSET)
190
190
 
191
- security_groups = []
192
- _security_groups = d.pop("security_groups", UNSET)
193
- for security_groups_item_data in _security_groups or []:
194
- security_groups_item = OpenStackNestedSecurityGroupRequest.from_dict(security_groups_item_data)
195
-
196
- security_groups.append(security_groups_item)
197
-
198
191
  floating_ips = []
199
192
  _floating_ips = d.pop("floating_ips", UNSET)
200
193
  for floating_ips_item_data in _floating_ips or []:
@@ -244,6 +237,13 @@ class OpenStackInstanceCreateOrderAttributes:
244
237
 
245
238
  data_volumes.append(data_volumes_item)
246
239
 
240
+ security_groups = []
241
+ _security_groups = d.pop("security_groups", UNSET)
242
+ for security_groups_item_data in _security_groups or []:
243
+ security_groups_item = OpenStackNestedSecurityGroupRequest.from_dict(security_groups_item_data)
244
+
245
+ security_groups.append(security_groups_item)
246
+
247
247
  open_stack_instance_create_order_attributes = cls(
248
248
  name=name,
249
249
  flavor=flavor,
@@ -251,7 +251,6 @@ class OpenStackInstanceCreateOrderAttributes:
251
251
  ports=ports,
252
252
  system_volume_size=system_volume_size,
253
253
  description=description,
254
- security_groups=security_groups,
255
254
  floating_ips=floating_ips,
256
255
  system_volume_type=system_volume_type,
257
256
  data_volume_size=data_volume_size,
@@ -261,6 +260,7 @@ class OpenStackInstanceCreateOrderAttributes:
261
260
  availability_zone=availability_zone,
262
261
  connect_directly_to_external_network=connect_directly_to_external_network,
263
262
  data_volumes=data_volumes,
263
+ security_groups=security_groups,
264
264
  )
265
265
 
266
266
  open_stack_instance_create_order_attributes.additional_properties = d
@@ -7,7 +7,7 @@ from attrs import field as _attrs_field
7
7
  from ..types import UNSET, Unset
8
8
 
9
9
  if TYPE_CHECKING:
10
- from ..models.open_stack_nested_security_group_rules_item import OpenStackNestedSecurityGroupRulesItem
10
+ from ..models.nested_security_group_rule import NestedSecurityGroupRule
11
11
 
12
12
 
13
13
  T = TypeVar("T", bound="OpenStackNestedSecurityGroup")
@@ -19,16 +19,16 @@ class OpenStackNestedSecurityGroup:
19
19
  Attributes:
20
20
  url (Union[Unset, str]):
21
21
  name (Union[Unset, str]):
22
+ rules (Union[Unset, list['NestedSecurityGroupRule']]):
22
23
  description (Union[Unset, str]):
23
24
  state (Union[Unset, str]):
24
- rules (Union[Unset, list['OpenStackNestedSecurityGroupRulesItem']]):
25
25
  """
26
26
 
27
27
  url: Union[Unset, str] = UNSET
28
28
  name: Union[Unset, str] = UNSET
29
+ rules: Union[Unset, list["NestedSecurityGroupRule"]] = UNSET
29
30
  description: Union[Unset, str] = UNSET
30
31
  state: Union[Unset, str] = UNSET
31
- rules: Union[Unset, list["OpenStackNestedSecurityGroupRulesItem"]] = UNSET
32
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
33
 
34
34
  def to_dict(self) -> dict[str, Any]:
@@ -36,10 +36,6 @@ class OpenStackNestedSecurityGroup:
36
36
 
37
37
  name = self.name
38
38
 
39
- description = self.description
40
-
41
- state = self.state
42
-
43
39
  rules: Union[Unset, list[dict[str, Any]]] = UNSET
44
40
  if not isinstance(self.rules, Unset):
45
41
  rules = []
@@ -47,6 +43,10 @@ class OpenStackNestedSecurityGroup:
47
43
  rules_item = rules_item_data.to_dict()
48
44
  rules.append(rules_item)
49
45
 
46
+ description = self.description
47
+
48
+ state = self.state
49
+
50
50
  field_dict: dict[str, Any] = {}
51
51
  field_dict.update(self.additional_properties)
52
52
  field_dict.update({})
@@ -54,41 +54,41 @@ class OpenStackNestedSecurityGroup:
54
54
  field_dict["url"] = url
55
55
  if name is not UNSET:
56
56
  field_dict["name"] = name
57
+ if rules is not UNSET:
58
+ field_dict["rules"] = rules
57
59
  if description is not UNSET:
58
60
  field_dict["description"] = description
59
61
  if state is not UNSET:
60
62
  field_dict["state"] = state
61
- if rules is not UNSET:
62
- field_dict["rules"] = rules
63
63
 
64
64
  return field_dict
65
65
 
66
66
  @classmethod
67
67
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
68
- from ..models.open_stack_nested_security_group_rules_item import OpenStackNestedSecurityGroupRulesItem
68
+ from ..models.nested_security_group_rule import NestedSecurityGroupRule
69
69
 
70
70
  d = dict(src_dict)
71
71
  url = d.pop("url", UNSET)
72
72
 
73
73
  name = d.pop("name", UNSET)
74
74
 
75
- description = d.pop("description", UNSET)
76
-
77
- state = d.pop("state", UNSET)
78
-
79
75
  rules = []
80
76
  _rules = d.pop("rules", UNSET)
81
77
  for rules_item_data in _rules or []:
82
- rules_item = OpenStackNestedSecurityGroupRulesItem.from_dict(rules_item_data)
78
+ rules_item = NestedSecurityGroupRule.from_dict(rules_item_data)
83
79
 
84
80
  rules.append(rules_item)
85
81
 
82
+ description = d.pop("description", UNSET)
83
+
84
+ state = d.pop("state", UNSET)
85
+
86
86
  open_stack_nested_security_group = cls(
87
87
  url=url,
88
88
  name=name,
89
+ rules=rules,
89
90
  description=description,
90
91
  state=state,
91
- rules=rules,
92
92
  )
93
93
 
94
94
  open_stack_nested_security_group.additional_properties = d
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar
2
+ from typing import Any, TypeVar, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
@@ -22,6 +22,7 @@ class OpenStackPortIPUpdateRequest:
22
22
  def to_dict(self) -> dict[str, Any]:
23
23
  subnet = self.subnet
24
24
 
25
+ ip_address: str
25
26
  ip_address = self.ip_address
26
27
 
27
28
  field_dict: dict[str, Any] = {}
@@ -40,7 +41,10 @@ class OpenStackPortIPUpdateRequest:
40
41
  d = dict(src_dict)
41
42
  subnet = d.pop("subnet")
42
43
 
43
- ip_address = d.pop("ip_address")
44
+ def _parse_ip_address(data: object) -> str:
45
+ return cast(str, data)
46
+
47
+ ip_address = _parse_ip_address(d.pop("ip_address"))
44
48
 
45
49
  open_stack_port_ip_update_request = cls(
46
50
  subnet=subnet,
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union
2
+ from typing import Any, TypeVar, Union, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
@@ -14,7 +14,7 @@ class OpenStackStaticRoute:
14
14
  """
15
15
  Attributes:
16
16
  destination (Union[Unset, str]):
17
- nexthop (Union[Unset, str]):
17
+ nexthop (Union[Unset, str]): An IPv4 or IPv6 address.
18
18
  """
19
19
 
20
20
  destination: Union[Unset, str] = UNSET
@@ -24,7 +24,11 @@ class OpenStackStaticRoute:
24
24
  def to_dict(self) -> dict[str, Any]:
25
25
  destination = self.destination
26
26
 
27
- nexthop = self.nexthop
27
+ nexthop: Union[Unset, str]
28
+ if isinstance(self.nexthop, Unset):
29
+ nexthop = UNSET
30
+ else:
31
+ nexthop = self.nexthop
28
32
 
29
33
  field_dict: dict[str, Any] = {}
30
34
  field_dict.update(self.additional_properties)
@@ -41,7 +45,12 @@ class OpenStackStaticRoute:
41
45
  d = dict(src_dict)
42
46
  destination = d.pop("destination", UNSET)
43
47
 
44
- nexthop = d.pop("nexthop", UNSET)
48
+ def _parse_nexthop(data: object) -> Union[Unset, str]:
49
+ if isinstance(data, Unset):
50
+ return data
51
+ return cast(Union[Unset, str], data)
52
+
53
+ nexthop = _parse_nexthop(d.pop("nexthop", UNSET))
45
54
 
46
55
  open_stack_static_route = cls(
47
56
  destination=destination,
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar
2
+ from typing import Any, TypeVar, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
@@ -12,7 +12,7 @@ class OpenStackStaticRouteRequest:
12
12
  """
13
13
  Attributes:
14
14
  destination (str):
15
- nexthop (str):
15
+ nexthop (str): An IPv4 or IPv6 address.
16
16
  """
17
17
 
18
18
  destination: str
@@ -22,6 +22,7 @@ class OpenStackStaticRouteRequest:
22
22
  def to_dict(self) -> dict[str, Any]:
23
23
  destination = self.destination
24
24
 
25
+ nexthop: str
25
26
  nexthop = self.nexthop
26
27
 
27
28
  field_dict: dict[str, Any] = {}
@@ -40,7 +41,10 @@ class OpenStackStaticRouteRequest:
40
41
  d = dict(src_dict)
41
42
  destination = d.pop("destination")
42
43
 
43
- nexthop = d.pop("nexthop")
44
+ def _parse_nexthop(data: object) -> str:
45
+ return cast(str, data)
46
+
47
+ nexthop = _parse_nexthop(d.pop("nexthop"))
44
48
 
45
49
  open_stack_static_route_request = cls(
46
50
  destination=destination,