waldur-api-client 7.8.2__py3-none-any.whl → 7.8.4__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 (174) hide show
  1. waldur_api_client/api/booking_resources/booking_resources_count.py +18 -0
  2. waldur_api_client/api/booking_resources/booking_resources_list.py +18 -0
  3. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_template_count.py +125 -0
  4. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_template_retrieve.py +126 -0
  5. waldur_api_client/api/marketplace_project_update_requests/marketplace_project_update_requests_count.py +18 -18
  6. waldur_api_client/api/marketplace_project_update_requests/marketplace_project_update_requests_list.py +18 -18
  7. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_tos_stats_retrieve.py +146 -0
  8. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +18 -0
  9. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +18 -0
  10. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_move_resource.py +22 -0
  11. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_update_options.py +168 -0
  12. waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +18 -0
  13. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +18 -0
  14. waldur_api_client/api/marketplace_resources/marketplace_resources_move_resource.py +22 -0
  15. waldur_api_client/api/marketplace_resources/marketplace_resources_renew.py +166 -0
  16. waldur_api_client/api/marketplace_service_providers/service_provider_checklists_summary.py +189 -0
  17. waldur_api_client/api/onboarding/__init__.py +1 -0
  18. waldur_api_client/api/onboarding/onboarding_supported_countries_retrieve.py +74 -0
  19. waldur_api_client/api/onboarding_justifications/__init__.py +1 -0
  20. waldur_api_client/api/onboarding_justifications/onboarding_justifications_attach_document.py +211 -0
  21. waldur_api_client/api/onboarding_justifications/onboarding_justifications_count.py +172 -0
  22. waldur_api_client/api/onboarding_justifications/onboarding_justifications_create.py +150 -0
  23. waldur_api_client/api/onboarding_justifications/onboarding_justifications_create_justification.py +154 -0
  24. waldur_api_client/api/onboarding_justifications/onboarding_justifications_destroy.py +89 -0
  25. waldur_api_client/api/onboarding_justifications/onboarding_justifications_list.py +175 -0
  26. waldur_api_client/api/onboarding_justifications/onboarding_justifications_partial_update.py +164 -0
  27. waldur_api_client/api/onboarding_justifications/onboarding_justifications_retrieve.py +142 -0
  28. waldur_api_client/api/onboarding_justifications/onboarding_justifications_update.py +164 -0
  29. waldur_api_client/api/onboarding_verifications/__init__.py +1 -0
  30. waldur_api_client/api/onboarding_verifications/onboarding_verifications_count.py +172 -0
  31. waldur_api_client/api/onboarding_verifications/onboarding_verifications_create.py +150 -0
  32. waldur_api_client/api/onboarding_verifications/onboarding_verifications_create_customer.py +144 -0
  33. waldur_api_client/api/onboarding_verifications/onboarding_verifications_destroy.py +89 -0
  34. waldur_api_client/api/onboarding_verifications/onboarding_verifications_list.py +175 -0
  35. waldur_api_client/api/onboarding_verifications/onboarding_verifications_partial_update.py +164 -0
  36. waldur_api_client/api/onboarding_verifications/onboarding_verifications_retrieve.py +142 -0
  37. waldur_api_client/api/onboarding_verifications/onboarding_verifications_update.py +164 -0
  38. waldur_api_client/api/onboarding_verifications/onboarding_verifications_validate_company.py +154 -0
  39. waldur_api_client/api/openstack_backups/openstack_backups_restore.py +10 -10
  40. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_count.py +33 -0
  41. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_create.py +154 -0
  42. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_destroy.py +91 -0
  43. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_list.py +33 -0
  44. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_partial_update.py +164 -0
  45. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_update.py +164 -0
  46. waldur_api_client/api/openstack_networks/openstack_networks_rbac_policy_create.py +24 -22
  47. waldur_api_client/api/projects/projects_checklist_template_count.py +125 -0
  48. waldur_api_client/api/projects/projects_checklist_template_retrieve.py +126 -0
  49. waldur_api_client/api/proposal_proposals/proposal_proposals_checklist_template_count.py +125 -0
  50. waldur_api_client/api/proposal_proposals/proposal_proposals_checklist_template_retrieve.py +126 -0
  51. waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_offerings_list.py +15 -0
  52. waldur_api_client/api/rancher_services/rancher_services_create.py +22 -22
  53. waldur_api_client/models/__init__.py +88 -10
  54. waldur_api_client/models/azure_sql_server_create_order_attributes.py +5 -10
  55. waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +7 -12
  56. waldur_api_client/models/booking_resource.py +9 -34
  57. waldur_api_client/models/booking_resources_list_field_item.py +1 -3
  58. waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -3
  59. waldur_api_client/models/call_round.py +4 -4
  60. waldur_api_client/models/checklist_template.py +99 -0
  61. waldur_api_client/models/checklist_template_checklist.py +44 -0
  62. waldur_api_client/models/constance_settings.py +54 -0
  63. waldur_api_client/models/constance_settings_request.py +54 -0
  64. waldur_api_client/models/constance_settings_request_form.py +54 -0
  65. waldur_api_client/models/constance_settings_request_multipart.py +99 -0
  66. waldur_api_client/models/customer.py +9 -0
  67. waldur_api_client/models/customers_list_field_item.py +1 -0
  68. waldur_api_client/models/customers_retrieve_field_item.py +1 -0
  69. waldur_api_client/models/deprecated_network_rbac_policy.py +137 -0
  70. waldur_api_client/models/deprecated_network_rbac_policy_request.py +78 -0
  71. waldur_api_client/models/event_groups_enum.py +1 -0
  72. waldur_api_client/models/event_types_enum.py +3 -0
  73. waldur_api_client/models/generic_order_attributes.py +1 -2
  74. waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +1 -3
  75. waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +1 -3
  76. waldur_api_client/models/marketplace_orders_list_field_item.py +1 -3
  77. waldur_api_client/models/marketplace_orders_retrieve_field_item.py +1 -3
  78. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +1 -3
  79. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -3
  80. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -3
  81. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +1 -3
  82. waldur_api_client/models/marketplace_resources_list_field_item.py +1 -3
  83. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -3
  84. waldur_api_client/models/marketplace_robot_accounts_list_field_item.py +2 -1
  85. waldur_api_client/models/marketplace_robot_accounts_retrieve_field_item.py +2 -1
  86. waldur_api_client/models/marketplace_service_providers_projects_list_field_item.py +1 -0
  87. waldur_api_client/models/merged_plugin_options.py +27 -0
  88. waldur_api_client/models/merged_plugin_options_request.py +27 -0
  89. waldur_api_client/models/move_resource_request.py +65 -0
  90. waldur_api_client/models/nested_round.py +5 -5
  91. waldur_api_client/models/network_rbac_policy_request.py +8 -0
  92. waldur_api_client/models/notification.py +9 -9
  93. waldur_api_client/models/{notification_context_fields.py → notification_context_schema.py} +6 -6
  94. waldur_api_client/models/notification_template_detail_serializers.py +9 -3
  95. waldur_api_client/models/offering_component.py +79 -0
  96. waldur_api_client/models/offering_component_request.py +80 -0
  97. waldur_api_client/models/onboarding_company_validation_request_request.py +88 -0
  98. waldur_api_client/models/onboarding_justification.py +183 -0
  99. waldur_api_client/models/onboarding_justification_create_request.py +68 -0
  100. waldur_api_client/models/onboarding_justification_documentation.py +108 -0
  101. waldur_api_client/models/onboarding_justification_documentation_request.py +84 -0
  102. waldur_api_client/models/onboarding_justification_documentation_request_form.py +84 -0
  103. waldur_api_client/models/onboarding_justification_documentation_request_multipart.py +98 -0
  104. waldur_api_client/models/onboarding_justification_request.py +75 -0
  105. waldur_api_client/models/onboarding_verification.py +250 -0
  106. waldur_api_client/models/onboarding_verification_request.py +128 -0
  107. waldur_api_client/models/onboarding_verification_status_enum.py +12 -0
  108. waldur_api_client/models/open_stack_backup_restoration.py +3 -5
  109. waldur_api_client/models/open_stack_backup_restoration_create_request.py +141 -0
  110. waldur_api_client/models/open_stack_backup_restoration_request.py +22 -30
  111. waldur_api_client/models/open_stack_create_floating_ip_request.py +89 -0
  112. waldur_api_client/models/open_stack_create_port_request.py +104 -0
  113. waldur_api_client/models/open_stack_instance.py +13 -29
  114. waldur_api_client/models/open_stack_instance_create_order_attributes.py +67 -54
  115. waldur_api_client/models/open_stack_instance_floating_i_ps_update_request.py +5 -5
  116. waldur_api_client/models/open_stack_instance_ports_update_request.py +5 -5
  117. waldur_api_client/models/open_stack_instance_request.py +1 -67
  118. waldur_api_client/models/open_stack_nested_port_request.py +0 -9
  119. waldur_api_client/models/{open_stack_nested_security_group_request.py → open_stack_security_group_hyperlink_request.py} +14 -14
  120. waldur_api_client/models/open_stack_server_group_hyperlink_request.py +59 -0
  121. waldur_api_client/models/open_stack_tenant_create_order_attributes.py +9 -14
  122. waldur_api_client/models/open_stack_volume_create_order_attributes.py +8 -13
  123. waldur_api_client/models/openstack_instances_list_field_item.py +0 -7
  124. waldur_api_client/models/openstack_instances_retrieve_field_item.py +0 -7
  125. waldur_api_client/models/order_create.py +8 -0
  126. waldur_api_client/models/order_details.py +9 -34
  127. waldur_api_client/models/patched_network_rbac_policy_request.py +85 -0
  128. waldur_api_client/models/patched_onboarding_justification_request.py +77 -0
  129. waldur_api_client/models/patched_onboarding_verification_request.py +128 -0
  130. waldur_api_client/models/patched_open_stack_instance_request.py +1 -67
  131. waldur_api_client/models/patched_project_credit_request.py +13 -0
  132. waldur_api_client/models/patched_project_request.py +1 -2
  133. waldur_api_client/models/patched_project_request_form.py +1 -2
  134. waldur_api_client/models/patched_project_request_multipart.py +1 -2
  135. waldur_api_client/models/project.py +10 -2
  136. waldur_api_client/models/project_credit.py +13 -0
  137. waldur_api_client/models/project_credit_request.py +13 -0
  138. waldur_api_client/models/{rancher_nested_security_group.py → project_hyperlink_request.py} +5 -5
  139. waldur_api_client/models/project_request.py +1 -2
  140. waldur_api_client/models/project_request_form.py +1 -2
  141. waldur_api_client/models/project_request_multipart.py +1 -2
  142. waldur_api_client/models/projects_list_field_item.py +1 -0
  143. waldur_api_client/models/projects_retrieve_field_item.py +1 -0
  144. waldur_api_client/models/protected_round.py +4 -4
  145. waldur_api_client/models/question.py +102 -0
  146. waldur_api_client/models/{open_stack_data_volume.py → question_options.py} +27 -29
  147. waldur_api_client/models/rancher_clusters_list_field_item.py +0 -1
  148. waldur_api_client/models/rancher_clusters_retrieve_field_item.py +0 -1
  149. waldur_api_client/models/rancher_service_create.py +508 -0
  150. waldur_api_client/models/rancher_service_create_marketplace_offering_plugin_options_type_0.py +44 -0
  151. waldur_api_client/models/rancher_service_create_request.py +185 -0
  152. waldur_api_client/models/rancher_service_request.py +16 -19
  153. waldur_api_client/models/rancher_workload_create.py +59 -0
  154. waldur_api_client/models/rancher_workload_create_request.py +59 -0
  155. waldur_api_client/models/resource.py +9 -34
  156. waldur_api_client/models/resource_renew_request.py +83 -0
  157. waldur_api_client/models/resource_renew_request_limits.py +44 -0
  158. waldur_api_client/models/robot_account_details.py +22 -13
  159. waldur_api_client/models/{status_enum.py → round_status.py} +1 -1
  160. waldur_api_client/models/service_provider_checklist_summary.py +98 -0
  161. waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +4 -9
  162. waldur_api_client/models/time_series_to_s_data.py +69 -0
  163. waldur_api_client/models/to_s_consent_dashboard.py +155 -0
  164. waldur_api_client/models/update_offering_component_request.py +79 -0
  165. waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +11 -16
  166. waldur_api_client/models/validation_decision_enum.py +10 -0
  167. waldur_api_client/models/validation_method_enum.py +8 -0
  168. waldur_api_client/models/version_adoption.py +67 -0
  169. waldur_api_client/models/vmware_nested_network.py +0 -25
  170. waldur_api_client/models/vmware_nested_network_request.py +6 -14
  171. {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.4.dist-info}/METADATA +1 -1
  172. {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.4.dist-info}/RECORD +174 -101
  173. {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.4.dist-info}/WHEEL +0 -0
  174. {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.4.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,128 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import Any, TypeVar, Union, cast
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+ from dateutil.parser import isoparse
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ T = TypeVar("T", bound="OnboardingVerificationRequest")
12
+
13
+
14
+ @_attrs_define
15
+ class OnboardingVerificationRequest:
16
+ """
17
+ Attributes:
18
+ user (int): User requesting company onboarding
19
+ country (str): ISO country code (e.g., 'EE' for Estonia)
20
+ legal_person_identifier (str): Official company registration code
21
+ legal_name (Union[Unset, str]): Claimed company name (optional, for reference)
22
+ user_submitted_customer_metadata (Union[Unset, Any]): Additional customer metadata submitted by user for manual
23
+ verification cases. Should contain valid Customer model fields.
24
+ expires_at (Union[None, Unset, datetime.datetime]): When this verification expires
25
+ """
26
+
27
+ user: int
28
+ country: str
29
+ legal_person_identifier: str
30
+ legal_name: Union[Unset, str] = UNSET
31
+ user_submitted_customer_metadata: Union[Unset, Any] = UNSET
32
+ expires_at: Union[None, Unset, datetime.datetime] = UNSET
33
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> dict[str, Any]:
36
+ user = self.user
37
+
38
+ country = self.country
39
+
40
+ legal_person_identifier = self.legal_person_identifier
41
+
42
+ legal_name = self.legal_name
43
+
44
+ user_submitted_customer_metadata = self.user_submitted_customer_metadata
45
+
46
+ expires_at: Union[None, Unset, str]
47
+ if isinstance(self.expires_at, Unset):
48
+ expires_at = UNSET
49
+ elif isinstance(self.expires_at, datetime.datetime):
50
+ expires_at = self.expires_at.isoformat()
51
+ else:
52
+ expires_at = self.expires_at
53
+
54
+ field_dict: dict[str, Any] = {}
55
+ field_dict.update(self.additional_properties)
56
+ field_dict.update(
57
+ {
58
+ "user": user,
59
+ "country": country,
60
+ "legal_person_identifier": legal_person_identifier,
61
+ }
62
+ )
63
+ if legal_name is not UNSET:
64
+ field_dict["legal_name"] = legal_name
65
+ if user_submitted_customer_metadata is not UNSET:
66
+ field_dict["user_submitted_customer_metadata"] = user_submitted_customer_metadata
67
+ if expires_at is not UNSET:
68
+ field_dict["expires_at"] = expires_at
69
+
70
+ return field_dict
71
+
72
+ @classmethod
73
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
74
+ d = dict(src_dict)
75
+ user = d.pop("user")
76
+
77
+ country = d.pop("country")
78
+
79
+ legal_person_identifier = d.pop("legal_person_identifier")
80
+
81
+ legal_name = d.pop("legal_name", UNSET)
82
+
83
+ user_submitted_customer_metadata = d.pop("user_submitted_customer_metadata", UNSET)
84
+
85
+ def _parse_expires_at(data: object) -> Union[None, Unset, datetime.datetime]:
86
+ if data is None:
87
+ return data
88
+ if isinstance(data, Unset):
89
+ return data
90
+ try:
91
+ if not isinstance(data, str):
92
+ raise TypeError()
93
+ expires_at_type_0 = isoparse(data)
94
+
95
+ return expires_at_type_0
96
+ except: # noqa: E722
97
+ pass
98
+ return cast(Union[None, Unset, datetime.datetime], data)
99
+
100
+ expires_at = _parse_expires_at(d.pop("expires_at", UNSET))
101
+
102
+ onboarding_verification_request = cls(
103
+ user=user,
104
+ country=country,
105
+ legal_person_identifier=legal_person_identifier,
106
+ legal_name=legal_name,
107
+ user_submitted_customer_metadata=user_submitted_customer_metadata,
108
+ expires_at=expires_at,
109
+ )
110
+
111
+ onboarding_verification_request.additional_properties = d
112
+ return onboarding_verification_request
113
+
114
+ @property
115
+ def additional_keys(self) -> list[str]:
116
+ return list(self.additional_properties.keys())
117
+
118
+ def __getitem__(self, key: str) -> Any:
119
+ return self.additional_properties[key]
120
+
121
+ def __setitem__(self, key: str, value: Any) -> None:
122
+ self.additional_properties[key] = value
123
+
124
+ def __delitem__(self, key: str) -> None:
125
+ del self.additional_properties[key]
126
+
127
+ def __contains__(self, key: str) -> bool:
128
+ return key in self.additional_properties
@@ -0,0 +1,12 @@
1
+ from enum import Enum
2
+
3
+
4
+ class OnboardingVerificationStatusEnum(str, Enum):
5
+ ESCALATED = "escalated"
6
+ EXPIRED = "expired"
7
+ FAILED = "failed"
8
+ PENDING = "pending"
9
+ VERIFIED = "verified"
10
+
11
+ def __str__(self) -> str:
12
+ return str(self.value)
@@ -28,11 +28,9 @@ class OpenStackBackupRestoration:
28
28
  flavor (Union[Unset, str]): Flavor to be used for the restored instance. If not specified, original instance
29
29
  flavor will be used
30
30
  name (Union[Unset, str]): New instance name. Leave blank to use source instance name.
31
- floating_ips (Union[Unset, list['OpenStackNestedFloatingIP']]): Floating IPs that will be assigned to the
32
- restored instance
33
- security_groups (Union[Unset, list['OpenStackNestedSecurityGroup']]): Security groups that will be assigned to
34
- the restored instance
35
- ports (Union[Unset, list['OpenStackNestedPort']]): Network ports that will be attached to the restored instance
31
+ floating_ips (Union[Unset, list['OpenStackNestedFloatingIP']]):
32
+ security_groups (Union[Unset, list['OpenStackNestedSecurityGroup']]):
33
+ ports (Union[Unset, list['OpenStackNestedPort']]):
36
34
  """
37
35
 
38
36
  uuid: Union[Unset, UUID] = UNSET
@@ -0,0 +1,141 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.open_stack_create_floating_ip_request import OpenStackCreateFloatingIPRequest
11
+ from ..models.open_stack_create_port_request import OpenStackCreatePortRequest
12
+ from ..models.open_stack_security_group_hyperlink_request import OpenStackSecurityGroupHyperlinkRequest
13
+
14
+
15
+ T = TypeVar("T", bound="OpenStackBackupRestorationCreateRequest")
16
+
17
+
18
+ @_attrs_define
19
+ class OpenStackBackupRestorationCreateRequest:
20
+ """
21
+ Attributes:
22
+ flavor (str): Flavor to be used for the restored instance. If not specified, original instance flavor will be
23
+ used
24
+ name (Union[Unset, str]): New instance name. Leave blank to use source instance name.
25
+ floating_ips (Union[Unset, list['OpenStackCreateFloatingIPRequest']]): Floating IPs that will be assigned to the
26
+ restored instance
27
+ security_groups (Union[Unset, list['OpenStackSecurityGroupHyperlinkRequest']]): Security groups that will be
28
+ assigned to the restored instance
29
+ ports (Union[Unset, list['OpenStackCreatePortRequest']]): Network ports that will be attached to the restored
30
+ instance
31
+ """
32
+
33
+ flavor: str
34
+ name: Union[Unset, str] = UNSET
35
+ floating_ips: Union[Unset, list["OpenStackCreateFloatingIPRequest"]] = UNSET
36
+ security_groups: Union[Unset, list["OpenStackSecurityGroupHyperlinkRequest"]] = UNSET
37
+ ports: Union[Unset, list["OpenStackCreatePortRequest"]] = UNSET
38
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
39
+
40
+ def to_dict(self) -> dict[str, Any]:
41
+ flavor = self.flavor
42
+
43
+ name = self.name
44
+
45
+ floating_ips: Union[Unset, list[dict[str, Any]]] = UNSET
46
+ if not isinstance(self.floating_ips, Unset):
47
+ floating_ips = []
48
+ for floating_ips_item_data in self.floating_ips:
49
+ floating_ips_item = floating_ips_item_data.to_dict()
50
+ floating_ips.append(floating_ips_item)
51
+
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
+ ports: Union[Unset, list[dict[str, Any]]] = UNSET
60
+ if not isinstance(self.ports, Unset):
61
+ ports = []
62
+ for ports_item_data in self.ports:
63
+ ports_item = ports_item_data.to_dict()
64
+ ports.append(ports_item)
65
+
66
+ field_dict: dict[str, Any] = {}
67
+ field_dict.update(self.additional_properties)
68
+ field_dict.update(
69
+ {
70
+ "flavor": flavor,
71
+ }
72
+ )
73
+ if name is not UNSET:
74
+ field_dict["name"] = name
75
+ if floating_ips is not UNSET:
76
+ field_dict["floating_ips"] = floating_ips
77
+ if security_groups is not UNSET:
78
+ field_dict["security_groups"] = security_groups
79
+ if ports is not UNSET:
80
+ field_dict["ports"] = ports
81
+
82
+ return field_dict
83
+
84
+ @classmethod
85
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
86
+ from ..models.open_stack_create_floating_ip_request import OpenStackCreateFloatingIPRequest
87
+ from ..models.open_stack_create_port_request import OpenStackCreatePortRequest
88
+ from ..models.open_stack_security_group_hyperlink_request import OpenStackSecurityGroupHyperlinkRequest
89
+
90
+ d = dict(src_dict)
91
+ flavor = d.pop("flavor")
92
+
93
+ name = d.pop("name", UNSET)
94
+
95
+ floating_ips = []
96
+ _floating_ips = d.pop("floating_ips", UNSET)
97
+ for floating_ips_item_data in _floating_ips or []:
98
+ floating_ips_item = OpenStackCreateFloatingIPRequest.from_dict(floating_ips_item_data)
99
+
100
+ floating_ips.append(floating_ips_item)
101
+
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 = OpenStackSecurityGroupHyperlinkRequest.from_dict(security_groups_item_data)
106
+
107
+ security_groups.append(security_groups_item)
108
+
109
+ ports = []
110
+ _ports = d.pop("ports", UNSET)
111
+ for ports_item_data in _ports or []:
112
+ ports_item = OpenStackCreatePortRequest.from_dict(ports_item_data)
113
+
114
+ ports.append(ports_item)
115
+
116
+ open_stack_backup_restoration_create_request = cls(
117
+ flavor=flavor,
118
+ name=name,
119
+ floating_ips=floating_ips,
120
+ security_groups=security_groups,
121
+ ports=ports,
122
+ )
123
+
124
+ open_stack_backup_restoration_create_request.additional_properties = d
125
+ return open_stack_backup_restoration_create_request
126
+
127
+ @property
128
+ def additional_keys(self) -> list[str]:
129
+ return list(self.additional_properties.keys())
130
+
131
+ def __getitem__(self, key: str) -> Any:
132
+ return self.additional_properties[key]
133
+
134
+ def __setitem__(self, key: str, value: Any) -> None:
135
+ self.additional_properties[key] = value
136
+
137
+ def __delitem__(self, key: str) -> None:
138
+ del self.additional_properties[key]
139
+
140
+ def __contains__(self, key: str) -> bool:
141
+ return key in self.additional_properties
@@ -20,51 +20,43 @@ class OpenStackBackupRestorationRequest:
20
20
  Attributes:
21
21
  flavor (str): Flavor to be used for the restored instance. If not specified, original instance flavor will be
22
22
  used
23
+ floating_ips (list['OpenStackNestedFloatingIPRequest']):
24
+ ports (list['OpenStackNestedPortRequest']):
23
25
  name (Union[Unset, str]): New instance name. Leave blank to use source instance name.
24
- floating_ips (Union[Unset, list['OpenStackNestedFloatingIPRequest']]): Floating IPs that will be assigned to the
25
- restored instance
26
- ports (Union[Unset, list['OpenStackNestedPortRequest']]): Network ports that will be attached to the restored
27
- instance
28
26
  """
29
27
 
30
28
  flavor: str
29
+ floating_ips: list["OpenStackNestedFloatingIPRequest"]
30
+ ports: list["OpenStackNestedPortRequest"]
31
31
  name: Union[Unset, str] = UNSET
32
- floating_ips: Union[Unset, list["OpenStackNestedFloatingIPRequest"]] = UNSET
33
- ports: Union[Unset, list["OpenStackNestedPortRequest"]] = UNSET
34
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
35
33
 
36
34
  def to_dict(self) -> dict[str, Any]:
37
35
  flavor = self.flavor
38
36
 
39
- name = self.name
37
+ floating_ips = []
38
+ for floating_ips_item_data in self.floating_ips:
39
+ floating_ips_item = floating_ips_item_data.to_dict()
40
+ floating_ips.append(floating_ips_item)
40
41
 
41
- floating_ips: Union[Unset, list[dict[str, Any]]] = UNSET
42
- if not isinstance(self.floating_ips, Unset):
43
- floating_ips = []
44
- for floating_ips_item_data in self.floating_ips:
45
- floating_ips_item = floating_ips_item_data.to_dict()
46
- floating_ips.append(floating_ips_item)
42
+ ports = []
43
+ for ports_item_data in self.ports:
44
+ ports_item = ports_item_data.to_dict()
45
+ ports.append(ports_item)
47
46
 
48
- ports: Union[Unset, list[dict[str, Any]]] = UNSET
49
- if not isinstance(self.ports, Unset):
50
- ports = []
51
- for ports_item_data in self.ports:
52
- ports_item = ports_item_data.to_dict()
53
- ports.append(ports_item)
47
+ name = self.name
54
48
 
55
49
  field_dict: dict[str, Any] = {}
56
50
  field_dict.update(self.additional_properties)
57
51
  field_dict.update(
58
52
  {
59
53
  "flavor": flavor,
54
+ "floating_ips": floating_ips,
55
+ "ports": ports,
60
56
  }
61
57
  )
62
58
  if name is not UNSET:
63
59
  field_dict["name"] = name
64
- if floating_ips is not UNSET:
65
- field_dict["floating_ips"] = floating_ips
66
- if ports is not UNSET:
67
- field_dict["ports"] = ports
68
60
 
69
61
  return field_dict
70
62
 
@@ -76,27 +68,27 @@ class OpenStackBackupRestorationRequest:
76
68
  d = dict(src_dict)
77
69
  flavor = d.pop("flavor")
78
70
 
79
- name = d.pop("name", UNSET)
80
-
81
71
  floating_ips = []
82
- _floating_ips = d.pop("floating_ips", UNSET)
83
- for floating_ips_item_data in _floating_ips or []:
72
+ _floating_ips = d.pop("floating_ips")
73
+ for floating_ips_item_data in _floating_ips:
84
74
  floating_ips_item = OpenStackNestedFloatingIPRequest.from_dict(floating_ips_item_data)
85
75
 
86
76
  floating_ips.append(floating_ips_item)
87
77
 
88
78
  ports = []
89
- _ports = d.pop("ports", UNSET)
90
- for ports_item_data in _ports or []:
79
+ _ports = d.pop("ports")
80
+ for ports_item_data in _ports:
91
81
  ports_item = OpenStackNestedPortRequest.from_dict(ports_item_data)
92
82
 
93
83
  ports.append(ports_item)
94
84
 
85
+ name = d.pop("name", UNSET)
86
+
95
87
  open_stack_backup_restoration_request = cls(
96
88
  flavor=flavor,
97
- name=name,
98
89
  floating_ips=floating_ips,
99
90
  ports=ports,
91
+ name=name,
100
92
  )
101
93
 
102
94
  open_stack_backup_restoration_request.additional_properties = d
@@ -0,0 +1,89 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="OpenStackCreateFloatingIPRequest")
10
+
11
+
12
+ @_attrs_define
13
+ class OpenStackCreateFloatingIPRequest:
14
+ """
15
+ Attributes:
16
+ subnet (str):
17
+ url (Union[Unset, str]):
18
+ ip_address (Union[Unset, str]): Existing floating IP address in selected OpenStack tenant to be assigned to new
19
+ virtual machine
20
+ """
21
+
22
+ subnet: str
23
+ url: Union[Unset, str] = UNSET
24
+ ip_address: Union[Unset, str] = UNSET
25
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26
+
27
+ def to_dict(self) -> dict[str, Any]:
28
+ subnet = self.subnet
29
+
30
+ url = self.url
31
+
32
+ ip_address: Union[Unset, str]
33
+ if isinstance(self.ip_address, Unset):
34
+ ip_address = UNSET
35
+ else:
36
+ ip_address = self.ip_address
37
+
38
+ field_dict: dict[str, Any] = {}
39
+ field_dict.update(self.additional_properties)
40
+ field_dict.update(
41
+ {
42
+ "subnet": subnet,
43
+ }
44
+ )
45
+ if url is not UNSET:
46
+ field_dict["url"] = url
47
+ if ip_address is not UNSET:
48
+ field_dict["ip_address"] = ip_address
49
+
50
+ return field_dict
51
+
52
+ @classmethod
53
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
54
+ d = dict(src_dict)
55
+ subnet = d.pop("subnet")
56
+
57
+ url = d.pop("url", UNSET)
58
+
59
+ def _parse_ip_address(data: object) -> Union[Unset, str]:
60
+ if isinstance(data, Unset):
61
+ return data
62
+ return cast(Union[Unset, str], data)
63
+
64
+ ip_address = _parse_ip_address(d.pop("ip_address", UNSET))
65
+
66
+ open_stack_create_floating_ip_request = cls(
67
+ subnet=subnet,
68
+ url=url,
69
+ ip_address=ip_address,
70
+ )
71
+
72
+ open_stack_create_floating_ip_request.additional_properties = d
73
+ return open_stack_create_floating_ip_request
74
+
75
+ @property
76
+ def additional_keys(self) -> list[str]:
77
+ return list(self.additional_properties.keys())
78
+
79
+ def __getitem__(self, key: str) -> Any:
80
+ return self.additional_properties[key]
81
+
82
+ def __setitem__(self, key: str, value: Any) -> None:
83
+ self.additional_properties[key] = value
84
+
85
+ def __delitem__(self, key: str) -> None:
86
+ del self.additional_properties[key]
87
+
88
+ def __contains__(self, key: str) -> bool:
89
+ return key in self.additional_properties
@@ -0,0 +1,104 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.open_stack_fixed_ip_request import OpenStackFixedIpRequest
11
+
12
+
13
+ T = TypeVar("T", bound="OpenStackCreatePortRequest")
14
+
15
+
16
+ @_attrs_define
17
+ class OpenStackCreatePortRequest:
18
+ """
19
+ Attributes:
20
+ fixed_ips (Union[Unset, list['OpenStackFixedIpRequest']]):
21
+ subnet (Union[None, Unset, str]): Subnet to which this port belongs
22
+ port (Union[Unset, str]):
23
+ """
24
+
25
+ fixed_ips: Union[Unset, list["OpenStackFixedIpRequest"]] = UNSET
26
+ subnet: Union[None, Unset, str] = UNSET
27
+ port: Union[Unset, str] = UNSET
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ fixed_ips: Union[Unset, list[dict[str, Any]]] = UNSET
32
+ if not isinstance(self.fixed_ips, Unset):
33
+ fixed_ips = []
34
+ for fixed_ips_item_data in self.fixed_ips:
35
+ fixed_ips_item = fixed_ips_item_data.to_dict()
36
+ fixed_ips.append(fixed_ips_item)
37
+
38
+ subnet: Union[None, Unset, str]
39
+ if isinstance(self.subnet, Unset):
40
+ subnet = UNSET
41
+ else:
42
+ subnet = self.subnet
43
+
44
+ port = self.port
45
+
46
+ field_dict: dict[str, Any] = {}
47
+ field_dict.update(self.additional_properties)
48
+ field_dict.update({})
49
+ if fixed_ips is not UNSET:
50
+ field_dict["fixed_ips"] = fixed_ips
51
+ if subnet is not UNSET:
52
+ field_dict["subnet"] = subnet
53
+ if port is not UNSET:
54
+ field_dict["port"] = port
55
+
56
+ return field_dict
57
+
58
+ @classmethod
59
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
60
+ from ..models.open_stack_fixed_ip_request import OpenStackFixedIpRequest
61
+
62
+ d = dict(src_dict)
63
+ fixed_ips = []
64
+ _fixed_ips = d.pop("fixed_ips", UNSET)
65
+ for fixed_ips_item_data in _fixed_ips or []:
66
+ fixed_ips_item = OpenStackFixedIpRequest.from_dict(fixed_ips_item_data)
67
+
68
+ fixed_ips.append(fixed_ips_item)
69
+
70
+ def _parse_subnet(data: object) -> Union[None, Unset, str]:
71
+ if data is None:
72
+ return data
73
+ if isinstance(data, Unset):
74
+ return data
75
+ return cast(Union[None, Unset, str], data)
76
+
77
+ subnet = _parse_subnet(d.pop("subnet", UNSET))
78
+
79
+ port = d.pop("port", UNSET)
80
+
81
+ open_stack_create_port_request = cls(
82
+ fixed_ips=fixed_ips,
83
+ subnet=subnet,
84
+ port=port,
85
+ )
86
+
87
+ open_stack_create_port_request.additional_properties = d
88
+ return open_stack_create_port_request
89
+
90
+ @property
91
+ def additional_keys(self) -> list[str]:
92
+ return list(self.additional_properties.keys())
93
+
94
+ def __getitem__(self, key: str) -> Any:
95
+ return self.additional_properties[key]
96
+
97
+ def __setitem__(self, key: str, value: Any) -> None:
98
+ self.additional_properties[key] = value
99
+
100
+ def __delitem__(self, key: str) -> None:
101
+ del self.additional_properties[key]
102
+
103
+ def __contains__(self, key: str) -> bool:
104
+ return key in self.additional_properties
@@ -70,11 +70,10 @@ class OpenStackInstance:
70
70
  flavor_disk (Union[Unset, int]): Flavor disk size in MiB
71
71
  flavor_name (Union[Unset, str]): Name of the flavor used by this instance
72
72
  volumes (Union[Unset, list['OpenStackNestedVolume']]): List of volumes attached to the instance
73
- security_groups (Union[Unset, list['OpenStackNestedSecurityGroup']]): List of security groups to apply to the
74
- instance
75
- server_group (Union['OpenStackNestedServerGroup', None, Unset]): Server group for instance scheduling policy
76
- floating_ips (Union[Unset, list['OpenStackNestedFloatingIP']]): Floating IPs to assign to the instance
77
- ports (Union[Unset, list['OpenStackNestedPort']]): Network ports to attach to the instance
73
+ security_groups (Union[Unset, list['OpenStackNestedSecurityGroup']]):
74
+ server_group (Union[Unset, OpenStackNestedServerGroup]):
75
+ floating_ips (Union[Unset, list['OpenStackNestedFloatingIP']]):
76
+ ports (Union[Unset, list['OpenStackNestedPort']]):
78
77
  availability_zone (Union[None, Unset, str]): Availability zone where this instance is located
79
78
  availability_zone_name (Union[Unset, str]): Name of the availability zone where instance is located
80
79
  connect_directly_to_external_network (Union[Unset, bool]): If True, instance will be connected directly to
@@ -142,7 +141,7 @@ class OpenStackInstance:
142
141
  flavor_name: Union[Unset, str] = UNSET
143
142
  volumes: Union[Unset, list["OpenStackNestedVolume"]] = UNSET
144
143
  security_groups: Union[Unset, list["OpenStackNestedSecurityGroup"]] = UNSET
145
- server_group: Union["OpenStackNestedServerGroup", None, Unset] = UNSET
144
+ server_group: Union[Unset, "OpenStackNestedServerGroup"] = UNSET
146
145
  floating_ips: Union[Unset, list["OpenStackNestedFloatingIP"]] = UNSET
147
146
  ports: Union[Unset, list["OpenStackNestedPort"]] = UNSET
148
147
  availability_zone: Union[None, Unset, str] = UNSET
@@ -174,7 +173,6 @@ class OpenStackInstance:
174
173
  from ..models.open_stack_instance_marketplace_offering_plugin_options_type_0 import (
175
174
  OpenStackInstanceMarketplaceOfferingPluginOptionsType0,
176
175
  )
177
- from ..models.open_stack_nested_server_group import OpenStackNestedServerGroup
178
176
  from ..models.rancher_cluster_reference import RancherClusterReference
179
177
 
180
178
  url = self.url
@@ -309,13 +307,9 @@ class OpenStackInstance:
309
307
  security_groups_item = security_groups_item_data.to_dict()
310
308
  security_groups.append(security_groups_item)
311
309
 
312
- server_group: Union[None, Unset, dict[str, Any]]
313
- if isinstance(self.server_group, Unset):
314
- server_group = UNSET
315
- elif isinstance(self.server_group, OpenStackNestedServerGroup):
310
+ server_group: Union[Unset, dict[str, Any]] = UNSET
311
+ if not isinstance(self.server_group, Unset):
316
312
  server_group = self.server_group.to_dict()
317
- else:
318
- server_group = self.server_group
319
313
 
320
314
  floating_ips: Union[Unset, list[dict[str, Any]]] = UNSET
321
315
  if not isinstance(self.floating_ips, Unset):
@@ -749,22 +743,12 @@ class OpenStackInstance:
749
743
 
750
744
  security_groups.append(security_groups_item)
751
745
 
752
- def _parse_server_group(data: object) -> Union["OpenStackNestedServerGroup", None, Unset]:
753
- if data is None:
754
- return data
755
- if isinstance(data, Unset):
756
- return data
757
- try:
758
- if not isinstance(data, dict):
759
- raise TypeError()
760
- server_group_type_1 = OpenStackNestedServerGroup.from_dict(data)
761
-
762
- return server_group_type_1
763
- except: # noqa: E722
764
- pass
765
- return cast(Union["OpenStackNestedServerGroup", None, Unset], data)
766
-
767
- server_group = _parse_server_group(d.pop("server_group", UNSET))
746
+ _server_group = d.pop("server_group", UNSET)
747
+ server_group: Union[Unset, OpenStackNestedServerGroup]
748
+ if isinstance(_server_group, Unset):
749
+ server_group = UNSET
750
+ else:
751
+ server_group = OpenStackNestedServerGroup.from_dict(_server_group)
768
752
 
769
753
  floating_ips = []
770
754
  _floating_ips = d.pop("floating_ips", UNSET)