megam_api 0.10 → 0.11

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: 8dcfa506cd9c13c5a5dc800f50a0799931c92bc2
4
- data.tar.gz: 07255c089583118b97dcd99c4583dd6d22f3344d
3
+ metadata.gz: b596f43aff236e1f432583c681e9207d351b9fac
4
+ data.tar.gz: 2244e795603cb0752b936777810e781edea5011c
5
5
  SHA512:
6
- metadata.gz: 3121106a5c955d5aaff6b25296116aa883a02d97a66415db939f7cf63b82b4436fb8e33543f1dd12d8c0a3dcdcde61aa6f78857cf52a8526be0d251b012fd23c
7
- data.tar.gz: 0567738c16591b74ab9cfa05fd296184d346802221468eaab50999ca4c13487f3cc27708482a6643577ba5d68e23ed29ac83f9aff81c418bc61e0a1e9c638df5
6
+ metadata.gz: cb6ed13dfb045eb9135737559d1b8e655aef6e2c7ef891ce16f778ccda137dd63d8178d05a4d8a7de4313195786862afbc59dd5ef4c125b369e9b3ae0fa388c3
7
+ data.tar.gz: 78ed5f63995b668796d052c9be4f0611aea7e1b26a9f513a07da1ef8141626ca497e64caa8aba43062234158bb2416039ce397cb8d392b769286568408a2d550
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.10"
3
+ VERSION = "0.11"
4
4
  end
5
5
  end
@@ -15,11 +15,9 @@
15
15
  #
16
16
  module Megam
17
17
  class DeleteNode < Megam::ServerAPI
18
-
19
- def initialize(email=nil, api_key=nil)
18
+ def initialize(email=nil, api_key=nil)
20
19
  super(email, api_key)
21
20
  end
22
-
23
21
 
24
22
  def self.create(data, group, action, tmp_email=nil, tmp_api_key=nil)
25
23
  delete_command = self.new(tmp_email, tmp_api_key)
@@ -39,21 +37,26 @@ module Megam
39
37
  hash = {"msg" => se.message, "msg_type" => "error"}
40
38
  re = Megam::Error.from_hash(hash)
41
39
  return re
42
- end
43
-
44
- node = node_collection.data[:body].lookup(data[:node_name])
40
+ end
41
+ node = node_collection.data[:body].lookup(data[:node_name])
45
42
  tool = ct_collection.data[:body].lookup(node.request[:command]['systemprovider']['provider']['prov'])
46
43
  template = tool.cloudtemplates.lookup(node.request[:command]['compute']['cctype'])
47
- cloud_instruction = template.lookup_by_instruction(group, action)
48
- cts = cts_collection.data[:body].lookup(data[:repo])
49
- ci_command = "#{cloud_instruction.command}"
44
+ cloud_instruction = template.lookup_by_instruction(group, action)
45
+ cts = cts_collection.data[:body].lookup(data[:repo])
46
+ ci_command = "#{cloud_instruction.command}"
50
47
  if ci_command["<node_name>"].present?
51
- ci_command["<node_name>"] = "#{data[:node_name]}"
52
- end
48
+ ci_command["<node_name>"] = "#{data[:node_name]}"
49
+ end
50
+ u = URI.parse(node.request[:command]['compute']['access']['vault_location'])
51
+ u.path[0]=""
52
+ if ci_command["-f"].present?
53
+ ci_command["-f"] = "-f " + u.path + "/#{node.request[:command]['compute']['cctype']}.json"
54
+ end
55
+
53
56
  if ci_command["-c"].present?
54
- ci_command["-c"] = "-c #{cts.conf_location}"
55
- end
56
- command_hash = {
57
+ ci_command["-c"] = "-c #{cts.conf_location}"
58
+ end
59
+ command_hash = {
57
60
  "systemprovider" => {
58
61
  "provider" => {
59
62
  "prov" => "#{node.request[:command]['systemprovider']['provider']['prov']}"
@@ -85,7 +88,7 @@ module Megam
85
88
  "name" => "-N #{data[:node_name]}"
86
89
  }
87
90
  }
88
- }
91
+ }
89
92
  node_hash = {
90
93
  "node_name" => "#{data[:node_name]}",
91
94
  "node_type" => "#{node.node_type}",
@@ -97,7 +100,7 @@ module Megam
97
100
  "boltdefns" => {},
98
101
  "appreq" => {},
99
102
  "boltreq" => {}
100
- }
103
+ }
101
104
  node_hash
102
105
  end
103
106
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megam_api
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.10'
4
+ version: '0.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kishorekumar Neelamegam, Thomas Alrin, Subash Sethurajan, Rajthilak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-24 00:00:00.000000000 Z
11
+ date: 2014-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubyforge_project:
228
- rubygems_version: 2.2.2
228
+ rubygems_version: 2.1.11
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: Ruby Client for the Megam Cloud