ruby-paloalto-client 0.0.7 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17a2840f834cb5377d8a8b63cb21c4b6cd28afeb
4
- data.tar.gz: a76992e8ba1c4931c0fe9dcc86986c334e052222
3
+ metadata.gz: 21d96fb59dffcf68776c9219faf338bb9455c2b7
4
+ data.tar.gz: 6bcf6faa772b0d8423948a758211ac752aa8a6c9
5
5
  SHA512:
6
- metadata.gz: 36ce78b3ac071f0296750d4c9cc24fd6455a36fc5505896a0375f14529c3b26d4631fa545b3c2bf88eb86dcf31f4591a546de8873ff3bfb34022af76e48aedec
7
- data.tar.gz: ec5fb27f26375f00fda3d9cb708dd356922c83f2d19ca83611dd2396e6119fe0d90df3be9b482d19f70d9f215e350c6249a75ee26ff50763bbfdf571b0f84aa1
6
+ metadata.gz: e82323f35cac8155fba4c5dd5e0908a425e9a9f81dbb4d31b3d9c2811987cdb62d71843801e30e3057aab764751f9d4f89d721ea5308c167948058417bdf1373
7
+ data.tar.gz: faec242f95e59e6de10dd3fb06740d1fe00e2be22d440887137944e144a14bc0dd0bb19c169c8b8316fe975b889d6dead502730f4262f1b66a333a0603913970
@@ -1,5 +1,5 @@
1
1
  module PaloAlto
2
2
  module Client
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
@@ -21,6 +21,38 @@ module PaloAlto
21
21
  include PaloAlto::V6::CommitApi
22
22
  include PaloAlto::V6::ZoneApi
23
23
  include PaloAlto::V6::JobApi
24
+
25
+
26
+ # Request a configuration based on the starting XML path.
27
+ #
28
+ # == Returns
29
+ #
30
+ # * +Nokogiri::XML::Document+ - Nokogiri XML document to parse information about
31
+ #
32
+ # == Raises
33
+ #
34
+ # * +Exception+ - Raises an exception if the request is unsuccessful
35
+ def xml_config_for(path:)
36
+ virtual_systems_list = []
37
+
38
+ # configure options for the request
39
+ options = {}
40
+ options[:url] = self.endpoint
41
+ options[:method] = :post
42
+ options[:payload] = { type: "config",
43
+ action: "show",
44
+ key: self.auth_key,
45
+ xpath: path }
46
+
47
+ html_result = Helpers::Rest.make_request(options)
48
+
49
+ raise "Error obtaining virtual system XML" if html_result.nil?
50
+
51
+ # parse the XML data
52
+ data = Nokogiri::XML(html_result)
53
+ raise "Error in response XML: #{data.inspect}" if data.xpath('//response/@status').to_s != "success"
54
+ data
55
+ end
24
56
  end
25
57
  end
26
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-paloalto-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Karimi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-27 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: crack