palo_alto 0.2.6 → 0.2.7
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.
- checksums.yaml +4 -4
- data/lib/palo_alto/config.rb +11369 -33472
- data/lib/palo_alto/version.rb +1 -1
- data/lib/palo_alto.rb +8 -8
- metadata +2 -2
data/lib/palo_alto/version.rb
CHANGED
data/lib/palo_alto.rb
CHANGED
@@ -189,6 +189,7 @@ module PaloAlto
|
|
189
189
|
|
190
190
|
data = Nokogiri::XML.parse(text)
|
191
191
|
unless data.xpath('//response/@status').to_s == 'success'
|
192
|
+
warn 'command failed'
|
192
193
|
warn "sent:\n#{options.inspect}\n" if debug.include?(:sent_on_error)
|
193
194
|
warn "received:\n#{text.inspect}\n" if debug.include?(:received_on_error)
|
194
195
|
code = data.at_xpath('//response/@code')&.value.to_i # sometimes there is no code :( e.g. for 'op' errors
|
@@ -197,7 +198,6 @@ module PaloAlto
|
|
197
198
|
end
|
198
199
|
|
199
200
|
data
|
200
|
-
|
201
201
|
rescue TemporaryException => e
|
202
202
|
dont_retry_at = [
|
203
203
|
'Partial revert is not allowed. Full system commit must be completed.',
|
@@ -236,12 +236,12 @@ module PaloAlto
|
|
236
236
|
{ 'shared-object': 'excluded' }
|
237
237
|
].compact } }
|
238
238
|
end
|
239
|
-
op.execute(cmd)
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
239
|
+
result = op.execute(cmd)
|
240
|
+
|
241
|
+
return result unless wait_for_completion
|
242
|
+
|
243
|
+
job_id = result.at_xpath('response/result/job')&.text
|
244
|
+
wait_for_job_completion(job_id) if job_id
|
245
245
|
end
|
246
246
|
|
247
247
|
def full_commit_required?
|
@@ -378,7 +378,7 @@ module PaloAlto
|
|
378
378
|
|
379
379
|
# attempt to obtain the auth_key
|
380
380
|
# raise 'Exception attempting to obtain the auth_key' if (self.class.auth_key = get_auth_key).nil?
|
381
|
-
|
381
|
+
get_auth_key
|
382
382
|
end
|
383
383
|
|
384
384
|
# Perform a query to the API endpoint for an auth_key based on the credentials provided
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: palo_alto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Roesner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|