virtualmaster 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fed6b617e4c8894e4e2dce0414634f707e7be28d
4
+ data.tar.gz: 20f3861cca0a88b7a42a0d83fcadbdafa654e426
5
+ SHA512:
6
+ metadata.gz: c96e127bba630aaa93541691027f166bd25e63570de728aec588a3e8c88e4551914687bbde9e5e087becc0abdf826f97c17a84310e928131a046bcddc4cd43f5
7
+ data.tar.gz: 4b63cba421b1cfadab508d9b9a1092f9b886e1a98233b664dd4e781f82c5dca2c00352c6a7ffbb394382037647283f348123500ccc1208e746743acd55cbe929
@@ -1,5 +1,5 @@
1
1
  require 'yaml'
2
- require 'deltacloud'
2
+ require 'deltacloud_vm/client'
3
3
 
4
4
  module VirtualMaster
5
5
  class CLI
@@ -38,8 +38,8 @@ module VirtualMaster
38
38
  end
39
39
 
40
40
  begin
41
- @@api = DeltaCloud.new(@@config[:username], @@config[:password], VirtualMaster::DEFAULT_URL)
42
- rescue DeltaCloud::API::BackendError => e
41
+ @@api = DeltacloudVM::Client(VirtualMaster::DEFAULT_URL, @@config[:username], @@config[:password])
42
+ rescue DeltacloudVM::Client::BackendError => e
43
43
  abort "Invalid API response: #{e.message}"
44
44
  rescue Exception => e
45
45
  abort "Unable to connect to Virtualmaster's DeltaCloud API: #{e.message}"
@@ -26,7 +26,7 @@ command :config do |c|
26
26
 
27
27
  # verify and store credentials
28
28
  begin
29
- api = DeltaCloud.new(options.username, options.password, VirtualMaster::DEFAULT_URL)
29
+ api = DeltacloudVM::Client(VirtualMaster::DEFAULT_URL, options.username, options.password)
30
30
 
31
31
  config = {
32
32
  'username' => options.username,
@@ -41,7 +41,7 @@ command :config do |c|
41
41
  end
42
42
 
43
43
  say "Setting stored under #{config_file}"
44
- rescue DeltaCloud::API::BackendError => e
44
+ rescue DeltacloudVM::Client::BackendError => e
45
45
  say "Unable to connect to VirtualMaster API: #{e.message}"
46
46
  rescue Exception => e
47
47
  say "Unable to configure environment: #{e.message}"
@@ -3,6 +3,7 @@ require 'net/ssh'
3
3
  require 'logger'
4
4
  require "base64"
5
5
  require 'openssl'
6
+ require 'xmlsimple'
6
7
 
7
8
  log = Logger.new(STDOUT)
8
9
  log.level = Logger::WARN
@@ -85,9 +86,10 @@ command :create do |c|
85
86
  say "Instance launch request accepted. Instance ID #{instance.id}"
86
87
 
87
88
  # FIXME authentication is missrepresented within Ruby object
88
- password = instance.authentication[:username]
89
+ instance_hash = XmlSimple.new().xml_in(instance.original_body.body)
90
+ password = instance_hash['authentication'].first['login'].first['password'].first
89
91
  puts
90
- say "Default password '#{password}'"
92
+ say "Default password #{password}"
91
93
  puts
92
94
 
93
95
  options.password = password
@@ -121,7 +123,7 @@ command :list do |c|
121
123
 
122
124
  VirtualMaster::Helpers.get_instances.each do |instance|
123
125
  unless instance.public_addresses.first.nil?
124
- ip_address = instance.public_addresses.first[:address]
126
+ ip_address = instance.public_addresses.first.value
125
127
  else
126
128
  ip_address = "(not assigned)"
127
129
  end
@@ -1,5 +1,5 @@
1
1
  module VirtualMaster
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
 
4
4
  def self.cli_spec_version
5
5
  VERSION.to_f.to_s
@@ -1,11 +1,11 @@
1
1
  require 'spec_helper'
2
- require 'deltacloud'
2
+ require 'deltacloud/client'
3
3
  require 'vmaster/helpers'
4
4
 
5
5
  describe "DeltaCloud API integration" do
6
6
  it "should return HTTP 401 when called without valid credentials" do
7
7
  lambda {
8
- DeltaCloud.new(nil,nil, VirtualMaster::DEFAULT_URL)
9
- }.should raise_error(DeltaCloud::API::BackendError, "401 : Not authorized / Invalid credentials")
8
+ DeltacloudVM::Client(VirtualMaster::DEFAULT_URL, nil,nil)
9
+ }.should raise_error(DeltacloudVM::Client::BackendError, "401 : Not authorized / Invalid credentials")
10
10
  end
11
11
  end
@@ -22,10 +22,11 @@ Gem::Specification.new do |s|
22
22
  # s.add_development_dependency "rspec"
23
23
  # s.add_runtime_dependency "rest-client"
24
24
 
25
- s.add_dependency "commander", "~> 4.1.2"
26
- s.add_dependency "deltacloud-client", "~> 0.5.0"
27
- s.add_dependency "terminal-table", "~> 1.4.4"
28
- s.add_dependency "net-ssh", "~> 2.3.0"
25
+ s.add_dependency "commander", "~> 4.3"
26
+ s.add_dependency "deltacloud-client-vm", "~> 1.1.4.3"
27
+ s.add_dependency "terminal-table", "~> 1.5"
28
+ s.add_dependency "net-ssh", "~> 2.9"
29
+ s.add_dependency "xml-simple", "~> 1.1"
29
30
 
30
31
  s.add_development_dependency "rspec", "~> 2"
31
32
  s.add_development_dependency "simplecov"
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtualmaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
5
- prerelease:
4
+ version: 0.1.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Adam Kliment
@@ -10,118 +9,118 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-11-15 00:00:00.000000000 Z
12
+ date: 2015-09-02 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: commander
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ~>
18
+ - - "~>"
21
19
  - !ruby/object:Gem::Version
22
- version: 4.1.2
20
+ version: '4.3'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ~>
25
+ - - "~>"
29
26
  - !ruby/object:Gem::Version
30
- version: 4.1.2
27
+ version: '4.3'
31
28
  - !ruby/object:Gem::Dependency
32
- name: deltacloud-client
29
+ name: deltacloud-client-vm
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ~>
32
+ - - "~>"
37
33
  - !ruby/object:Gem::Version
38
- version: 0.5.0
34
+ version: 1.1.4.3
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ~>
39
+ - - "~>"
45
40
  - !ruby/object:Gem::Version
46
- version: 0.5.0
41
+ version: 1.1.4.3
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: terminal-table
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ~>
46
+ - - "~>"
53
47
  - !ruby/object:Gem::Version
54
- version: 1.4.4
48
+ version: '1.5'
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ~>
53
+ - - "~>"
61
54
  - !ruby/object:Gem::Version
62
- version: 1.4.4
55
+ version: '1.5'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: net-ssh
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ~>
60
+ - - "~>"
69
61
  - !ruby/object:Gem::Version
70
- version: 2.3.0
62
+ version: '2.9'
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ~>
67
+ - - "~>"
77
68
  - !ruby/object:Gem::Version
78
- version: 2.3.0
69
+ version: '2.9'
70
+ - !ruby/object:Gem::Dependency
71
+ name: xml-simple
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '1.1'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '1.1'
79
84
  - !ruby/object:Gem::Dependency
80
85
  name: rspec
81
86
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
87
  requirements:
84
- - - ~>
88
+ - - "~>"
85
89
  - !ruby/object:Gem::Version
86
90
  version: '2'
87
91
  type: :development
88
92
  prerelease: false
89
93
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
94
  requirements:
92
- - - ~>
95
+ - - "~>"
93
96
  - !ruby/object:Gem::Version
94
97
  version: '2'
95
98
  - !ruby/object:Gem::Dependency
96
99
  name: simplecov
97
100
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
101
  requirements:
100
- - - ! '>='
102
+ - - ">="
101
103
  - !ruby/object:Gem::Version
102
104
  version: '0'
103
105
  type: :development
104
106
  prerelease: false
105
107
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
108
  requirements:
108
- - - ! '>='
109
+ - - ">="
109
110
  - !ruby/object:Gem::Version
110
111
  version: '0'
111
112
  - !ruby/object:Gem::Dependency
112
113
  name: simplecov-rcov
113
114
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
115
  requirements:
116
- - - ! '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
122
  requirements:
124
- - - ! '>='
123
+ - - ">="
125
124
  - !ruby/object:Gem::Version
126
125
  version: '0'
127
126
  description: Command line interface to Virtualmaster. Control your virtual infrastructure.
@@ -132,7 +131,7 @@ executables:
132
131
  extensions: []
133
132
  extra_rdoc_files: []
134
133
  files:
135
- - .gitignore
134
+ - ".gitignore"
136
135
  - Gemfile
137
136
  - Gemfile.lock
138
137
  - README.mdown
@@ -155,30 +154,26 @@ files:
155
154
  - virtualmaster.gemspec
156
155
  homepage: https://github.com/virtualmaster/virtualmaster-cli
157
156
  licenses: []
157
+ metadata: {}
158
158
  post_install_message:
159
159
  rdoc_options: []
160
160
  require_paths:
161
161
  - lib
162
162
  required_ruby_version: !ruby/object:Gem::Requirement
163
- none: false
164
163
  requirements:
165
- - - ! '>='
164
+ - - ">="
166
165
  - !ruby/object:Gem::Version
167
166
  version: '0'
168
167
  required_rubygems_version: !ruby/object:Gem::Requirement
169
- none: false
170
168
  requirements:
171
- - - ! '>='
169
+ - - ">="
172
170
  - !ruby/object:Gem::Version
173
171
  version: '0'
174
172
  requirements: []
175
173
  rubyforge_project: vmaster
176
- rubygems_version: 1.8.24
174
+ rubygems_version: 2.4.6
177
175
  signing_key:
178
- specification_version: 3
176
+ specification_version: 4
179
177
  summary: Command line interface to Virtualmaster
180
- test_files:
181
- - spec/commands_spec.rb
182
- - spec/deltacloud_spec.rb
183
- - spec/spec_helper.rb
178
+ test_files: []
184
179
  has_rdoc: