waz-cmd 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,4 +1,4 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in waz-cmd.gemspec
4
- gemspec
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in waz-cmd.gemspec
4
+ gemspec
data/LICENSE CHANGED
@@ -1,31 +1,31 @@
1
- Microsoft Public License (Ms-PL)
2
-
3
- This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
4
-
5
- 1. Definitions
6
-
7
- The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
8
-
9
- A "contribution" is the original software, or any additions or changes to the software.
10
-
11
- A "contributor" is any person that distributes its contribution under this license.
12
-
13
- "Licensed patents" are a contributor's patent claims that read directly on its contribution.
14
-
15
- 2. Grant of Rights
16
-
17
- (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
18
-
19
- (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
20
-
21
- 3. Conditions and Limitations
22
-
23
- (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
24
-
25
- (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
26
-
27
- (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
28
-
29
- (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
30
-
31
- (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
1
+ Microsoft Public License (Ms-PL)
2
+
3
+ This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
4
+
5
+ 1. Definitions
6
+
7
+ The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
8
+
9
+ A "contribution" is the original software, or any additions or changes to the software.
10
+
11
+ A "contributor" is any person that distributes its contribution under this license.
12
+
13
+ "Licensed patents" are a contributor's patent claims that read directly on its contribution.
14
+
15
+ 2. Grant of Rights
16
+
17
+ (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
18
+
19
+ (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
20
+
21
+ 3. Conditions and Limitations
22
+
23
+ (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
24
+
25
+ (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
26
+
27
+ (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
28
+
29
+ (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
30
+
31
+ (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
data/README.md CHANGED
@@ -1,66 +1,66 @@
1
- Waz-Cmd
2
- =======
3
-
4
- Installation
5
- ------------
6
-
7
- To install, just `gem install waz-cmd`
8
-
9
- Example usage
10
- -----------
11
-
12
- c:\>waz generate certificates
13
- Writing certificate to 'c:\users\smarx/.waz/cert.pem'
14
- Writing certificate in .cer form to 'c:\users\smarx/.waz/cert.cer'
15
- Writing key to 'c:\users\smarx/.waz/key.pem'
16
-
17
- To use the new certificate, upload 'c:\users\smarx/.waz/cert.cer' as a management certificate in the Windows Azure portal (https://windows.azure.com)
18
-
19
- c:\>waz set subscriptionId XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
20
-
21
- c:\>waz deploy blobedit staging c:\repositories\smarxrole\packages\ExtraSmall.cspkg c:\repositories\smarxrole\packages\ServiceConfiguration.blobedit.cscfg
22
- Waiting for operation to complete...
23
- Operation succeeded (200)
24
-
25
- c:\>waz show deployment blobedit staging
26
- STAGING
27
- Label: ExtraSmall.cspkg2011-07-0120:54:04
28
- Name: 27efeebeb18e4eb582a2e8fa0883957e
29
- Status: Running
30
- Url: http://78a9fdb38bc442238739b1154ea78cda.cloudapp.net/
31
- SDK version: #1.4.20407.2049
32
- ROLES
33
- WebRole (WA-GUEST-OS-2.5_201104-01)
34
- 2 Ready (use --expand to see details)
35
- ENDPOINTS
36
- 157.55.181.17:80 on WebRole
37
-
38
- c:\>waz swap blobedit
39
- Waiting for operation to complete...
40
- Operation succeeded (200)
41
-
42
- c:\>waz show deployment blobedit production
43
- PRODUCTION
44
- Label: ExtraSmall.cspkg2011-07-0120:54:04
45
- Name: 27efeebeb18e4eb582a2e8fa0883957e
46
- Status: Running
47
- Url: http://blobedit.cloudapp.net/
48
- SDK version: #1.4.20407.2049
49
- ROLES
50
- WebRole (WA-GUEST-OS-2.5_201104-01)
51
- 2 Ready (use --expand to see details)
52
- ENDPOINTS
53
- 157.55.181.17:80 on WebRole
54
-
55
- c:\>waz show configuration blobedit production
56
- WebRole
57
- Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString: UseDevelopmentStorage=true
58
- GitUrl: git://github.com/smarx/blobedit
59
- DataConnectionString: DefaultEndpointsProtocol=http;AccountName=YOURACCOUNT;AccountKey=YOURKEY
60
- ContainerName:
61
- NumProcesses: 4
62
-
63
- Documentation
64
- -------------
65
-
66
- Run `waz help` for full documentation.
1
+ Waz-Cmd
2
+ =======
3
+
4
+ Installation
5
+ ------------
6
+
7
+ To install, just `gem install waz-cmd`
8
+
9
+ Example usage
10
+ -----------
11
+
12
+ c:\>waz generate certificates
13
+ Writing certificate to 'c:\users\smarx/.waz/cert.pem'
14
+ Writing certificate in .cer form to 'c:\users\smarx/.waz/cert.cer'
15
+ Writing key to 'c:\users\smarx/.waz/key.pem'
16
+
17
+ To use the new certificate, upload 'c:\users\smarx/.waz/cert.cer' as a management certificate in the Windows Azure portal (https://windows.azure.com)
18
+
19
+ c:\>waz set subscriptionId XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
20
+
21
+ c:\>waz deploy blobedit staging c:\repositories\smarxrole\packages\ExtraSmall.cspkg c:\repositories\smarxrole\packages\ServiceConfiguration.blobedit.cscfg
22
+ Waiting for operation to complete...
23
+ Operation succeeded (200)
24
+
25
+ c:\>waz show deployment blobedit staging
26
+ STAGING
27
+ Label: ExtraSmall.cspkg2011-07-0120:54:04
28
+ Name: 27efeebeb18e4eb582a2e8fa0883957e
29
+ Status: Running
30
+ Url: http://78a9fdb38bc442238739b1154ea78cda.cloudapp.net/
31
+ SDK version: #1.4.20407.2049
32
+ ROLES
33
+ WebRole (WA-GUEST-OS-2.5_201104-01)
34
+ 2 Ready (use --expand to see details)
35
+ ENDPOINTS
36
+ 157.55.181.17:80 on WebRole
37
+
38
+ c:\>waz swap blobedit
39
+ Waiting for operation to complete...
40
+ Operation succeeded (200)
41
+
42
+ c:\>waz show deployment blobedit production
43
+ PRODUCTION
44
+ Label: ExtraSmall.cspkg2011-07-0120:54:04
45
+ Name: 27efeebeb18e4eb582a2e8fa0883957e
46
+ Status: Running
47
+ Url: http://blobedit.cloudapp.net/
48
+ SDK version: #1.4.20407.2049
49
+ ROLES
50
+ WebRole (WA-GUEST-OS-2.5_201104-01)
51
+ 2 Ready (use --expand to see details)
52
+ ENDPOINTS
53
+ 157.55.181.17:80 on WebRole
54
+
55
+ c:\>waz show configuration blobedit production
56
+ WebRole
57
+ Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString: UseDevelopmentStorage=true
58
+ GitUrl: git://github.com/smarx/blobedit
59
+ DataConnectionString: DefaultEndpointsProtocol=http;AccountName=YOURACCOUNT;AccountKey=YOURKEY
60
+ ContainerName:
61
+ NumProcesses: 4
62
+
63
+ Documentation
64
+ -------------
65
+
66
+ Run `waz help` for full documentation.
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/bin/waz CHANGED
@@ -18,6 +18,7 @@ global_option '--pem FILE', 'Name of the .pem file containing the management cer
18
18
  global_option '--key FILE', 'Name of the .pem file containing the private key, default $HOME/.waz/key.pem'
19
19
  global_option '--subscriptionId STRING', 'Subscription ID (a GUID) to operate on'
20
20
  global_option '--expand', 'Expand details where possible (like individual role instances). Default is false'
21
+ global_option '--proxy STRING', 'Proxy to use (e.g. http://foo:8080). Default is $https_proxy or $http_proxy'
21
22
 
22
23
  begin
23
24
  $config = YAML::load(File.read("#{ENV['HOME']}/.wazrc"))
@@ -333,8 +334,8 @@ command 'show deployment' do |c|
333
334
  end
334
335
 
335
336
  command 'show history' do |c|
336
- c.syntax = 'waz show history <application> <deployment-name> [options]'
337
- c.description = 'Show the history of operations on a deployment. Note that deployment name is the GUID of the deployment (find it with something like "waz show deployment <application> production")'
337
+ c.syntax = 'waz show history <application> <deployment-name or staging/production> [options]'
338
+ c.description = 'Show the history of operations on a deployment.'
338
339
  c.option '--startTime STRING', 'Earliest time to retrieve history, in a form like YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ (defaults to yesterday)'
339
340
  c.option '--endTime STRING', 'Latest time to retrieve history, in a form like YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ (defaults to infinity)'
340
341
  c.action do |args, options|
@@ -343,6 +344,10 @@ command 'show history' do |c|
343
344
  raise 'Subscription ID is required' unless options.subscriptionId
344
345
  raise 'Application name is required' unless args.first
345
346
  raise 'Deployment name is required' unless args[1]
347
+ if args[1] == 'staging' or args[1] == 'production' then
348
+ deployment = make_call("services/hostedservices/#{args[0]}/deploymentslots/#{args[1]}", :get, options)['Deployment']
349
+ args[1] = deployment['Name']
350
+ end
346
351
  history = make_call("operations?StartTime=#{options.startTime}&EndTime=#{options.endTime}&ObjectIdFilter=/#{options.subscriptionId}/services/hostedservices/#{args[0]}/deployments/#{args[1]}", :get, options)['SubscriptionOperationCollection']['SubscriptionOperations']
347
352
  puts Tilt.new(template('show_history.erb'), 1, :trim => '%').render(nil, :history => history)
348
353
  end
@@ -1,109 +1,113 @@
1
- module Waz
2
- module Cmd
3
- begin
4
- require 'faster_require' if RUBY_PLATFORM =~ /win32|mingw32/
5
- rescue LoadError
6
- puts 'WARNING: Waz will run faster on Windows if you install the "faster_require" gem.'
7
- end
8
- require 'rexml/document'
9
- require 'rexml/xpath'
10
- require 'iconv'
11
- begin
12
- require 'Win32/Console/ANSI' if RUBY_PLATFORM =~ /win32|mingw32/
13
- rescue LoadError
14
- puts 'WARNING: Output will look weird on Windows unless you install the "win32console" gem.'
15
- end
16
- require 'openssl'
17
- require 'rest_client'
18
- require 'tilt'
19
- require 'base64'
20
- require 'yaml'
21
- require 'crack'
22
- require 'nokogiri'
23
-
24
- def set_defaults(options)
25
- options.default :pem => "#{ENV['HOME']}/.waz/cert.pem", :cer => "#{ENV['HOME']}/.waz/cert.cer", :key => "#{ENV['HOME']}/.waz/key.pem"
26
- options.default :subscriptionId => $config['subscriptionId'] if $config['subscriptionId']
27
- end
28
-
29
- def make_call(path, method, options, body=nil)
30
- headers = { 'x-ms-version' => '2011-06-01' }
31
- headers['Content-Type'] = 'application/xml' unless body.nil?
32
- options = {
33
- :url => "https://management.core.windows.net/#{options.subscriptionId}/#{path}",
34
- :method => method,
35
- :headers => headers,
36
- :ssl_client_cert => OpenSSL::X509::Certificate.new(File.read(options.pem)),
37
- :ssl_client_key => OpenSSL::PKey::RSA.new(File.read(options.key))
38
- }
39
- options[:payload] = body unless body.nil?
40
- if block_given?
41
- yield RestClient::Request.execute options
42
- else
43
- Crack::XML.parse RestClient::Request.execute options
44
- end
45
- end
46
-
47
- def arrayize(x)
48
- return [] if x.nil?
49
- return x if x.kind_of?(Array)
50
- return [x]
51
- end
52
-
53
- def restar_instance(star)
54
- command "re#{star} instance" do |c|
55
- c.syntax = "waz re#{star} instance <application> <production|staging> <instance> [options]"
56
- c.description = "Re#{star} the specified instance"
57
- c.action do |args, options|
58
- set_defaults options
59
- raise 'Subscription ID is required' unless options.subscriptionId
60
- raise 'Application name is required' unless args[0]
61
- raise 'Deployment name is required' unless args[1]
62
- raise 'Instance name is required' unless args[2]
63
- make_call("services/hostedservices/#{args[0]}/deploymentslots/#{args[1]}/roleinstances/#{args[2]}?comp=re#{star}", :post, options, '') do |response|
64
- wait_for_completion options, response.headers[:x_ms_request_id]
65
- end
66
- end
67
- end
68
- end
69
-
70
- def startstop(verb, status)
71
- command verb do |c|
72
- c.syntax = "waz #{verb} <application> <production|staging> [options]"
73
- c.description = "#{verb.capitalize} the deployment in the specified slot of the specified application"
74
- c.action do |args, options|
75
- set_defaults options
76
- raise 'Subscription ID is required' unless options.subscriptionId
77
- raise 'Application name is required' unless args[0]
78
- raise 'Deployment slot is required' unless args[1]
79
-
80
- make_call("services/hostedservices/#{args[0]}/deploymentslots/#{args[1]}/?comp=status", :post, options,
81
- Nokogiri::XML::Builder.new(:encoding => 'utf-8') { |xml|
82
- xml.UpdateDeploymentStatus('xmlns' => 'http://schemas.microsoft.com/windowsazure') {
83
- xml.Status status
84
- }
85
- }.to_xml) do |response|
86
- wait_for_completion options, response.headers[:x_ms_request_id]
87
- end
88
- end
89
- end
90
- end
91
-
92
- def wait_for_completion(options, requestId)
93
- puts 'Waiting for operation to complete...'
94
- done = false
95
- while not done
96
- status = make_call("operations/#{requestId}", :get, options)['Operation']
97
- done = status['Status'] != 'InProgress'
98
- if done
99
- puts "Operation #{status['Status'].downcase} (#{status['HttpStatusCode']})"
100
- if status['Error']
101
- puts "#{status['Error']['Code']}: #{status['Error']['Message']}"
102
- end
103
- else
104
- sleep 10
105
- end
106
- end
107
- end
108
- end
109
- end
1
+ module Waz
2
+ module Cmd
3
+ begin
4
+ require 'faster_require' if RUBY_PLATFORM =~ /win32|mingw32/
5
+ rescue LoadError
6
+ puts 'WARNING: Waz will run faster on Windows if you install the "faster_require" gem.'
7
+ end
8
+ require 'rexml/document'
9
+ require 'rexml/xpath'
10
+ require 'iconv'
11
+ begin
12
+ require 'Win32/Console/ANSI' if RUBY_PLATFORM =~ /win32|mingw32/
13
+ rescue LoadError
14
+ puts 'WARNING: Output will look weird on Windows unless you install the "win32console" gem.'
15
+ end
16
+ require 'openssl'
17
+ require 'rest_client'
18
+ require 'tilt'
19
+ require 'base64'
20
+ require 'yaml'
21
+ require 'crack'
22
+ require 'nokogiri'
23
+
24
+ def set_defaults(options)
25
+ options.default :pem => "#{ENV['HOME']}/.waz/cert.pem", :cer => "#{ENV['HOME']}/.waz/cert.cer", :key => "#{ENV['HOME']}/.waz/key.pem"
26
+ options.default :subscriptionId => $config['subscriptionId'] if $config['subscriptionId']
27
+ proxy = ENV['https_proxy'] || ENV['HTTPS_PROXY'] || ENV['http_proxy'] || ENV['HTTP_PROXY'] || ENV['all_proxy'] || ENV['ALL_PROXY']
28
+ proxy = 'https://' + proxy if proxy and not proxy =~ /^https?:\/\//i
29
+ options.default :proxy => proxy if proxy
30
+ end
31
+
32
+ def make_call(path, method, options, body=nil)
33
+ headers = { 'x-ms-version' => '2011-06-01' }
34
+ headers['Content-Type'] = 'application/xml' unless body.nil?
35
+ RestClient.proxy = options.proxy if options.proxy
36
+ options = {
37
+ :url => "https://management.core.windows.net/#{options.subscriptionId}/#{path}",
38
+ :method => method,
39
+ :headers => headers,
40
+ :ssl_client_cert => OpenSSL::X509::Certificate.new(File.read(options.pem)),
41
+ :ssl_client_key => OpenSSL::PKey::RSA.new(File.read(options.key))
42
+ }
43
+ options[:payload] = body unless body.nil?
44
+ if block_given?
45
+ yield RestClient::Request.execute options
46
+ else
47
+ Crack::XML.parse RestClient::Request.execute options
48
+ end
49
+ end
50
+
51
+ def arrayize(x)
52
+ return [] if x.nil?
53
+ return x if x.kind_of?(Array)
54
+ return [x]
55
+ end
56
+
57
+ def restar_instance(star)
58
+ command "re#{star} instance" do |c|
59
+ c.syntax = "waz re#{star} instance <application> <production|staging> <instance> [options]"
60
+ c.description = "Re#{star} the specified instance"
61
+ c.action do |args, options|
62
+ set_defaults options
63
+ raise 'Subscription ID is required' unless options.subscriptionId
64
+ raise 'Application name is required' unless args[0]
65
+ raise 'Deployment name is required' unless args[1]
66
+ raise 'Instance name is required' unless args[2]
67
+ make_call("services/hostedservices/#{args[0]}/deploymentslots/#{args[1]}/roleinstances/#{args[2]}?comp=re#{star}", :post, options, '') do |response|
68
+ wait_for_completion options, response.headers[:x_ms_request_id]
69
+ end
70
+ end
71
+ end
72
+ end
73
+
74
+ def startstop(verb, status)
75
+ command verb do |c|
76
+ c.syntax = "waz #{verb} <application> <production|staging> [options]"
77
+ c.description = "#{verb.capitalize} the deployment in the specified slot of the specified application"
78
+ c.action do |args, options|
79
+ set_defaults options
80
+ raise 'Subscription ID is required' unless options.subscriptionId
81
+ raise 'Application name is required' unless args[0]
82
+ raise 'Deployment slot is required' unless args[1]
83
+
84
+ make_call("services/hostedservices/#{args[0]}/deploymentslots/#{args[1]}/?comp=status", :post, options,
85
+ Nokogiri::XML::Builder.new(:encoding => 'utf-8') { |xml|
86
+ xml.UpdateDeploymentStatus('xmlns' => 'http://schemas.microsoft.com/windowsazure') {
87
+ xml.Status status
88
+ }
89
+ }.to_xml) do |response|
90
+ wait_for_completion options, response.headers[:x_ms_request_id]
91
+ end
92
+ end
93
+ end
94
+ end
95
+
96
+ def wait_for_completion(options, requestId)
97
+ puts 'Waiting for operation to complete...'
98
+ done = false
99
+ while not done
100
+ status = make_call("operations/#{requestId}", :get, options)['Operation']
101
+ done = status['Status'] != 'InProgress'
102
+ if done
103
+ puts "Operation #{status['Status'].downcase} (#{status['HttpStatusCode']})"
104
+ if status['Error']
105
+ puts "#{status['Error']['Code']}: #{status['Error']['Message']}"
106
+ end
107
+ else
108
+ sleep 10
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end
@@ -1,3 +1,3 @@
1
- <%= Base64.decode64 group['Label'] %>
2
- Name: <%= group['Name'] %>
3
- Location: <%= group['Location'] %>
1
+ <%= Base64.decode64 group['Label'] %>
2
+ Name: <%= group['Name'] %>
3
+ Location: <%= group['Location'] %>
@@ -1,21 +1,21 @@
1
- % if history['SubscriptionOperation'].nil?
2
- No history to display.
3
- % else
4
- % operations = history['SubscriptionOperation']
5
- % operations = [operations] unless operations.kind_of? Array
6
- % operations.each do |operation|
7
- <%= $terminal.color operation['OperationName'], :bold %>
8
- ID: <%= operation['OperationId'] %>
9
- Parameters: <%= operation['OperationParameters']['OperationParameter'].sort{|a,b| a['a:Name'] <=> b['a:Name']}.map{|p| "#{p['a:Name']}=#{p['a:Value'].length > 30 ? '...' : p['a:Value']}"}.join ', ' %>
10
- Status: <%= operation['OperationStatus']['Status'] %> (<%= operation['OperationStatus']['HttpStatusCode'] %>)
11
- Start: <%= operation['OperationStartedTime'] %>
12
- % if operation['OperationCompletedTime']
13
- Completed: <%= operation['OperationCompletedTime'] %>
14
- % end
15
- % if operation['OperationCaller']['UsedServiceManagementApi'] == 'true'
16
- Caller: <%= operation['OperationCaller']['ClientIP'] %> (<%= operation['OperationCaller']['SubscriptionCertificateThumbprint'] %>)
17
- % else
18
- Caller: <%= operation['OperationCaller']['UserEmailAddress'] %>
19
- % end
20
- % end
21
- % end
1
+ % if history.nil? or history['SubscriptionOperation'].nil?
2
+ No history to display.
3
+ % else
4
+ % operations = history['SubscriptionOperation']
5
+ % operations = [operations] unless operations.kind_of? Array
6
+ % operations.each do |operation|
7
+ <%= $terminal.color operation['OperationName'], :bold %>
8
+ ID: <%= operation['OperationId'] %>
9
+ Parameters: <%= operation['OperationParameters']['OperationParameter'].sort{|a,b| a['a:Name'] <=> b['a:Name']}.map{|p| "#{p['a:Name']}=#{p['a:Value'].length > 30 ? '...' : p['a:Value']}"}.join ', ' %>
10
+ Status: <%= operation['OperationStatus']['Status'] %> (<%= operation['OperationStatus']['HttpStatusCode'] %>)
11
+ Start: <%= operation['OperationStartedTime'] %>
12
+ % if operation['OperationCompletedTime']
13
+ Completed: <%= operation['OperationCompletedTime'] %>
14
+ % end
15
+ % if operation['OperationCaller']['UsedServiceManagementApi'] == 'true'
16
+ Caller: <%= operation['OperationCaller']['ClientIP'] %> (<%= operation['OperationCaller']['SubscriptionCertificateThumbprint'] %>)
17
+ % else
18
+ Caller: <%= operation['OperationCaller']['UserEmailAddress'] %>
19
+ % end
20
+ % end
21
+ % end
@@ -1,5 +1,5 @@
1
- module Waz
2
- module Cmd
3
- VERSION = "0.4.1"
4
- end
5
- end
1
+ module Waz
2
+ module Cmd
3
+ VERSION = "0.4.2"
4
+ end
5
+ end
@@ -1,26 +1,26 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "waz-cmd/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "waz-cmd"
7
- s.version = Waz::Cmd::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Steve Marx"]
10
- s.email = ["Steve.Marx@microsoft.com"]
11
- s.homepage = "http://github.com/smarx/waz-cmd"
12
- s.summary = %q{Command-line tool to manage Windows Azure applications and storage accounts.}
13
- s.description = %q{This gem allows you to perform most of the available operations in the Windows Azure Service Management API from a friendly commandline tool.}
14
-
15
- s.files = `git ls-files`.split("\n")
16
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
- s.require_paths = ["lib"]
19
-
20
- s.add_dependency('commander', '4.0.4')
21
- s.add_dependency('tilt')
22
- s.add_dependency('crack')
23
- s.add_dependency('nokogiri')
24
- s.add_dependency('waz-storage')
25
- s.add_dependency('uuidtools')
26
- end
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "waz-cmd/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "waz-cmd"
7
+ s.version = Waz::Cmd::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Steve Marx"]
10
+ s.email = ["Steve.Marx@microsoft.com"]
11
+ s.homepage = "http://github.com/smarx/waz-cmd"
12
+ s.summary = %q{Command-line tool to manage Windows Azure applications and storage accounts.}
13
+ s.description = %q{This gem allows you to perform most of the available operations in the Windows Azure Service Management API from a friendly commandline tool.}
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency('commander', '4.0.4')
21
+ s.add_dependency('tilt')
22
+ s.add_dependency('crack')
23
+ s.add_dependency('nokogiri')
24
+ s.add_dependency('waz-storage')
25
+ s.add_dependency('uuidtools')
26
+ end
metadata CHANGED
@@ -1,112 +1,91 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: waz-cmd
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 4
8
- - 1
9
- version: 0.4.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.2
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Steve Marx
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-09-22 00:00:00 -07:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2011-10-11 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: commander
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70174562412280 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - "="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 4
30
- - 0
31
- - 4
18
+ requirements:
19
+ - - =
20
+ - !ruby/object:Gem::Version
32
21
  version: 4.0.4
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: tilt
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70174562412280
25
+ - !ruby/object:Gem::Dependency
26
+ name: tilt
27
+ requirement: &70174562411860 !ruby/object:Gem::Requirement
39
28
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
46
33
  type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: crack
50
34
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70174562411860
36
+ - !ruby/object:Gem::Dependency
37
+ name: crack
38
+ requirement: &70174562411380 !ruby/object:Gem::Requirement
52
39
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 0
58
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
59
44
  type: :runtime
60
- version_requirements: *id003
61
- - !ruby/object:Gem::Dependency
62
- name: nokogiri
63
45
  prerelease: false
64
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70174562411380
47
+ - !ruby/object:Gem::Dependency
48
+ name: nokogiri
49
+ requirement: &70174562410960 !ruby/object:Gem::Requirement
65
50
  none: false
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 0
71
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
72
55
  type: :runtime
73
- version_requirements: *id004
74
- - !ruby/object:Gem::Dependency
75
- name: waz-storage
76
56
  prerelease: false
77
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *70174562410960
58
+ - !ruby/object:Gem::Dependency
59
+ name: waz-storage
60
+ requirement: &70174562410540 !ruby/object:Gem::Requirement
78
61
  none: false
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- segments:
83
- - 0
84
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
85
66
  type: :runtime
86
- version_requirements: *id005
87
- - !ruby/object:Gem::Dependency
88
- name: uuidtools
89
67
  prerelease: false
90
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *70174562410540
69
+ - !ruby/object:Gem::Dependency
70
+ name: uuidtools
71
+ requirement: &70174562410100 !ruby/object:Gem::Requirement
91
72
  none: false
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- segments:
96
- - 0
97
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
98
77
  type: :runtime
99
- version_requirements: *id006
100
- description: This gem allows you to perform most of the available operations in the Windows Azure Service Management API from a friendly commandline tool.
101
- email:
78
+ prerelease: false
79
+ version_requirements: *70174562410100
80
+ description: This gem allows you to perform most of the available operations in the
81
+ Windows Azure Service Management API from a friendly commandline tool.
82
+ email:
102
83
  - Steve.Marx@microsoft.com
103
- executables:
84
+ executables:
104
85
  - waz
105
86
  extensions: []
106
-
107
87
  extra_rdoc_files: []
108
-
109
- files:
88
+ files:
110
89
  - .gitignore
111
90
  - Gemfile
112
91
  - LICENSE
@@ -126,37 +105,28 @@ files:
126
105
  - lib/waz-cmd/templates/show_storage.erb
127
106
  - lib/waz-cmd/version.rb
128
107
  - waz-cmd.gemspec
129
- has_rdoc: true
130
108
  homepage: http://github.com/smarx/waz-cmd
131
109
  licenses: []
132
-
133
110
  post_install_message:
134
111
  rdoc_options: []
135
-
136
- require_paths:
112
+ require_paths:
137
113
  - lib
138
- required_ruby_version: !ruby/object:Gem::Requirement
114
+ required_ruby_version: !ruby/object:Gem::Requirement
139
115
  none: false
140
- requirements:
141
- - - ">="
142
- - !ruby/object:Gem::Version
143
- segments:
144
- - 0
145
- version: "0"
146
- required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
147
121
  none: false
148
- requirements:
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- segments:
152
- - 0
153
- version: "0"
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
154
126
  requirements: []
155
-
156
127
  rubyforge_project:
157
- rubygems_version: 1.3.7
128
+ rubygems_version: 1.8.10
158
129
  signing_key:
159
130
  specification_version: 3
160
131
  summary: Command-line tool to manage Windows Azure applications and storage accounts.
161
132
  test_files: []
162
-