vzcdn 0.1.5 → 0.1.6

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: ea3992e358c4d3ae986c6034772689c8f179bed3
4
- data.tar.gz: 5ae5616ae6c38ba917b5385a2e886c5932743d4a
3
+ metadata.gz: f8158f90675470e0fa95e4fe2654edfa790cd427
4
+ data.tar.gz: 51696aaebe7b91c08887e95b4f4f25def070db16
5
5
  SHA512:
6
- metadata.gz: 7dbc5bef2dfd8f9f36008e5e39af44822168a68d22e8ec79faf247a5247fdf2b9640237a78f7771b61b4171c626661c839aa115f197f343e84d852b0cbb37b05
7
- data.tar.gz: 2420c36df9dec21484824c3097dcf44ea5ea3a8a43f46d7f1305101e8faa4306018c97d5d52a509b6b30c8d93b70a2622b40cc8f1c779262c5219264fb36bc7e
6
+ metadata.gz: f1cb6f03cf61ff1e97c73c131565ef741dfcdd6501e9b847fee3012221abd1fee4bef87b7389822a63aeb824768acdf525399a285233e3fe8ce5e52bd9bfe207
7
+ data.tar.gz: 5b5246223ab965da2bc5bf757f26be0288f2eceb932ab9134f03a5972443ab4ce7334663232248bca69b7f62f899771d5ab61eb93963856671e4be70b774b068
data/README.md CHANGED
@@ -4,7 +4,7 @@ Commandline UI for Edgecast API
4
4
 
5
5
  ##RELEASE NOTES
6
6
 
7
- 2014/04/09 0.1.5
7
+ 2014/04/17 0.1.6
8
8
  * Default action - print
9
9
  * Presentation changes for zone display ( <object> to "...", array elements to [num] etc)
10
10
  * Column customization in display
@@ -21,7 +21,8 @@ class ConfigInit < Command
21
21
 
22
22
  print_cfg = {
23
23
  "zone" => ["ZoneId", "DomainName", "ZoneType", "Status", "Version", "Records", "FailoverGroups", "LoadBalancingGroups"],
24
- "zone.FailoverGroups.Group.AAAA" => ["Record", "IsPrimary", "HealthCheck"]
24
+ "zone.FailoverGroups.Group.AAAA" => ["Record", "IsPrimary", "HealthCheck"],
25
+ "zonelist" => ["DomainName", "ZoneId", "Status"]
25
26
  }
26
27
  File.open(config_file("print.cfg"), "w").write(JSON.pretty_generate print_cfg)
27
28
  end
@@ -37,7 +37,9 @@ class CommonRestUtils
37
37
  raise "Bad response code:" + response.code.to_s
38
38
  end
39
39
  if (response.length > 0)
40
- File.open("raw.json", "w").write(response)
40
+ if $debug
41
+ File.open("raw.json", "w").write(response)
42
+ end
41
43
  JSON.parse response
42
44
  else
43
45
  nil
@@ -106,6 +106,13 @@ class Route
106
106
  }
107
107
  end
108
108
 
109
+ def translate_zonelist(zonelist)
110
+ return nil if zonelist.nil?
111
+ zonelist.each { |zone|
112
+ translate_value(:zone_status, zone, "Status")
113
+ }
114
+ end
115
+
109
116
  def translate_zone(zone)
110
117
  return nil if zone.nil?
111
118
  translate_value(:zone_status, zone, "Status")
@@ -1,3 +1,3 @@
1
1
  module Vzcdn
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -107,6 +107,7 @@ class Zone < Command
107
107
 
108
108
  def list
109
109
  zones = Route.do.get_all_zones
110
+ Route.do.translate_zonelist(zones)
110
111
  StructurePrint.new('~').structure_print(zones, "zonelist")
111
112
  end
112
113
 
@@ -149,7 +150,9 @@ class Zone < Command
149
150
  if zone.nil?
150
151
  raise "zone doesn't exist or is empty"
151
152
  end
152
- File.open("raw.zone","w").write(zone)
153
+ if $debug
154
+ File.open("raw.zone","w").write(zone)
155
+ end
153
156
  Route.do.translate_zone(zone)
154
157
  end
155
158
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vzcdn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Preston