graphiant-sdk 25.12.1__py3-none-any.whl → 26.1.1__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.
- graphiant_sdk/__init__.py +2982 -1471
- graphiant_sdk/api/default_api.py +1712 -23
- graphiant_sdk/api_client.py +16 -9
- graphiant_sdk/configuration.py +9 -3
- graphiant_sdk/exceptions.py +6 -3
- graphiant_sdk/models/__init__.py +19 -1
- graphiant_sdk/models/assurance_dns_proxy_entry.py +97 -0
- graphiant_sdk/models/iam_customer.py +6 -2
- graphiant_sdk/models/mana_v2_b2b_extranet_service_customer_match_details.py +15 -2
- graphiant_sdk/models/mana_v2_device.py +7 -1
- graphiant_sdk/models/mana_v2_edge_device_config.py +7 -1
- graphiant_sdk/models/mana_v2_interface.py +7 -1
- graphiant_sdk/models/mana_v2_interface_config.py +7 -1
- graphiant_sdk/models/mana_v2_interface_ma_csec.py +115 -0
- graphiant_sdk/models/mana_v2_lag_interface_config.py +7 -1
- graphiant_sdk/models/mana_v2_ma_csec_configuration.py +150 -0
- graphiant_sdk/models/mana_v2_nullable_ma_csec_configuration.py +91 -0
- graphiant_sdk/models/mana_v2_nullable_psk_configuration.py +91 -0
- graphiant_sdk/models/mana_v2_nullable_sak_configuration.py +91 -0
- graphiant_sdk/models/mana_v2_nullable_sla_conformance.py +91 -0
- graphiant_sdk/models/mana_v2_psk_configuration.py +99 -0
- graphiant_sdk/models/mana_v2_sak_configuration.py +93 -0
- graphiant_sdk/models/mana_v2_sla_conformance.py +91 -0
- graphiant_sdk/models/v1_auth_login_post_response.py +10 -2
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_prefixes_put_request.py +95 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_prefixes_put_response.py +87 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_service_status_put_request.py +89 -0
- graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_service_status_put_response.py +87 -0
- graphiant_sdk/models/v2_assurance_create_dnsproxy_entry_post_request.py +91 -0
- graphiant_sdk/models/v2_assurance_create_dnsproxy_entry_post_response.py +87 -0
- graphiant_sdk/models/v2_assurance_read_dnsproxy_list_get_response.py +95 -0
- graphiant_sdk/models/v2_assurance_update_dnsproxy_entry_post_request.py +91 -0
- graphiant_sdk/rest.py +7 -2
- {graphiant_sdk-25.12.1.dist-info → graphiant_sdk-26.1.1.dist-info}/METADATA +5 -3
- {graphiant_sdk-25.12.1.dist-info → graphiant_sdk-26.1.1.dist-info}/RECORD +56 -20
- {graphiant_sdk-25.12.1.dist-info → graphiant_sdk-26.1.1.dist-info}/WHEEL +1 -1
- test/test_assurance_dns_proxy_entry.py +70 -0
- test/test_mana_v2_interface_ma_csec.py +72 -0
- test/test_mana_v2_ma_csec_configuration.py +124 -0
- test/test_mana_v2_nullable_ma_csec_configuration.py +90 -0
- test/test_mana_v2_nullable_psk_configuration.py +58 -0
- test/test_mana_v2_nullable_sak_configuration.py +55 -0
- test/test_mana_v2_nullable_sla_conformance.py +54 -0
- test/test_mana_v2_psk_configuration.py +57 -0
- test/test_mana_v2_sak_configuration.py +54 -0
- test/test_mana_v2_sla_conformance.py +53 -0
- test/test_v1_extranets_b2b_peering_consumer_id_prefixes_put_request.py +60 -0
- test/test_v1_extranets_b2b_peering_consumer_id_prefixes_put_response.py +51 -0
- test/test_v1_extranets_b2b_peering_match_service_to_customer_service_status_put_request.py +54 -0
- test/test_v1_extranets_b2b_peering_match_service_to_customer_service_status_put_response.py +51 -0
- test/test_v2_assurance_create_dnsproxy_entry_post_request.py +61 -0
- test/test_v2_assurance_create_dnsproxy_entry_post_response.py +51 -0
- test/test_v2_assurance_read_dnsproxy_list_get_response.py +63 -0
- test/test_v2_assurance_update_dnsproxy_entry_post_request.py +61 -0
- {graphiant_sdk-25.12.1.dist-info → graphiant_sdk-26.1.1.dist-info}/licenses/LICENSE +0 -0
- {graphiant_sdk-25.12.1.dist-info → graphiant_sdk-26.1.1.dist-info}/top_level.txt +0 -0
|
@@ -23,6 +23,7 @@ from typing_extensions import Annotated
|
|
|
23
23
|
from graphiant_sdk.models.mana_v2_interface_i_psec_config import ManaV2InterfaceIPsecConfig
|
|
24
24
|
from graphiant_sdk.models.mana_v2_interface_ip_config import ManaV2InterfaceIpConfig
|
|
25
25
|
from graphiant_sdk.models.mana_v2_nullable_interface_vlan_config import ManaV2NullableInterfaceVlanConfig
|
|
26
|
+
from graphiant_sdk.models.mana_v2_nullable_ma_csec_configuration import ManaV2NullableMaCsecConfiguration
|
|
26
27
|
from graphiant_sdk.models.mana_v2_nullable_tcp_mss_v4 import ManaV2NullableTcpMssV4
|
|
27
28
|
from graphiant_sdk.models.mana_v2_nullable_tcp_mss_v6 import ManaV2NullableTcpMssV6
|
|
28
29
|
from typing import Optional, Set
|
|
@@ -43,6 +44,7 @@ class ManaV2InterfaceConfig(BaseModel):
|
|
|
43
44
|
lan: Optional[StrictStr] = None
|
|
44
45
|
lldp_enabled: Optional[StrictBool] = Field(default=None, alias="lldpEnabled")
|
|
45
46
|
loopback: Optional[StrictBool] = None
|
|
47
|
+
macsec: Optional[ManaV2NullableMaCsecConfiguration] = None
|
|
46
48
|
max_transmission_unit: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="maxTransmissionUnit")
|
|
47
49
|
security_zone: Optional[StrictStr] = Field(default=None, alias="securityZone")
|
|
48
50
|
speed: Optional[StrictInt] = None
|
|
@@ -52,7 +54,7 @@ class ManaV2InterfaceConfig(BaseModel):
|
|
|
52
54
|
tcp_mss_v6: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="tcpMssV6")
|
|
53
55
|
v4_tcp_mss: Optional[ManaV2NullableTcpMssV4] = Field(default=None, alias="v4TcpMss")
|
|
54
56
|
v6_tcp_mss: Optional[ManaV2NullableTcpMssV6] = Field(default=None, alias="v6TcpMss")
|
|
55
|
-
__properties: ClassVar[List[str]] = ["adminStatus", "alias", "circuit", "description", "duplex", "ipsec", "ipv4", "ipv6", "lan", "lldpEnabled", "loopback", "maxTransmissionUnit", "securityZone", "speed", "subinterfaces", "tcpMss", "tcpMssV4", "tcpMssV6", "v4TcpMss", "v6TcpMss"]
|
|
57
|
+
__properties: ClassVar[List[str]] = ["adminStatus", "alias", "circuit", "description", "duplex", "ipsec", "ipv4", "ipv6", "lan", "lldpEnabled", "loopback", "macsec", "maxTransmissionUnit", "securityZone", "speed", "subinterfaces", "tcpMss", "tcpMssV4", "tcpMssV6", "v4TcpMss", "v6TcpMss"]
|
|
56
58
|
|
|
57
59
|
model_config = ConfigDict(
|
|
58
60
|
populate_by_name=True,
|
|
@@ -102,6 +104,9 @@ class ManaV2InterfaceConfig(BaseModel):
|
|
|
102
104
|
# override the default output from pydantic by calling `to_dict()` of ipv6
|
|
103
105
|
if self.ipv6:
|
|
104
106
|
_dict['ipv6'] = self.ipv6.to_dict()
|
|
107
|
+
# override the default output from pydantic by calling `to_dict()` of macsec
|
|
108
|
+
if self.macsec:
|
|
109
|
+
_dict['macsec'] = self.macsec.to_dict()
|
|
105
110
|
# override the default output from pydantic by calling `to_dict()` of each value in subinterfaces (dict)
|
|
106
111
|
_field_dict = {}
|
|
107
112
|
if self.subinterfaces:
|
|
@@ -138,6 +143,7 @@ class ManaV2InterfaceConfig(BaseModel):
|
|
|
138
143
|
"lan": obj.get("lan"),
|
|
139
144
|
"lldpEnabled": obj.get("lldpEnabled"),
|
|
140
145
|
"loopback": obj.get("loopback"),
|
|
146
|
+
"macsec": ManaV2NullableMaCsecConfiguration.from_dict(obj["macsec"]) if obj.get("macsec") is not None else None,
|
|
141
147
|
"maxTransmissionUnit": obj.get("maxTransmissionUnit"),
|
|
142
148
|
"securityZone": obj.get("securityZone"),
|
|
143
149
|
"speed": obj.get("speed"),
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Graphiant APIs
|
|
5
|
+
|
|
6
|
+
Graphiant API documentation.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from graphiant_sdk.models.mana_v2_psk_configuration import ManaV2PskConfiguration
|
|
23
|
+
from graphiant_sdk.models.mana_v2_sak_configuration import ManaV2SakConfiguration
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ManaV2InterfaceMaCsec(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ManaV2InterfaceMaCsec
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
enabled: Optional[StrictBool] = None
|
|
32
|
+
encryption_enforcement_mode: Optional[StrictStr] = Field(default=None, alias="encryptionEnforcementMode")
|
|
33
|
+
key_server_priority: Optional[StrictInt] = Field(default=None, alias="keyServerPriority")
|
|
34
|
+
psk_configurations: Optional[List[ManaV2PskConfiguration]] = Field(default=None, alias="pskConfigurations")
|
|
35
|
+
sak_configurations: Optional[List[ManaV2SakConfiguration]] = Field(default=None, alias="sakConfigurations")
|
|
36
|
+
split_sak_config_by_lag_member: Optional[StrictBool] = Field(default=None, alias="splitSakConfigByLagMember")
|
|
37
|
+
transparent_vlan: Optional[StrictBool] = Field(default=None, alias="transparentVlan")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["enabled", "encryptionEnforcementMode", "keyServerPriority", "pskConfigurations", "sakConfigurations", "splitSakConfigByLagMember", "transparentVlan"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of ManaV2InterfaceMaCsec from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in psk_configurations (list)
|
|
80
|
+
_items = []
|
|
81
|
+
if self.psk_configurations:
|
|
82
|
+
for _item_psk_configurations in self.psk_configurations:
|
|
83
|
+
if _item_psk_configurations:
|
|
84
|
+
_items.append(_item_psk_configurations.to_dict())
|
|
85
|
+
_dict['pskConfigurations'] = _items
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in sak_configurations (list)
|
|
87
|
+
_items = []
|
|
88
|
+
if self.sak_configurations:
|
|
89
|
+
for _item_sak_configurations in self.sak_configurations:
|
|
90
|
+
if _item_sak_configurations:
|
|
91
|
+
_items.append(_item_sak_configurations.to_dict())
|
|
92
|
+
_dict['sakConfigurations'] = _items
|
|
93
|
+
return _dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
97
|
+
"""Create an instance of ManaV2InterfaceMaCsec from a dict"""
|
|
98
|
+
if obj is None:
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
if not isinstance(obj, dict):
|
|
102
|
+
return cls.model_validate(obj)
|
|
103
|
+
|
|
104
|
+
_obj = cls.model_validate({
|
|
105
|
+
"enabled": obj.get("enabled"),
|
|
106
|
+
"encryptionEnforcementMode": obj.get("encryptionEnforcementMode"),
|
|
107
|
+
"keyServerPriority": obj.get("keyServerPriority"),
|
|
108
|
+
"pskConfigurations": [ManaV2PskConfiguration.from_dict(_item) for _item in obj["pskConfigurations"]] if obj.get("pskConfigurations") is not None else None,
|
|
109
|
+
"sakConfigurations": [ManaV2SakConfiguration.from_dict(_item) for _item in obj["sakConfigurations"]] if obj.get("sakConfigurations") is not None else None,
|
|
110
|
+
"splitSakConfigByLagMember": obj.get("splitSakConfigByLagMember"),
|
|
111
|
+
"transparentVlan": obj.get("transparentVlan")
|
|
112
|
+
})
|
|
113
|
+
return _obj
|
|
114
|
+
|
|
115
|
+
|
|
@@ -24,6 +24,7 @@ from graphiant_sdk.models.mana_v2_interface_ip_config import ManaV2InterfaceIpCo
|
|
|
24
24
|
from graphiant_sdk.models.mana_v2_lacp_config import ManaV2LacpConfig
|
|
25
25
|
from graphiant_sdk.models.mana_v2_nullable_interface_lagvlan_config import ManaV2NullableInterfaceLagvlanConfig
|
|
26
26
|
from graphiant_sdk.models.mana_v2_nullable_lag_member_interface import ManaV2NullableLagMemberInterface
|
|
27
|
+
from graphiant_sdk.models.mana_v2_nullable_ma_csec_configuration import ManaV2NullableMaCsecConfiguration
|
|
27
28
|
from typing import Optional, Set
|
|
28
29
|
from typing_extensions import Self
|
|
29
30
|
|
|
@@ -38,11 +39,12 @@ class ManaV2LagInterfaceConfig(BaseModel):
|
|
|
38
39
|
ipv6: Optional[ManaV2InterfaceIpConfig] = None
|
|
39
40
|
lacp: Optional[ManaV2LacpConfig] = None
|
|
40
41
|
lag_members: Optional[Dict[str, ManaV2NullableLagMemberInterface]] = Field(default=None, alias="lagMembers")
|
|
42
|
+
macsec: Optional[ManaV2NullableMaCsecConfiguration] = None
|
|
41
43
|
minimum_members: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="minimumMembers")
|
|
42
44
|
mtu: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
43
45
|
segment: Optional[StrictStr] = None
|
|
44
46
|
subinterfaces: Optional[Dict[str, ManaV2NullableInterfaceLagvlanConfig]] = None
|
|
45
|
-
__properties: ClassVar[List[str]] = ["adminStatus", "alias", "description", "ipv4", "ipv6", "lacp", "lagMembers", "minimumMembers", "mtu", "segment", "subinterfaces"]
|
|
47
|
+
__properties: ClassVar[List[str]] = ["adminStatus", "alias", "description", "ipv4", "ipv6", "lacp", "lagMembers", "macsec", "minimumMembers", "mtu", "segment", "subinterfaces"]
|
|
46
48
|
|
|
47
49
|
model_config = ConfigDict(
|
|
48
50
|
populate_by_name=True,
|
|
@@ -99,6 +101,9 @@ class ManaV2LagInterfaceConfig(BaseModel):
|
|
|
99
101
|
if self.lag_members[_key_lag_members]:
|
|
100
102
|
_field_dict[_key_lag_members] = self.lag_members[_key_lag_members].to_dict()
|
|
101
103
|
_dict['lagMembers'] = _field_dict
|
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of macsec
|
|
105
|
+
if self.macsec:
|
|
106
|
+
_dict['macsec'] = self.macsec.to_dict()
|
|
102
107
|
# override the default output from pydantic by calling `to_dict()` of each value in subinterfaces (dict)
|
|
103
108
|
_field_dict = {}
|
|
104
109
|
if self.subinterfaces:
|
|
@@ -130,6 +135,7 @@ class ManaV2LagInterfaceConfig(BaseModel):
|
|
|
130
135
|
)
|
|
131
136
|
if obj.get("lagMembers") is not None
|
|
132
137
|
else None,
|
|
138
|
+
"macsec": ManaV2NullableMaCsecConfiguration.from_dict(obj["macsec"]) if obj.get("macsec") is not None else None,
|
|
133
139
|
"minimumMembers": obj.get("minimumMembers"),
|
|
134
140
|
"mtu": obj.get("mtu"),
|
|
135
141
|
"segment": obj.get("segment"),
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Graphiant APIs
|
|
5
|
+
|
|
6
|
+
Graphiant API documentation.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from graphiant_sdk.models.mana_v2_nullable_psk_configuration import ManaV2NullablePskConfiguration
|
|
23
|
+
from graphiant_sdk.models.mana_v2_nullable_sak_configuration import ManaV2NullableSakConfiguration
|
|
24
|
+
from graphiant_sdk.models.mana_v2_psk_configuration import ManaV2PskConfiguration
|
|
25
|
+
from graphiant_sdk.models.mana_v2_sak_configuration import ManaV2SakConfiguration
|
|
26
|
+
from typing import Optional, Set
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class ManaV2MaCsecConfiguration(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
ManaV2MaCsecConfiguration
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
enabled: StrictBool = Field(description="Whether MACsec is enabled or disabled (required)")
|
|
34
|
+
encryption_enforcement_mode: StrictStr = Field(description="The encryption enforcement mode (required)", alias="encryptionEnforcementMode")
|
|
35
|
+
global_sak_configuration: ManaV2NullableSakConfiguration = Field(alias="globalSakConfiguration")
|
|
36
|
+
key_server_priority: Optional[StrictInt] = Field(default=None, description="The priority of the key server. Lower number means higher priority.", alias="keyServerPriority")
|
|
37
|
+
psk_configurations: Optional[List[ManaV2PskConfiguration]] = Field(default=None, alias="pskConfigurations")
|
|
38
|
+
psk_configurations_by_nickname: Dict[str, ManaV2NullablePskConfiguration] = Field(alias="pskConfigurationsByNickname")
|
|
39
|
+
sak_configurations: Optional[List[ManaV2SakConfiguration]] = Field(default=None, alias="sakConfigurations")
|
|
40
|
+
sak_configurations_by_lag_member_interface_id: Dict[str, ManaV2NullableSakConfiguration] = Field(alias="sakConfigurationsByLagMemberInterfaceId")
|
|
41
|
+
split_sak_config_by_lag_member: Optional[StrictBool] = Field(default=None, description="Whether to allow individual SAK configurations for each lag member", alias="splitSakConfigByLagMember")
|
|
42
|
+
transparent_vlan: Optional[StrictBool] = Field(default=None, description="Whether transparent VLAN is enabled or disabled", alias="transparentVlan")
|
|
43
|
+
__properties: ClassVar[List[str]] = ["enabled", "encryptionEnforcementMode", "globalSakConfiguration", "keyServerPriority", "pskConfigurations", "pskConfigurationsByNickname", "sakConfigurations", "sakConfigurationsByLagMemberInterfaceId", "splitSakConfigByLagMember", "transparentVlan"]
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of ManaV2MaCsecConfiguration from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of global_sak_configuration
|
|
85
|
+
if self.global_sak_configuration:
|
|
86
|
+
_dict['globalSakConfiguration'] = self.global_sak_configuration.to_dict()
|
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of each item in psk_configurations (list)
|
|
88
|
+
_items = []
|
|
89
|
+
if self.psk_configurations:
|
|
90
|
+
for _item_psk_configurations in self.psk_configurations:
|
|
91
|
+
if _item_psk_configurations:
|
|
92
|
+
_items.append(_item_psk_configurations.to_dict())
|
|
93
|
+
_dict['pskConfigurations'] = _items
|
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of each value in psk_configurations_by_nickname (dict)
|
|
95
|
+
_field_dict = {}
|
|
96
|
+
if self.psk_configurations_by_nickname:
|
|
97
|
+
for _key_psk_configurations_by_nickname in self.psk_configurations_by_nickname:
|
|
98
|
+
if self.psk_configurations_by_nickname[_key_psk_configurations_by_nickname]:
|
|
99
|
+
_field_dict[_key_psk_configurations_by_nickname] = self.psk_configurations_by_nickname[_key_psk_configurations_by_nickname].to_dict()
|
|
100
|
+
_dict['pskConfigurationsByNickname'] = _field_dict
|
|
101
|
+
# override the default output from pydantic by calling `to_dict()` of each item in sak_configurations (list)
|
|
102
|
+
_items = []
|
|
103
|
+
if self.sak_configurations:
|
|
104
|
+
for _item_sak_configurations in self.sak_configurations:
|
|
105
|
+
if _item_sak_configurations:
|
|
106
|
+
_items.append(_item_sak_configurations.to_dict())
|
|
107
|
+
_dict['sakConfigurations'] = _items
|
|
108
|
+
# override the default output from pydantic by calling `to_dict()` of each value in sak_configurations_by_lag_member_interface_id (dict)
|
|
109
|
+
_field_dict = {}
|
|
110
|
+
if self.sak_configurations_by_lag_member_interface_id:
|
|
111
|
+
for _key_sak_configurations_by_lag_member_interface_id in self.sak_configurations_by_lag_member_interface_id:
|
|
112
|
+
if self.sak_configurations_by_lag_member_interface_id[_key_sak_configurations_by_lag_member_interface_id]:
|
|
113
|
+
_field_dict[_key_sak_configurations_by_lag_member_interface_id] = self.sak_configurations_by_lag_member_interface_id[_key_sak_configurations_by_lag_member_interface_id].to_dict()
|
|
114
|
+
_dict['sakConfigurationsByLagMemberInterfaceId'] = _field_dict
|
|
115
|
+
return _dict
|
|
116
|
+
|
|
117
|
+
@classmethod
|
|
118
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
119
|
+
"""Create an instance of ManaV2MaCsecConfiguration from a dict"""
|
|
120
|
+
if obj is None:
|
|
121
|
+
return None
|
|
122
|
+
|
|
123
|
+
if not isinstance(obj, dict):
|
|
124
|
+
return cls.model_validate(obj)
|
|
125
|
+
|
|
126
|
+
_obj = cls.model_validate({
|
|
127
|
+
"enabled": obj.get("enabled"),
|
|
128
|
+
"encryptionEnforcementMode": obj.get("encryptionEnforcementMode"),
|
|
129
|
+
"globalSakConfiguration": ManaV2NullableSakConfiguration.from_dict(obj["globalSakConfiguration"]) if obj.get("globalSakConfiguration") is not None else None,
|
|
130
|
+
"keyServerPriority": obj.get("keyServerPriority"),
|
|
131
|
+
"pskConfigurations": [ManaV2PskConfiguration.from_dict(_item) for _item in obj["pskConfigurations"]] if obj.get("pskConfigurations") is not None else None,
|
|
132
|
+
"pskConfigurationsByNickname": dict(
|
|
133
|
+
(_k, ManaV2NullablePskConfiguration.from_dict(_v))
|
|
134
|
+
for _k, _v in obj["pskConfigurationsByNickname"].items()
|
|
135
|
+
)
|
|
136
|
+
if obj.get("pskConfigurationsByNickname") is not None
|
|
137
|
+
else None,
|
|
138
|
+
"sakConfigurations": [ManaV2SakConfiguration.from_dict(_item) for _item in obj["sakConfigurations"]] if obj.get("sakConfigurations") is not None else None,
|
|
139
|
+
"sakConfigurationsByLagMemberInterfaceId": dict(
|
|
140
|
+
(_k, ManaV2NullableSakConfiguration.from_dict(_v))
|
|
141
|
+
for _k, _v in obj["sakConfigurationsByLagMemberInterfaceId"].items()
|
|
142
|
+
)
|
|
143
|
+
if obj.get("sakConfigurationsByLagMemberInterfaceId") is not None
|
|
144
|
+
else None,
|
|
145
|
+
"splitSakConfigByLagMember": obj.get("splitSakConfigByLagMember"),
|
|
146
|
+
"transparentVlan": obj.get("transparentVlan")
|
|
147
|
+
})
|
|
148
|
+
return _obj
|
|
149
|
+
|
|
150
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Graphiant APIs
|
|
5
|
+
|
|
6
|
+
Graphiant API documentation.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from graphiant_sdk.models.mana_v2_ma_csec_configuration import ManaV2MaCsecConfiguration
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ManaV2NullableMaCsecConfiguration(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ManaV2NullableMaCsecConfiguration
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
macsec: Optional[ManaV2MaCsecConfiguration] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["macsec"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ManaV2NullableMaCsecConfiguration from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of macsec
|
|
73
|
+
if self.macsec:
|
|
74
|
+
_dict['macsec'] = self.macsec.to_dict()
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of ManaV2NullableMaCsecConfiguration from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"macsec": ManaV2MaCsecConfiguration.from_dict(obj["macsec"]) if obj.get("macsec") is not None else None
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Graphiant APIs
|
|
5
|
+
|
|
6
|
+
Graphiant API documentation.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from graphiant_sdk.models.mana_v2_psk_configuration import ManaV2PskConfiguration
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ManaV2NullablePskConfiguration(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ManaV2NullablePskConfiguration
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
psk: Optional[ManaV2PskConfiguration] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["psk"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ManaV2NullablePskConfiguration from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of psk
|
|
73
|
+
if self.psk:
|
|
74
|
+
_dict['psk'] = self.psk.to_dict()
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of ManaV2NullablePskConfiguration from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"psk": ManaV2PskConfiguration.from_dict(obj["psk"]) if obj.get("psk") is not None else None
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Graphiant APIs
|
|
5
|
+
|
|
6
|
+
Graphiant API documentation.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from graphiant_sdk.models.mana_v2_sak_configuration import ManaV2SakConfiguration
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ManaV2NullableSakConfiguration(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ManaV2NullableSakConfiguration
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
sak: Optional[ManaV2SakConfiguration] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["sak"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ManaV2NullableSakConfiguration from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of sak
|
|
73
|
+
if self.sak:
|
|
74
|
+
_dict['sak'] = self.sak.to_dict()
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of ManaV2NullableSakConfiguration from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"sak": ManaV2SakConfiguration.from_dict(obj["sak"]) if obj.get("sak") is not None else None
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|