arbor_peakflow_ruby 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5eba0729f4909869481ad52f89856838ba5f79d0
4
- data.tar.gz: 10ec036972ae0b704f1cbe35175f22a34b1887e5
3
+ metadata.gz: 9d0cb86cdce4c6b9e050f079a60dea7fdc9c4fd8
4
+ data.tar.gz: d84fdcef51b993c25ceec09187ff1971b75fd065
5
5
  SHA512:
6
- metadata.gz: 6589c77962c097f16e7d8a7cadcf64ad8ec2745a663ad992643e67235adf227d748962fa400f63bc86c7b5fa8d70c4a004b5cae36a64297c05aa19e035719bd2
7
- data.tar.gz: fbafcba959b0461f9957a10bffc9addd51812c5c0609c0275bda572659ddea1f147a289170009de20556dd6b5ad53ddc58e2d44295615523a4a2b5c9af1da3e5
6
+ metadata.gz: 71d23cb845cb175d2c4b267116cfe20fd6617f498f4402f69a36ba36f0f350cda104529608f5470545e2bf7dbdf9d64137b765d162abd5d7c9fcd8faf0ec63cd
7
+ data.tar.gz: ef3a37836b57a5770c8f7454559b3747de6b122fb4f0253cf2a90438ecbca666087f7e42e7b3e6840863adceb7bf6869010ee7e9871a6b402956ced139478874
@@ -5,13 +5,9 @@ module Arbor
5
5
  # alert information.
6
6
  #
7
7
  # == Parameters:
8
- # - filter: (Optional) Keywords by which you want to filter search
9
- # results. You can enter the same search strings that you can enter in
10
- # the Search box on the Alerts pages in the Web UI.
11
- # - limit: (Optional) The maximum number of alerts to return that match
12
- # the filter.
13
- # - format: The format in which you want the data returned:
14
- # 'json' or 'xml'
8
+ # - +filter+: (Optional) Keywords by which you want to filter search results. You can enter the same search strings that you can enter in the Search box on the Alerts pages in the Web UI.
9
+ # - +limit+: (Optional) The maximum number of alerts to return that match the filter.
10
+ # - +format+: The format in which you want the data returned: `json` or `xml`
15
11
  #
16
12
  # ==== Example
17
13
  #
@@ -1,17 +1,11 @@
1
1
  module Arbor
2
2
  module Peakflow
3
3
  module CP5500
4
- # The CP 5500 function allows you to view CP 5500 appliance configurations
5
- # in JSON format. *Note:* This function is only available with
6
- # appliance-based licensing for Traffic and Analysis Routing appliances
7
- # (formally Collector Platform (CP) appliances).
4
+ # The CP 5500 function allows you to view CP 5500 appliance configurations in JSON format. *Note:* This function is only available with appliance-based licensing for Traffic and Analysis Routing appliances (formally Collector Platform (CP) appliances).
8
5
  #
9
6
  # == Parameters:
10
- # - action: One of the following actions that you want to initiate:
11
- # list, show_schema, update.
12
- # - filter: (Optional) Keywords by which you want to filter search
13
- # results. You can enter the same search strings that you can enter in
14
- # the Search box on the Configure Routers page in the Web UI.
7
+ # - +action+: One of the following actions that you want to initiate: `list`, `show_schema`, `update`.
8
+ # - +filter+: (Optional) Keywords by which you want to filter search results. You can enter the same search strings that you can enter in the Search box on the Configure Routers page in the Web UI.
15
9
  #
16
10
  # ==== Example
17
11
  #
@@ -1,13 +1,10 @@
1
1
  module Arbor
2
2
  module Peakflow
3
3
  module Managed_Object
4
- # The managed object function allows you to view managed object
5
- # configuration data in JSON format.
4
+ # The managed object function allows you to view managed object configuration data in JSON format.
6
5
  #
7
6
  # == Parameters:
8
- # - filter: (Optional) Keywords by which you want to filter search
9
- # results. You can enter the same search strings that you can enter in
10
- # the Search box on the Managed Objects pages in the Web UI.
7
+ # - +filter+: (Optional) Keywords by which you want to filter search results. You can enter the same search strings that you can enter in the Search box on the Managed Objects pages in the Web UI.
11
8
  #
12
9
  # ==== Example
13
10
  #
@@ -1,17 +1,12 @@
1
1
  module Arbor
2
2
  module Peakflow
3
3
  module Mitigations
4
- # The mitigations function allows you to search for and retrieve JSON and
5
- # XML mitigation information.
4
+ # The mitigations function allows you to search for and retrieve JSON and XML mitigation information.
6
5
  #
7
6
  # == Parameters:
8
- # - filter: (Optional) Keywords by which you want to filter search
9
- # results. You can enter the same search strings that you can enter in
10
- # the Search box on the Mitigations pages in the Web UI.
11
- # - limit: (Optional) The maximum number of mitigations to return that
12
- # match the filter.
13
- # - format: The format in which you want the data returned:
14
- # 'json' or 'xml'
7
+ # - +filter+: (Optional) Keywords by which you want to filter search results. You can enter the same search strings that you can enter in the Search box on the Mitigations pages in the Web UI.
8
+ # - +limit+: (Optional) The maximum number of mitigations to return that match the filter.
9
+ # - +format+: The format in which you want the data returned: `json` or `xml`
15
10
  #
16
11
  # ==== Example
17
12
  #
@@ -25,33 +25,29 @@ module Arbor
25
25
  response = @conn.get do |req|
26
26
  req.url 'arborws/traffic'
27
27
  req.params['api_key'] = @api_key
28
- req.params['query'] = encode_xml_for_url(query)
29
- req.params['graph'] = encode_xml_for_url(graph) unless graph.nil?
28
+ req.params['query'] = remove_returns_and_spaces(query)
29
+ req.params['graph'] = remove_returns_and_spaces(graph) unless graph.nil?
30
30
  end
31
31
 
32
32
  response
33
33
  end
34
34
 
35
- # The encode_xml_for_url function allows you to encode an XML file's
36
- # content. This is used automatically when calling the traffic method.
35
+ # The remove_returns_and_spaces function allows you to remove newlines and spaces that are not within tags in XML.
37
36
  #
38
37
  # == Parameters:
39
- # - file_contents: The XML content which should be encoded into a URL
40
- # usable format.
38
+ # - file_contents: The XML content which should be cleaned in preparation for URL encoding.
41
39
  #
42
40
  # ==== Example
43
41
  #
44
42
  # file = File.read('path/to/file.xml')
45
- # encoded_file_contents = client.encode_xml_for_url file
46
- def encode_xml_for_url(file_contents)
47
- encoded_file =
48
- URI.encode(
43
+ # clean_file = client.remove_returns_and_spaces file
44
+ def remove_returns_and_spaces(file_contents)
45
+ clean_file =
49
46
  file_contents
50
- .gsub!(/\n+/, '')
51
- .gsub!(/(\s+)(?![^<])/, '')
52
- ).gsub!(/\?/, '%3F')
47
+ .gsub!(/\n+/, '')
48
+ .gsub!(/(\s+)(?![^<])/, '')
53
49
 
54
- encoded_file
50
+ clean_file
55
51
  end
56
52
  end
57
53
  end
@@ -1,5 +1,5 @@
1
1
  module Arbor
2
2
  module Peakflow
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arbor_peakflow_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Kirsche