megam_api 0.86 → 0.89
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/megam/api/version.rb +1 -1
- data/lib/megam/mixins/assembly.rb +1 -1
- data/lib/megam/mixins/components.rb +3 -1
- data/test/mixins/test_assemblies.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eda09d87237a4e68b0e218e8aecfe33a4d9b6960
|
4
|
+
data.tar.gz: e1c37240c06a6dad17476fd8c3cf31ad3c9dc94b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74dc014521891e56bbc8698b7776131b013b6f961acc1817a1706f8330b7c33227ac11cf61e7cc785d22c86ad00604d571a3df3339c93ad3041aa6f4d623ece4
|
7
|
+
data.tar.gz: 43d90ac5037918ef415c55d911b8a48512e923299ae4b93268bf77e05c5b07b07e0d08636e7bcfa365bb31e69c49a1f2a1c1856d94ceaab9137f44c45579a5c4
|
data/lib/megam/api/version.rb
CHANGED
@@ -5,7 +5,7 @@ require File.expand_path("#{File.dirname(__FILE__)}/outputs")
|
|
5
5
|
module Megam
|
6
6
|
class Mixins
|
7
7
|
class Assembly
|
8
|
-
attr_reader :name, :components, :policies, :outputs, :mixins
|
8
|
+
attr_reader :name, :components, :policies, :outputs, :envs, :mixins
|
9
9
|
def initialize(params)
|
10
10
|
params = Hash[params.map { |k, v| [k.to_sym, v] }]
|
11
11
|
@name = params[:assemblyname]
|
@@ -5,7 +5,7 @@ require File.expand_path("#{File.dirname(__FILE__)}/outputs")
|
|
5
5
|
module Megam
|
6
6
|
class Mixins
|
7
7
|
class Components
|
8
|
-
attr_reader :mixins, :name, :repo, :related_components, :operations, :artifacts, :outputs
|
8
|
+
attr_reader :mixins, :name, :repo, :related_components, :operations, :artifacts, :envs, :outputs
|
9
9
|
def initialize(params)
|
10
10
|
@mixins = CommonDeployable.new(params)
|
11
11
|
@name = params[:componentname]
|
@@ -14,6 +14,7 @@ module Megam
|
|
14
14
|
@related_components = add_related_components(params)
|
15
15
|
@artifacts = add_artifacts(params)
|
16
16
|
@repo = add_repo(params)
|
17
|
+
@envs = params[:envs]
|
17
18
|
end
|
18
19
|
|
19
20
|
def to_hash
|
@@ -24,6 +25,7 @@ module Megam
|
|
24
25
|
result[:operations] = @operations if @operations
|
25
26
|
result[:outputs] = @outputs.to_array if @outputs
|
26
27
|
result[:related_components] = @related_components if @related_components
|
28
|
+
result[:envs] = @envs if @envs
|
27
29
|
result
|
28
30
|
end
|
29
31
|
|
@@ -11,14 +11,13 @@ class TestMixinsAssemblies < MiniTest::Unit::TestCase
|
|
11
11
|
## input the torpedo hash
|
12
12
|
tmp_hash = {"utf8"=>"✓", "mkp_name" => "ubuntu", "cattype":"TORPEDO", "version":"14.04", "assemblyname"=>"biblical", "domain"=>"megambox.com", "ram"=>"896", "cpu"=>"0.5", "SSH_USEOLD_name"=>"tom", "SSH_NEW_name"=>"", "sshoption"=>"SSH_USEOLD", "provider"=>"one", "componentname"=>"ovid", "commit"=>" Create ", "controller"=>"marketplaces", "action"=>"create", "email"=>"8@8.com", "api_key"=>"-NQi-aSKHcmKntCsXb03jw==", "host"=>"192.168.1.105", "org_id"=>"ORG1270367691894554624", "ssh_keypair_name"=>"tom", "name"=>"tom", "path"=>"8@8.com_tom"}
|
13
13
|
|
14
|
+
envs_hash = {"utf8"=>"✓", "authenticity_token"=>"EXNN8YBO01ebNv8RSbc3psdo+soP5Cxee8UXdi0qEdm78hkwKVIBaPzPh0IQBXcNtL6efvSkCbMkT1nca80zkA==", "version"=>"1.5.0", "mkp_name"=>"HotelManangement", "cattype"=>"ANALYTICS", "envs"=>[{"key":"spark_master","value":"<spark_master>"},{"key":"oja_assembly_id","value":"<oja_assembly_id>"},{"key":"file2","value":"<file2>"},{"key":"oja_email","value":"<oja_email>"},{"key":"oja_component_id","value":"<oja_component_id>"},{"key":"file1","value":"<file1>"},{"key":"oja_apikey","value":"<oja_apikey>"}], "assemblyname"=>"sweet", "domain"=>"megambox.com", "ram"=>"896", "cpu"=>"0.5", "SSH_USEOLD_name"=>"megam_sss", "SSH_NEW_name"=>"", "sshoption"=>"SSH_USEOLD", "provider"=>"one", "componentname"=>"minute", "commit"=>" Create "}
|
14
15
|
#{"utf8"=>"✓", "version"=>"14.04", "mkp_name"=>"ubuntu", "cattype"=>"TORPEDO", "assemblyname"=>"implanting", "domain"=>"megambox.com", "ram"=>"896", "cpu"=>"0.5", "SSH_USEOLD_name"=>"tom", "SSH_NEW_name"=>"", "sshoption"=>"SSH_USEOLD", "provider"=>"one", "componentname"=>"sad", "commit"=>" Create "}
|
15
16
|
|
16
17
|
|
17
18
|
#assemblies: [{"status"=>"launching", "tosca_type"=>"tosca.torpedo.ubuntu", "inputs"=>[{"key"=>"domain", "value"=>"megambox.com"}, {"key"=>"provider", "value"=>"one"}, {"key"=>"cpu", "value"=>"0.5"}, {"key"=>"ram", "value"=>"896"}, {"key"=>"version", "value"=>"14.04"}], "name"=>"implanting", "components"=>[], "outputs"=>[], "policies"=>[]}]
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
assembly_array = Megam::Mixins::Assemblies.new(tmp_hash).to_hash
|
20
|
+
assembly_array = Megam::Mixins::Assemblies.new(envs_hash).to_hash
|
22
21
|
puts "=========================================> END <==============================================="
|
23
22
|
puts assembly_array.inspect
|
24
23
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: megam_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.89'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan,
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-11-
|
12
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: excon
|