Skip to content

Commit fa08f5e

Browse files
Update PAN az cli with new stable API version 2025-10-08 (#9308)
* Cli command code changes auto-generated + changes for backward compatibility * Update descriptions * Update to new stable version of az cli * Add fixes by GHCP * Update HISTORY.rst * Update to az cli beta version instead of stable * Fix lint issues - add abbreviated options for SCM and appInsights * Update version to 1.1.2b3 as per beta release guidelines * Add examples for 4 commands * Update to stable version * Add and update tests * Change version to 1.1.2 * Add SCM config test * Remove preview flag from metadata
1 parent 6a86176 commit fa08f5e

File tree

76 files changed

+5802
-1908
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+5802
-1908
lines changed

src/palo-alto-networks/HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
33
Release History
44
===============
5+
1.1.2
6+
++++++
7+
* Updated API version from 2022-08-29 to 2025-10-08 across all commands
8+
* Added new firewall metrics configuration support and commands
9+
* Added support for Strata Cloud Manager configuration
10+
* Enhanced network profile with new properties for private source NAT rules and trusted ranges
11+
* Add new commands for CreateProductSerialNumber, ListCloudManagerTenants, ListSupportInfo
12+
* Restrict firewall name with a pattern
13+
514
1.1.2b2
615
++++++
716
* Further Updates to CLI descriptions.

src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99
# flake8: noqa
1010

1111
from .__cmd_group import *
12+
from ._create_product_serial_number import *
13+
from ._list_cloud_manager_tenant import *
14+
from ._list_support_info import *
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command(
15+
"palo-alto cloudngfw create-product-serial-number",
16+
)
17+
class CreateProductSerialNumber(AAZCommand):
18+
"""Create Product Serial Number
19+
20+
:example: Create product serial number
21+
az palo-alto cloudngfw create-product-serial-number
22+
"""
23+
24+
_aaz_info = {
25+
"version": "2025-10-08",
26+
"resources": [
27+
["mgmt-plane", "/subscriptions/{}/providers/paloaltonetworks.cloudngfw/createproductserialnumber", "2025-10-08"],
28+
]
29+
}
30+
31+
def _handler(self, command_args):
32+
super()._handler(command_args)
33+
self._execute_operations()
34+
return self._output()
35+
36+
_args_schema = None
37+
38+
@classmethod
39+
def _build_arguments_schema(cls, *args, **kwargs):
40+
if cls._args_schema is not None:
41+
return cls._args_schema
42+
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
43+
44+
# define Arg Group ""
45+
return cls._args_schema
46+
47+
def _execute_operations(self):
48+
self.pre_operations()
49+
self.PaloAltoNetworksCloudngfwOperationsCreateProductSerialNumber(ctx=self.ctx)()
50+
self.post_operations()
51+
52+
@register_callback
53+
def pre_operations(self):
54+
pass
55+
56+
@register_callback
57+
def post_operations(self):
58+
pass
59+
60+
def _output(self, *args, **kwargs):
61+
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
62+
return result
63+
64+
class PaloAltoNetworksCloudngfwOperationsCreateProductSerialNumber(AAZHttpOperation):
65+
CLIENT_TYPE = "MgmtClient"
66+
67+
def __call__(self, *args, **kwargs):
68+
request = self.make_request()
69+
session = self.client.send_request(request=request, stream=False, **kwargs)
70+
if session.http_response.status_code in [200]:
71+
return self.on_200(session)
72+
73+
return self.on_error(session.http_response)
74+
75+
@property
76+
def url(self):
77+
return self.client.format_url(
78+
"/subscriptions/{subscriptionId}/providers/PaloAltoNetworks.Cloudngfw/createProductSerialNumber",
79+
**self.url_parameters
80+
)
81+
82+
@property
83+
def method(self):
84+
return "POST"
85+
86+
@property
87+
def error_format(self):
88+
return "MgmtErrorFormat"
89+
90+
@property
91+
def url_parameters(self):
92+
parameters = {
93+
**self.serialize_url_param(
94+
"subscriptionId", self.ctx.subscription_id,
95+
required=True,
96+
),
97+
}
98+
return parameters
99+
100+
@property
101+
def query_parameters(self):
102+
parameters = {
103+
**self.serialize_query_param(
104+
"api-version", "2025-10-08",
105+
required=True,
106+
),
107+
}
108+
return parameters
109+
110+
@property
111+
def header_parameters(self):
112+
parameters = {
113+
**self.serialize_header_param(
114+
"Accept", "application/json",
115+
),
116+
}
117+
return parameters
118+
119+
def on_200(self, session):
120+
data = self.deserialize_http_content(session)
121+
self.ctx.set_var(
122+
"instance",
123+
data,
124+
schema_builder=self._build_schema_on_200
125+
)
126+
127+
_schema_on_200 = None
128+
129+
@classmethod
130+
def _build_schema_on_200(cls):
131+
if cls._schema_on_200 is not None:
132+
return cls._schema_on_200
133+
134+
cls._schema_on_200 = AAZObjectType()
135+
136+
_schema_on_200 = cls._schema_on_200
137+
_schema_on_200.status = AAZStrType(
138+
flags={"required": True},
139+
)
140+
141+
return cls._schema_on_200
142+
143+
144+
class _CreateProductSerialNumberHelper:
145+
"""Helper class for CreateProductSerialNumber"""
146+
147+
148+
__all__ = ["CreateProductSerialNumber"]
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command(
15+
"palo-alto cloudngfw list-cloud-manager-tenant",
16+
)
17+
class ListCloudManagerTenant(AAZCommand):
18+
"""List Cloud Manager Tenants
19+
20+
:example: List cloud manager tenants
21+
az palo-alto cloudngfw list-cloud-manager-tenant
22+
"""
23+
24+
_aaz_info = {
25+
"version": "2025-10-08",
26+
"resources": [
27+
["mgmt-plane", "/subscriptions/{}/providers/paloaltonetworks.cloudngfw/listcloudmanagertenants", "2025-10-08"],
28+
]
29+
}
30+
31+
def _handler(self, command_args):
32+
super()._handler(command_args)
33+
self._execute_operations()
34+
return self._output()
35+
36+
_args_schema = None
37+
38+
@classmethod
39+
def _build_arguments_schema(cls, *args, **kwargs):
40+
if cls._args_schema is not None:
41+
return cls._args_schema
42+
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
43+
44+
# define Arg Group ""
45+
return cls._args_schema
46+
47+
def _execute_operations(self):
48+
self.pre_operations()
49+
self.PaloAltoNetworksCloudngfwOperationsListCloudManagerTenants(ctx=self.ctx)()
50+
self.post_operations()
51+
52+
@register_callback
53+
def pre_operations(self):
54+
pass
55+
56+
@register_callback
57+
def post_operations(self):
58+
pass
59+
60+
def _output(self, *args, **kwargs):
61+
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
62+
return result
63+
64+
class PaloAltoNetworksCloudngfwOperationsListCloudManagerTenants(AAZHttpOperation):
65+
CLIENT_TYPE = "MgmtClient"
66+
67+
def __call__(self, *args, **kwargs):
68+
request = self.make_request()
69+
session = self.client.send_request(request=request, stream=False, **kwargs)
70+
if session.http_response.status_code in [200]:
71+
return self.on_200(session)
72+
73+
return self.on_error(session.http_response)
74+
75+
@property
76+
def url(self):
77+
return self.client.format_url(
78+
"/subscriptions/{subscriptionId}/providers/PaloAltoNetworks.Cloudngfw/listCloudManagerTenants",
79+
**self.url_parameters
80+
)
81+
82+
@property
83+
def method(self):
84+
return "POST"
85+
86+
@property
87+
def error_format(self):
88+
return "MgmtErrorFormat"
89+
90+
@property
91+
def url_parameters(self):
92+
parameters = {
93+
**self.serialize_url_param(
94+
"subscriptionId", self.ctx.subscription_id,
95+
required=True,
96+
),
97+
}
98+
return parameters
99+
100+
@property
101+
def query_parameters(self):
102+
parameters = {
103+
**self.serialize_query_param(
104+
"api-version", "2025-10-08",
105+
required=True,
106+
),
107+
}
108+
return parameters
109+
110+
@property
111+
def header_parameters(self):
112+
parameters = {
113+
**self.serialize_header_param(
114+
"Accept", "application/json",
115+
),
116+
}
117+
return parameters
118+
119+
def on_200(self, session):
120+
data = self.deserialize_http_content(session)
121+
self.ctx.set_var(
122+
"instance",
123+
data,
124+
schema_builder=self._build_schema_on_200
125+
)
126+
127+
_schema_on_200 = None
128+
129+
@classmethod
130+
def _build_schema_on_200(cls):
131+
if cls._schema_on_200 is not None:
132+
return cls._schema_on_200
133+
134+
cls._schema_on_200 = AAZObjectType()
135+
136+
_schema_on_200 = cls._schema_on_200
137+
_schema_on_200.value = AAZListType(
138+
flags={"required": True},
139+
)
140+
141+
value = cls._schema_on_200.value
142+
value.Element = AAZStrType()
143+
144+
return cls._schema_on_200
145+
146+
147+
class _ListCloudManagerTenantHelper:
148+
"""Helper class for ListCloudManagerTenant"""
149+
150+
151+
__all__ = ["ListCloudManagerTenant"]

0 commit comments

Comments
 (0)