Skip to content

Commit 7e61c01

Browse files
feat(specs): Add new security and device profile specs
- Add data_filtering_security_profile spec with vsys and template locations - Add decryption_profile spec (ssl-inbound-proxy element, correct field names) - Add snmp_trap_profile spec with v2c/v3 variant support - Add email_server_profile spec matching syslog profile structure - Add administrator spec with correct permissions/role-based XML structure - Fix pango error parser to surface raw Panorama response when msg is empty Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a913011 commit 7e61c01

6 files changed

Lines changed: 1937 additions & 13 deletions

File tree

assets/pango/errors/panos.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ func Parse(body []byte) error {
5858

5959
_ = xml.Unmarshal(body, &e)
6060
if e.Failed() {
61+
msg := e.Message()
62+
if msg == "" {
63+
msg = fmt.Sprintf("(raw response: %s)", strings.TrimSpace(string(body)))
64+
}
6165
return Panos{
62-
Msg: e.Message(),
66+
Msg: msg,
6367
Code: e.Code,
6468
}
6569
}

specs/device/administrator.yaml

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
name: administrator
2+
terraform_provider_config:
3+
description: Administrator Account
4+
skip_resource: false
5+
skip_datasource: false
6+
resource_type: entry
7+
resource_variants: []
8+
suffix: administrator
9+
plural_suffix: ''
10+
plural_name: ''
11+
plural_description: ''
12+
custom_validation: false
13+
go_sdk_config:
14+
skip: false
15+
package:
16+
- device
17+
- administrator
18+
panos_xpath:
19+
path:
20+
- mgt-config
21+
- users
22+
vars: []
23+
locations:
24+
- name: panorama
25+
xpath:
26+
path:
27+
- config
28+
vars: []
29+
description: Panorama administrator
30+
devices:
31+
- panorama
32+
validators: []
33+
required: false
34+
read_only: false
35+
- name: template
36+
xpath:
37+
path:
38+
- config
39+
- devices
40+
- $panorama_device
41+
- template
42+
- $template
43+
- config
44+
vars:
45+
- name: panorama_device
46+
description: Specific Panorama device
47+
required: false
48+
default: localhost.localdomain
49+
validators: []
50+
type: entry
51+
- name: template
52+
description: Specific Panorama template
53+
required: true
54+
validators: []
55+
type: entry
56+
description: Administrator pushed via a Panorama template
57+
devices:
58+
- panorama
59+
validators: []
60+
required: false
61+
read_only: false
62+
- name: template-stack
63+
xpath:
64+
path:
65+
- config
66+
- devices
67+
- $panorama_device
68+
- template-stack
69+
- $template_stack
70+
- config
71+
vars:
72+
- name: panorama_device
73+
description: Specific Panorama device
74+
required: false
75+
default: localhost.localdomain
76+
validators: []
77+
type: entry
78+
- name: template_stack
79+
description: The template stack
80+
required: true
81+
validators: []
82+
type: entry
83+
description: Administrator pushed via a Panorama template stack
84+
devices:
85+
- panorama
86+
validators: []
87+
required: false
88+
read_only: false
89+
entries:
90+
- name: name
91+
description: ''
92+
validators: []
93+
spec:
94+
params:
95+
- name: authentication-profile
96+
type: string
97+
profiles:
98+
- xpath:
99+
- authentication-profile
100+
validators:
101+
- type: length
102+
spec:
103+
max: 255
104+
spec: {}
105+
description: Authentication profile for this administrator
106+
required: false
107+
- name: public-key
108+
type: string
109+
profiles:
110+
- xpath:
111+
- public-key
112+
validators:
113+
- type: length
114+
spec:
115+
max: 4096
116+
spec: {}
117+
description: SSH public key for certificate-based authentication
118+
required: false
119+
- name: phash
120+
type: string
121+
profiles:
122+
- xpath:
123+
- phash
124+
validators: []
125+
spec: {}
126+
description: Hashed administrator password
127+
required: false
128+
codegen_overrides:
129+
terraform:
130+
name: password
131+
sensitive: true
132+
hashing:
133+
type: solo
134+
- name: permissions
135+
type: object
136+
profiles:
137+
- xpath:
138+
- permissions
139+
validators: []
140+
spec:
141+
params:
142+
- name: role-based
143+
type: object
144+
profiles:
145+
- xpath:
146+
- role-based
147+
validators: []
148+
spec:
149+
params:
150+
- name: superuser
151+
type: bool
152+
profiles:
153+
- xpath:
154+
- superuser
155+
validators: []
156+
spec: {}
157+
description: Full system access
158+
required: false
159+
- name: superreader
160+
type: bool
161+
profiles:
162+
- xpath:
163+
- superreader
164+
validators: []
165+
spec: {}
166+
description: Read-only access to entire system
167+
required: false
168+
- name: deviceadmin
169+
type: bool
170+
profiles:
171+
- xpath:
172+
- deviceadmin
173+
validators: []
174+
spec: {}
175+
description: Device administrator access (all vsys)
176+
required: false
177+
- name: devicereader
178+
type: bool
179+
profiles:
180+
- xpath:
181+
- devicereader
182+
validators: []
183+
spec: {}
184+
description: Device read-only access (all vsys)
185+
required: false
186+
- name: vsysadmin
187+
type: bool
188+
profiles:
189+
- xpath:
190+
- vsysadmin
191+
validators: []
192+
spec: {}
193+
description: Virtual system administrator access
194+
required: false
195+
- name: vsysreader
196+
type: bool
197+
profiles:
198+
- xpath:
199+
- vsysreader
200+
validators: []
201+
spec: {}
202+
description: Virtual system read-only access
203+
required: false
204+
- name: custom
205+
type: object
206+
profiles:
207+
- xpath:
208+
- custom
209+
validators: []
210+
spec:
211+
params:
212+
- name: profile
213+
type: string
214+
profiles:
215+
- xpath:
216+
- profile
217+
validators:
218+
- type: length
219+
spec:
220+
max: 255
221+
spec: {}
222+
description: Custom admin role profile name
223+
required: false
224+
variants: []
225+
description: Custom role based on an admin role profile
226+
required: false
227+
variants: []
228+
description: Role-based access control
229+
required: false
230+
variants: []
231+
description: Administrator permissions and role assignment
232+
required: false
233+
variants: []

0 commit comments

Comments
 (0)