scc-firewall-manager-sdk 1.15.358__py3-none-any.whl → 1.15.389__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 scc-firewall-manager-sdk might be problematic. Click here for more details.
- scc_firewall_manager_sdk/__init__.py +3 -1
- scc_firewall_manager_sdk/api/asa_interfaces_api.py +72 -72
- scc_firewall_manager_sdk/api/device_health_aggregations_api.py +6 -6
- scc_firewall_manager_sdk/api/device_upgrades_api.py +12 -12
- scc_firewall_manager_sdk/api/interface_health_aggregations_api.py +6 -6
- scc_firewall_manager_sdk/api/msp_device_upgrades_api.py +29 -0
- scc_firewall_manager_sdk/api_client.py +1 -1
- scc_firewall_manager_sdk/configuration.py +1 -1
- scc_firewall_manager_sdk/models/__init__.py +2 -0
- scc_firewall_manager_sdk/models/cdo_transaction.py +12 -12
- scc_firewall_manager_sdk/models/completion_status_dto.py +104 -0
- scc_firewall_manager_sdk/models/device_upgrade_status_dto.py +15 -35
- scc_firewall_manager_sdk/models/msp_upgrade_ftd_devices_input.py +97 -0
- scc_firewall_manager_sdk/models/msp_upgrade_runs_attribute_values.py +17 -2
- {scc_firewall_manager_sdk-1.15.358.dist-info → scc_firewall_manager_sdk-1.15.389.dist-info}/METADATA +1 -1
- {scc_firewall_manager_sdk-1.15.358.dist-info → scc_firewall_manager_sdk-1.15.389.dist-info}/RECORD +18 -16
- {scc_firewall_manager_sdk-1.15.358.dist-info → scc_firewall_manager_sdk-1.15.389.dist-info}/WHEEL +0 -0
- {scc_firewall_manager_sdk-1.15.358.dist-info → scc_firewall_manager_sdk-1.15.389.dist-info}/top_level.txt +0 -0
|
@@ -49,7 +49,7 @@ class InterfaceHealthAggregationsApi:
|
|
|
49
49
|
threshold: Annotated[StrictStr, Field(description="The metric threshold (e.g. CRITICAL).")],
|
|
50
50
|
aggregation_period: Annotated[Optional[StrictStr], Field(description="The aggregation period of the metrics returned.")] = None,
|
|
51
51
|
managed_tenant_uid: Annotated[Optional[StrictStr], Field(description="A managed tenant UUID to filter list, if applicable.")] = None,
|
|
52
|
-
q: Annotated[Optional[StrictStr], Field(description="Lucene-style query filter. Only prefix queries (e.g. field:value*) are supported for filtering.")] = None,
|
|
52
|
+
q: Annotated[Optional[StrictStr], Field(description="Lucene-style query filter. Only prefix queries (e.g. field:value*) and wildcard queries (e.g. field:*value or field:*value*) are supported for filtering.")] = None,
|
|
53
53
|
_request_timeout: Union[
|
|
54
54
|
None,
|
|
55
55
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -75,7 +75,7 @@ class InterfaceHealthAggregationsApi:
|
|
|
75
75
|
:type aggregation_period: str
|
|
76
76
|
:param managed_tenant_uid: A managed tenant UUID to filter list, if applicable.
|
|
77
77
|
:type managed_tenant_uid: str
|
|
78
|
-
:param q: Lucene-style query filter. Only prefix queries (e.g. field:value*) are supported for filtering.
|
|
78
|
+
:param q: Lucene-style query filter. Only prefix queries (e.g. field:value*) and wildcard queries (e.g. field:*value or field:*value*) are supported for filtering.
|
|
79
79
|
:type q: str
|
|
80
80
|
:param _request_timeout: timeout setting for this request. If one
|
|
81
81
|
number provided, it will be total request
|
|
@@ -137,7 +137,7 @@ class InterfaceHealthAggregationsApi:
|
|
|
137
137
|
threshold: Annotated[StrictStr, Field(description="The metric threshold (e.g. CRITICAL).")],
|
|
138
138
|
aggregation_period: Annotated[Optional[StrictStr], Field(description="The aggregation period of the metrics returned.")] = None,
|
|
139
139
|
managed_tenant_uid: Annotated[Optional[StrictStr], Field(description="A managed tenant UUID to filter list, if applicable.")] = None,
|
|
140
|
-
q: Annotated[Optional[StrictStr], Field(description="Lucene-style query filter. Only prefix queries (e.g. field:value*) are supported for filtering.")] = None,
|
|
140
|
+
q: Annotated[Optional[StrictStr], Field(description="Lucene-style query filter. Only prefix queries (e.g. field:value*) and wildcard queries (e.g. field:*value or field:*value*) are supported for filtering.")] = None,
|
|
141
141
|
_request_timeout: Union[
|
|
142
142
|
None,
|
|
143
143
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -163,7 +163,7 @@ class InterfaceHealthAggregationsApi:
|
|
|
163
163
|
:type aggregation_period: str
|
|
164
164
|
:param managed_tenant_uid: A managed tenant UUID to filter list, if applicable.
|
|
165
165
|
:type managed_tenant_uid: str
|
|
166
|
-
:param q: Lucene-style query filter. Only prefix queries (e.g. field:value*) are supported for filtering.
|
|
166
|
+
:param q: Lucene-style query filter. Only prefix queries (e.g. field:value*) and wildcard queries (e.g. field:*value or field:*value*) are supported for filtering.
|
|
167
167
|
:type q: str
|
|
168
168
|
:param _request_timeout: timeout setting for this request. If one
|
|
169
169
|
number provided, it will be total request
|
|
@@ -225,7 +225,7 @@ class InterfaceHealthAggregationsApi:
|
|
|
225
225
|
threshold: Annotated[StrictStr, Field(description="The metric threshold (e.g. CRITICAL).")],
|
|
226
226
|
aggregation_period: Annotated[Optional[StrictStr], Field(description="The aggregation period of the metrics returned.")] = None,
|
|
227
227
|
managed_tenant_uid: Annotated[Optional[StrictStr], Field(description="A managed tenant UUID to filter list, if applicable.")] = None,
|
|
228
|
-
q: Annotated[Optional[StrictStr], Field(description="Lucene-style query filter. Only prefix queries (e.g. field:value*) are supported for filtering.")] = None,
|
|
228
|
+
q: Annotated[Optional[StrictStr], Field(description="Lucene-style query filter. Only prefix queries (e.g. field:value*) and wildcard queries (e.g. field:*value or field:*value*) are supported for filtering.")] = None,
|
|
229
229
|
_request_timeout: Union[
|
|
230
230
|
None,
|
|
231
231
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -251,7 +251,7 @@ class InterfaceHealthAggregationsApi:
|
|
|
251
251
|
:type aggregation_period: str
|
|
252
252
|
:param managed_tenant_uid: A managed tenant UUID to filter list, if applicable.
|
|
253
253
|
:type managed_tenant_uid: str
|
|
254
|
-
:param q: Lucene-style query filter. Only prefix queries (e.g. field:value*) are supported for filtering.
|
|
254
|
+
:param q: Lucene-style query filter. Only prefix queries (e.g. field:value*) and wildcard queries (e.g. field:*value or field:*value*) are supported for filtering.
|
|
255
255
|
:type q: str
|
|
256
256
|
:param _request_timeout: timeout setting for this request. If one
|
|
257
257
|
number provided, it will be total request
|
|
@@ -22,6 +22,7 @@ from typing import List, Optional
|
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from scc_firewall_manager_sdk.models.cdo_transaction import CdoTransaction
|
|
24
24
|
from scc_firewall_manager_sdk.models.msp_calculate_compatible_upgrade_versions_input import MspCalculateCompatibleUpgradeVersionsInput
|
|
25
|
+
from scc_firewall_manager_sdk.models.msp_upgrade_ftd_devices_input import MspUpgradeFtdDevicesInput
|
|
25
26
|
from scc_firewall_manager_sdk.models.msp_upgrade_run_dto import MspUpgradeRunDto
|
|
26
27
|
from scc_firewall_manager_sdk.models.msp_upgrade_run_dto_page import MspUpgradeRunDtoPage
|
|
27
28
|
from scc_firewall_manager_sdk.models.msp_upgrade_runs_attribute_values import MspUpgradeRunsAttributeValues
|
|
@@ -1696,6 +1697,7 @@ class MSPDeviceUpgradesApi:
|
|
|
1696
1697
|
@validate_call
|
|
1697
1698
|
def upgrade_msp_managed_ftd_devices(
|
|
1698
1699
|
self,
|
|
1700
|
+
msp_upgrade_ftd_devices_input: MspUpgradeFtdDevicesInput,
|
|
1699
1701
|
_request_timeout: Union[
|
|
1700
1702
|
None,
|
|
1701
1703
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1713,6 +1715,8 @@ class MSPDeviceUpgradesApi:
|
|
|
1713
1715
|
|
|
1714
1716
|
<p>Asynchronous operation to upgrade multiple FTD devices across managed tenants.</p> <p><strong>Notes:</strong></p> <ul> <li>Maximum of 50 FTD devices per hardware model per managed tenant per request</li> </ul> <p><strong>Response:</strong></p> <ul> <li>Returns a transaction object to track upgrade operation progress</li> <li>Use the transaction ID or the entity UID to monitor the status of the upgrade</li> </ul>
|
|
1715
1717
|
|
|
1718
|
+
:param msp_upgrade_ftd_devices_input: (required)
|
|
1719
|
+
:type msp_upgrade_ftd_devices_input: MspUpgradeFtdDevicesInput
|
|
1716
1720
|
:param _request_timeout: timeout setting for this request. If one
|
|
1717
1721
|
number provided, it will be total request
|
|
1718
1722
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1736,6 +1740,7 @@ class MSPDeviceUpgradesApi:
|
|
|
1736
1740
|
""" # noqa: E501
|
|
1737
1741
|
|
|
1738
1742
|
_param = self._upgrade_msp_managed_ftd_devices_serialize(
|
|
1743
|
+
msp_upgrade_ftd_devices_input=msp_upgrade_ftd_devices_input,
|
|
1739
1744
|
_request_auth=_request_auth,
|
|
1740
1745
|
_content_type=_content_type,
|
|
1741
1746
|
_headers=_headers,
|
|
@@ -1760,6 +1765,7 @@ class MSPDeviceUpgradesApi:
|
|
|
1760
1765
|
@validate_call
|
|
1761
1766
|
def upgrade_msp_managed_ftd_devices_with_http_info(
|
|
1762
1767
|
self,
|
|
1768
|
+
msp_upgrade_ftd_devices_input: MspUpgradeFtdDevicesInput,
|
|
1763
1769
|
_request_timeout: Union[
|
|
1764
1770
|
None,
|
|
1765
1771
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1777,6 +1783,8 @@ class MSPDeviceUpgradesApi:
|
|
|
1777
1783
|
|
|
1778
1784
|
<p>Asynchronous operation to upgrade multiple FTD devices across managed tenants.</p> <p><strong>Notes:</strong></p> <ul> <li>Maximum of 50 FTD devices per hardware model per managed tenant per request</li> </ul> <p><strong>Response:</strong></p> <ul> <li>Returns a transaction object to track upgrade operation progress</li> <li>Use the transaction ID or the entity UID to monitor the status of the upgrade</li> </ul>
|
|
1779
1785
|
|
|
1786
|
+
:param msp_upgrade_ftd_devices_input: (required)
|
|
1787
|
+
:type msp_upgrade_ftd_devices_input: MspUpgradeFtdDevicesInput
|
|
1780
1788
|
:param _request_timeout: timeout setting for this request. If one
|
|
1781
1789
|
number provided, it will be total request
|
|
1782
1790
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1800,6 +1808,7 @@ class MSPDeviceUpgradesApi:
|
|
|
1800
1808
|
""" # noqa: E501
|
|
1801
1809
|
|
|
1802
1810
|
_param = self._upgrade_msp_managed_ftd_devices_serialize(
|
|
1811
|
+
msp_upgrade_ftd_devices_input=msp_upgrade_ftd_devices_input,
|
|
1803
1812
|
_request_auth=_request_auth,
|
|
1804
1813
|
_content_type=_content_type,
|
|
1805
1814
|
_headers=_headers,
|
|
@@ -1824,6 +1833,7 @@ class MSPDeviceUpgradesApi:
|
|
|
1824
1833
|
@validate_call
|
|
1825
1834
|
def upgrade_msp_managed_ftd_devices_without_preload_content(
|
|
1826
1835
|
self,
|
|
1836
|
+
msp_upgrade_ftd_devices_input: MspUpgradeFtdDevicesInput,
|
|
1827
1837
|
_request_timeout: Union[
|
|
1828
1838
|
None,
|
|
1829
1839
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1841,6 +1851,8 @@ class MSPDeviceUpgradesApi:
|
|
|
1841
1851
|
|
|
1842
1852
|
<p>Asynchronous operation to upgrade multiple FTD devices across managed tenants.</p> <p><strong>Notes:</strong></p> <ul> <li>Maximum of 50 FTD devices per hardware model per managed tenant per request</li> </ul> <p><strong>Response:</strong></p> <ul> <li>Returns a transaction object to track upgrade operation progress</li> <li>Use the transaction ID or the entity UID to monitor the status of the upgrade</li> </ul>
|
|
1843
1853
|
|
|
1854
|
+
:param msp_upgrade_ftd_devices_input: (required)
|
|
1855
|
+
:type msp_upgrade_ftd_devices_input: MspUpgradeFtdDevicesInput
|
|
1844
1856
|
:param _request_timeout: timeout setting for this request. If one
|
|
1845
1857
|
number provided, it will be total request
|
|
1846
1858
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1864,6 +1876,7 @@ class MSPDeviceUpgradesApi:
|
|
|
1864
1876
|
""" # noqa: E501
|
|
1865
1877
|
|
|
1866
1878
|
_param = self._upgrade_msp_managed_ftd_devices_serialize(
|
|
1879
|
+
msp_upgrade_ftd_devices_input=msp_upgrade_ftd_devices_input,
|
|
1867
1880
|
_request_auth=_request_auth,
|
|
1868
1881
|
_content_type=_content_type,
|
|
1869
1882
|
_headers=_headers,
|
|
@@ -1883,6 +1896,7 @@ class MSPDeviceUpgradesApi:
|
|
|
1883
1896
|
|
|
1884
1897
|
def _upgrade_msp_managed_ftd_devices_serialize(
|
|
1885
1898
|
self,
|
|
1899
|
+
msp_upgrade_ftd_devices_input,
|
|
1886
1900
|
_request_auth,
|
|
1887
1901
|
_content_type,
|
|
1888
1902
|
_headers,
|
|
@@ -1906,6 +1920,8 @@ class MSPDeviceUpgradesApi:
|
|
|
1906
1920
|
# process the header parameters
|
|
1907
1921
|
# process the form parameters
|
|
1908
1922
|
# process the body parameter
|
|
1923
|
+
if msp_upgrade_ftd_devices_input is not None:
|
|
1924
|
+
_body_params = msp_upgrade_ftd_devices_input
|
|
1909
1925
|
|
|
1910
1926
|
|
|
1911
1927
|
# set the HTTP header `Accept`
|
|
@@ -1915,6 +1931,19 @@ class MSPDeviceUpgradesApi:
|
|
|
1915
1931
|
]
|
|
1916
1932
|
)
|
|
1917
1933
|
|
|
1934
|
+
# set the HTTP header `Content-Type`
|
|
1935
|
+
if _content_type:
|
|
1936
|
+
_header_params['Content-Type'] = _content_type
|
|
1937
|
+
else:
|
|
1938
|
+
_default_content_type = (
|
|
1939
|
+
self.api_client.select_header_content_type(
|
|
1940
|
+
[
|
|
1941
|
+
'application/json'
|
|
1942
|
+
]
|
|
1943
|
+
)
|
|
1944
|
+
)
|
|
1945
|
+
if _default_content_type is not None:
|
|
1946
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1918
1947
|
|
|
1919
1948
|
# authentication setting
|
|
1920
1949
|
_auth_settings: List[str] = [
|
|
@@ -88,7 +88,7 @@ class ApiClient:
|
|
|
88
88
|
self.default_headers[header_name] = header_value
|
|
89
89
|
self.cookie = cookie
|
|
90
90
|
# Set default User-Agent.
|
|
91
|
-
self.user_agent = 'OpenAPI-Generator/1.15.
|
|
91
|
+
self.user_agent = 'OpenAPI-Generator/1.15.389/python'
|
|
92
92
|
self.client_side_validation = configuration.client_side_validation
|
|
93
93
|
|
|
94
94
|
def __enter__(self):
|
|
@@ -380,7 +380,7 @@ class Configuration:
|
|
|
380
380
|
"OS: {env}\n"\
|
|
381
381
|
"Python Version: {pyversion}\n"\
|
|
382
382
|
"Version of the API: 1.15.0\n"\
|
|
383
|
-
"SDK Package Version: 1.15.
|
|
383
|
+
"SDK Package Version: 1.15.389".\
|
|
384
384
|
format(env=sys.platform, pyversion=sys.version)
|
|
385
385
|
|
|
386
386
|
def get_host_settings(self):
|
|
@@ -76,6 +76,7 @@ from scc_firewall_manager_sdk.models.command_response import CommandResponse
|
|
|
76
76
|
from scc_firewall_manager_sdk.models.common_api_error import CommonApiError
|
|
77
77
|
from scc_firewall_manager_sdk.models.compatible_device_dto import CompatibleDeviceDto
|
|
78
78
|
from scc_firewall_manager_sdk.models.compatible_version_info_dto import CompatibleVersionInfoDto
|
|
79
|
+
from scc_firewall_manager_sdk.models.completion_status_dto import CompletionStatusDto
|
|
79
80
|
from scc_firewall_manager_sdk.models.config_state import ConfigState
|
|
80
81
|
from scc_firewall_manager_sdk.models.conflict_detection_interval import ConflictDetectionInterval
|
|
81
82
|
from scc_firewall_manager_sdk.models.conflict_detection_state import ConflictDetectionState
|
|
@@ -190,6 +191,7 @@ from scc_firewall_manager_sdk.models.msp_managed_template_distinct_attribute_val
|
|
|
190
191
|
from scc_firewall_manager_sdk.models.msp_managed_templates_page import MspManagedTemplatesPage
|
|
191
192
|
from scc_firewall_manager_sdk.models.msp_managed_tenant import MspManagedTenant
|
|
192
193
|
from scc_firewall_manager_sdk.models.msp_managed_tenant_page import MspManagedTenantPage
|
|
194
|
+
from scc_firewall_manager_sdk.models.msp_upgrade_ftd_devices_input import MspUpgradeFtdDevicesInput
|
|
193
195
|
from scc_firewall_manager_sdk.models.msp_upgrade_run_dto import MspUpgradeRunDto
|
|
194
196
|
from scc_firewall_manager_sdk.models.msp_upgrade_run_dto_page import MspUpgradeRunDtoPage
|
|
195
197
|
from scc_firewall_manager_sdk.models.msp_upgrade_runs_attribute_values import MspUpgradeRunsAttributeValues
|
|
@@ -29,18 +29,18 @@ class CdoTransaction(BaseModel):
|
|
|
29
29
|
CdoTransaction
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
cancellable: Optional[StrictBool] = None
|
|
32
|
-
cdo_transaction_status: Optional[StrictStr] = Field(default=None, description="
|
|
33
|
-
entity_uid: Optional[StrictStr] = Field(default=None, description="
|
|
34
|
-
entity_url: Optional[StrictStr] = Field(default=None, description="
|
|
35
|
-
error_details: Optional[Dict[str, StrictStr]] = Field(default=None, description="Transaction error details, if any", alias="errorDetails")
|
|
36
|
-
error_message: Optional[StrictStr] = Field(default=None, description="Transaction error message, if any", alias="errorMessage")
|
|
37
|
-
last_updated_time: Optional[datetime] = Field(default=None, description="
|
|
38
|
-
submission_time: Optional[datetime] = Field(default=None, description="
|
|
39
|
-
tenant_uid: Optional[StrictStr] = Field(default=None, description="
|
|
40
|
-
transaction_details: Optional[Dict[str, StrictStr]] = Field(default=None, description="Transaction details, if any", alias="transactionDetails")
|
|
41
|
-
transaction_polling_url: Optional[StrictStr] = Field(default=None, description="
|
|
42
|
-
transaction_type: Optional[StrictStr] = Field(default=None, description="
|
|
43
|
-
transaction_uid: Optional[StrictStr] = Field(default=None, description="
|
|
32
|
+
cdo_transaction_status: Optional[StrictStr] = Field(default=None, description="Status of the transaction.", alias="cdoTransactionStatus")
|
|
33
|
+
entity_uid: Optional[StrictStr] = Field(default=None, description="Unique identifier of the entity that the transaction is triggered on. This can be empty, for a transaction that is not tied to an entity, such as transactions which refresh RA VPN sessions.", alias="entityUid")
|
|
34
|
+
entity_url: Optional[StrictStr] = Field(default=None, description="URL to access the entity that the transaction is triggered on. This can also be empty if not applicable.", alias="entityUrl")
|
|
35
|
+
error_details: Optional[Dict[str, StrictStr]] = Field(default=None, description="Transaction error details, if any.", alias="errorDetails")
|
|
36
|
+
error_message: Optional[StrictStr] = Field(default=None, description="Transaction error message, if any.", alias="errorMessage")
|
|
37
|
+
last_updated_time: Optional[datetime] = Field(default=None, description="Time (UTC; represented using the RFC-3339 standard) at which the transaction status was last updated.", alias="lastUpdatedTime")
|
|
38
|
+
submission_time: Optional[datetime] = Field(default=None, description="Time (UTC; represented using the RFC-3339 standard) at which the transaction was triggered.", alias="submissionTime")
|
|
39
|
+
tenant_uid: Optional[StrictStr] = Field(default=None, description="Unique identifier of the tenant that the transaction was triggered on.", alias="tenantUid")
|
|
40
|
+
transaction_details: Optional[Dict[str, StrictStr]] = Field(default=None, description="Transaction details, if any.", alias="transactionDetails")
|
|
41
|
+
transaction_polling_url: Optional[StrictStr] = Field(default=None, description="Polling URL to track the progress of the transaction.", alias="transactionPollingUrl")
|
|
42
|
+
transaction_type: Optional[StrictStr] = Field(default=None, description="Type of the transaction.", alias="transactionType")
|
|
43
|
+
transaction_uid: Optional[StrictStr] = Field(default=None, description="Unique identifier of the transaction triggered.", alias="transactionUid")
|
|
44
44
|
__properties: ClassVar[List[str]] = ["cancellable", "cdoTransactionStatus", "entityUid", "entityUrl", "errorDetails", "errorMessage", "lastUpdatedTime", "submissionTime", "tenantUid", "transactionDetails", "transactionPollingUrl", "transactionType", "transactionUid"]
|
|
45
45
|
|
|
46
46
|
@field_validator('cdo_transaction_status')
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cisco Security Cloud Control Firewall Manager API
|
|
5
|
+
|
|
6
|
+
Use the documentation to explore the endpoints Security Cloud Control Firewall Manager has to offer
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.15.0
|
|
9
|
+
Contact: cdo.tac@cisco.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class CompletionStatusDto(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
CompletionStatusDto
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
message: Optional[StrictStr] = Field(default=None, description="A message, indicating current progress, returned from the device.")
|
|
31
|
+
name: Optional[StrictStr] = Field(default=None, description="The name of the device. Note: this will be the name of the node on the cdFMC if the device is part of an HA pair or cluster.")
|
|
32
|
+
node_type: Optional[StrictStr] = Field(default=None, description="(HA Pairs and clusters only) The node type of the device.", alias="nodeType")
|
|
33
|
+
percentage_complete: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The percentage completion of the current task being performed", alias="percentageComplete")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["message", "name", "nodeType", "percentageComplete"]
|
|
35
|
+
|
|
36
|
+
@field_validator('node_type')
|
|
37
|
+
def node_type_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value is None:
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
if value not in set(['HA_PRIMARY', 'HA_SECONDARY', 'CLUSTER_CONTROL', 'CLUSTER_DATA']):
|
|
43
|
+
raise ValueError("must be one of enum values ('HA_PRIMARY', 'HA_SECONDARY', 'CLUSTER_CONTROL', 'CLUSTER_DATA')")
|
|
44
|
+
return value
|
|
45
|
+
|
|
46
|
+
model_config = ConfigDict(
|
|
47
|
+
populate_by_name=True,
|
|
48
|
+
validate_assignment=True,
|
|
49
|
+
protected_namespaces=(),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
+
"""Create an instance of CompletionStatusDto from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
"""
|
|
77
|
+
excluded_fields: Set[str] = set([
|
|
78
|
+
])
|
|
79
|
+
|
|
80
|
+
_dict = self.model_dump(
|
|
81
|
+
by_alias=True,
|
|
82
|
+
exclude=excluded_fields,
|
|
83
|
+
exclude_none=True,
|
|
84
|
+
)
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of CompletionStatusDto from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"message": obj.get("message"),
|
|
98
|
+
"name": obj.get("name"),
|
|
99
|
+
"nodeType": obj.get("nodeType"),
|
|
100
|
+
"percentageComplete": obj.get("percentageComplete")
|
|
101
|
+
})
|
|
102
|
+
return _obj
|
|
103
|
+
|
|
104
|
+
|
|
@@ -18,8 +18,9 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from scc_firewall_manager_sdk.models.completion_status_dto import CompletionStatusDto
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -27,28 +28,9 @@ class DeviceUpgradeStatusDto(BaseModel):
|
|
|
27
28
|
"""
|
|
28
29
|
DeviceUpgradeStatusDto
|
|
29
30
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
managed_tenant_uid: Optional[StrictStr] = Field(default=None, description="The unique identifier, represented as a UUID, of the managed tenant in Security Cloud Control that this device belongs to.", alias="managedTenantUid")
|
|
34
|
-
message: Optional[StrictStr] = Field(default=None, description="A message, indicating current progress, returned from the device.")
|
|
35
|
-
name: Optional[StrictStr] = Field(default=None, description="The name of the device being upgraded.")
|
|
36
|
-
percentage_complete: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The percentage completion of the current task being performed", alias="percentageComplete")
|
|
37
|
-
software_version_before_upgrade: Optional[StrictStr] = Field(default=None, description="The software version of the device before the upgrade.", alias="softwareVersionBeforeUpgrade")
|
|
38
|
-
transaction_uid: Optional[StrictStr] = Field(default=None, description="The unique identifier, represented as a UUID, of the CDO transaction on the managed tenant that tracks this upgrade run.", alias="transactionUid")
|
|
39
|
-
uid: Optional[StrictStr] = Field(default=None, description="The unique identifier, represented as a UUID, of the device being upgraded.")
|
|
40
|
-
upgrade_run_status: Optional[StrictStr] = Field(default=None, description="The current status of the upgrade run.", alias="upgradeRunStatus")
|
|
41
|
-
__properties: ClassVar[List[str]] = ["hardwareModel", "managedTenantDisplayName", "managedTenantName", "managedTenantUid", "message", "name", "percentageComplete", "softwareVersionBeforeUpgrade", "transactionUid", "uid", "upgradeRunStatus"]
|
|
42
|
-
|
|
43
|
-
@field_validator('upgrade_run_status')
|
|
44
|
-
def upgrade_run_status_validate_enum(cls, value):
|
|
45
|
-
"""Validates the enum"""
|
|
46
|
-
if value is None:
|
|
47
|
-
return value
|
|
48
|
-
|
|
49
|
-
if value not in set(['IN_PROGRESS', 'REBUILDING_UPGRADE_CACHE', 'PERFORMING_UPGRADE', 'UPLOADING_IMAGE', 'PERFORMING_READINESS_CHECK', 'UPGRADE_STAGED', 'UPGRADE_STAGING_FAILED', 'UGPRADE_STAGING_FAILED', 'UPGRADE_COMPLETED', 'UPGRADE_FAILED']):
|
|
50
|
-
raise ValueError("must be one of enum values ('IN_PROGRESS', 'REBUILDING_UPGRADE_CACHE', 'PERFORMING_UPGRADE', 'UPLOADING_IMAGE', 'PERFORMING_READINESS_CHECK', 'UPGRADE_STAGED', 'UPGRADE_STAGING_FAILED', 'UGPRADE_STAGING_FAILED', 'UPGRADE_COMPLETED', 'UPGRADE_FAILED')")
|
|
51
|
-
return value
|
|
31
|
+
completion_statuses: Optional[List[CompletionStatusDto]] = Field(default=None, description="The completion status of the upgrade on the device. For HA pairs or clusters, there will be multiple completion statuses; one per node of the pair or cluster.", alias="completionStatuses")
|
|
32
|
+
uid: Optional[StrictStr] = Field(default=None, description="The unique identifier, represented as a UUID, of the device in SCC Firewall Manager.")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["completionStatuses", "uid"]
|
|
52
34
|
|
|
53
35
|
model_config = ConfigDict(
|
|
54
36
|
populate_by_name=True,
|
|
@@ -89,6 +71,13 @@ class DeviceUpgradeStatusDto(BaseModel):
|
|
|
89
71
|
exclude=excluded_fields,
|
|
90
72
|
exclude_none=True,
|
|
91
73
|
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in completion_statuses (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.completion_statuses:
|
|
77
|
+
for _item in self.completion_statuses:
|
|
78
|
+
if _item:
|
|
79
|
+
_items.append(_item.to_dict())
|
|
80
|
+
_dict['completionStatuses'] = _items
|
|
92
81
|
return _dict
|
|
93
82
|
|
|
94
83
|
@classmethod
|
|
@@ -101,17 +90,8 @@ class DeviceUpgradeStatusDto(BaseModel):
|
|
|
101
90
|
return cls.model_validate(obj)
|
|
102
91
|
|
|
103
92
|
_obj = cls.model_validate({
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"managedTenantName": obj.get("managedTenantName"),
|
|
107
|
-
"managedTenantUid": obj.get("managedTenantUid"),
|
|
108
|
-
"message": obj.get("message"),
|
|
109
|
-
"name": obj.get("name"),
|
|
110
|
-
"percentageComplete": obj.get("percentageComplete"),
|
|
111
|
-
"softwareVersionBeforeUpgrade": obj.get("softwareVersionBeforeUpgrade"),
|
|
112
|
-
"transactionUid": obj.get("transactionUid"),
|
|
113
|
-
"uid": obj.get("uid"),
|
|
114
|
-
"upgradeRunStatus": obj.get("upgradeRunStatus")
|
|
93
|
+
"completionStatuses": [CompletionStatusDto.from_dict(_item) for _item in obj["completionStatuses"]] if obj.get("completionStatuses") is not None else None,
|
|
94
|
+
"uid": obj.get("uid")
|
|
115
95
|
})
|
|
116
96
|
return _obj
|
|
117
97
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cisco Security Cloud Control Firewall Manager API
|
|
5
|
+
|
|
6
|
+
Use the documentation to explore the endpoints Security Cloud Control Firewall Manager has to offer
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.15.0
|
|
9
|
+
Contact: cdo.tac@cisco.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class MspUpgradeFtdDevicesInput(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
MspUpgradeFtdDevicesInput
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
device_uids: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Set of device unique identifiers (UUIDs) to upgrade in Security Cloud Control. All of the devices have to be managed by the MSSP portal, be of type CDFMC_MANAGED_FTD, have the connectivity state ONLINE, and be compatible with the software version specified.", alias="deviceUids")
|
|
32
|
+
ignore_maintenance_window: Optional[StrictBool] = Field(default=None, description="A boolean value, indicating whether devices maintenance window should be ignored. If this is set to true, upgrade will be allowed even if there are devices outside their maintenance window.", alias="ignoreMaintenanceWindow")
|
|
33
|
+
name: Optional[StrictStr] = Field(default=None, description="Specify a human-readable name for the upgrade run.")
|
|
34
|
+
software_version: Optional[StrictStr] = Field(default=None, description="Specify the software version to which all devices will be upgraded.", alias="softwareVersion")
|
|
35
|
+
stage_upgrade_only: Optional[StrictBool] = Field(default=False, description="A boolean value, indicating whether the upgrade should be staged. If set to true, the image will be downloaded onto the devices and readiness checks will be performed. However, the upgrade will not be applied to the devices.", alias="stageUpgradeOnly")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["deviceUids", "ignoreMaintenanceWindow", "name", "softwareVersion", "stageUpgradeOnly"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of MspUpgradeFtdDevicesInput from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of MspUpgradeFtdDevicesInput from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"deviceUids": obj.get("deviceUids"),
|
|
90
|
+
"ignoreMaintenanceWindow": obj.get("ignoreMaintenanceWindow"),
|
|
91
|
+
"name": obj.get("name"),
|
|
92
|
+
"softwareVersion": obj.get("softwareVersion"),
|
|
93
|
+
"stageUpgradeOnly": obj.get("stageUpgradeOnly") if obj.get("stageUpgradeOnly") is not None else False
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -28,7 +28,9 @@ class MspUpgradeRunsAttributeValues(BaseModel):
|
|
|
28
28
|
MspUpgradeRunsAttributeValues
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
upgrade_run_statuses: Optional[List[StrictStr]] = Field(default=None, description="The distinct status values for the MSP upgrade runs on this MSP portal.", alias="upgradeRunStatuses")
|
|
31
|
-
|
|
31
|
+
upgrade_run_types: Optional[List[StrictStr]] = Field(default=None, alias="upgradeRunTypes")
|
|
32
|
+
users: Optional[List[StrictStr]] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["upgradeRunStatuses", "upgradeRunTypes", "users"]
|
|
32
34
|
|
|
33
35
|
@field_validator('upgrade_run_statuses')
|
|
34
36
|
def upgrade_run_statuses_validate_enum(cls, value):
|
|
@@ -41,6 +43,17 @@ class MspUpgradeRunsAttributeValues(BaseModel):
|
|
|
41
43
|
raise ValueError("each list item must be one of ('IN_PROGRESS', 'REBUILDING_UPGRADE_CACHE', 'PERFORMING_UPGRADE', 'UPLOADING_IMAGE', 'PERFORMING_READINESS_CHECK', 'UPGRADE_STAGED', 'UPGRADE_STAGING_FAILED', 'UGPRADE_STAGING_FAILED', 'UPGRADE_COMPLETED', 'UPGRADE_FAILED')")
|
|
42
44
|
return value
|
|
43
45
|
|
|
46
|
+
@field_validator('upgrade_run_types')
|
|
47
|
+
def upgrade_run_types_validate_enum(cls, value):
|
|
48
|
+
"""Validates the enum"""
|
|
49
|
+
if value is None:
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
for i in value:
|
|
53
|
+
if i not in set(['ASA_DEVICE_UPGRADE', 'FTD_DEVICE_UPGRADE', 'FTD_SECURE_CLIENT_UPGRADE', 'ASA_SECURE_CLIENT_UPGRADE']):
|
|
54
|
+
raise ValueError("each list item must be one of ('ASA_DEVICE_UPGRADE', 'FTD_DEVICE_UPGRADE', 'FTD_SECURE_CLIENT_UPGRADE', 'ASA_SECURE_CLIENT_UPGRADE')")
|
|
55
|
+
return value
|
|
56
|
+
|
|
44
57
|
model_config = ConfigDict(
|
|
45
58
|
populate_by_name=True,
|
|
46
59
|
validate_assignment=True,
|
|
@@ -92,7 +105,9 @@ class MspUpgradeRunsAttributeValues(BaseModel):
|
|
|
92
105
|
return cls.model_validate(obj)
|
|
93
106
|
|
|
94
107
|
_obj = cls.model_validate({
|
|
95
|
-
"upgradeRunStatuses": obj.get("upgradeRunStatuses")
|
|
108
|
+
"upgradeRunStatuses": obj.get("upgradeRunStatuses"),
|
|
109
|
+
"upgradeRunTypes": obj.get("upgradeRunTypes"),
|
|
110
|
+
"users": obj.get("users")
|
|
96
111
|
})
|
|
97
112
|
return _obj
|
|
98
113
|
|