megam_api 0.89 → 0.90

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: eda09d87237a4e68b0e218e8aecfe33a4d9b6960
4
- data.tar.gz: e1c37240c06a6dad17476fd8c3cf31ad3c9dc94b
3
+ metadata.gz: 2bc860601d6f110c60235eb167e5a74df74fca9d
4
+ data.tar.gz: ff49084b1935212cc832f82dfd803d0dd2fbb3b0
5
5
  SHA512:
6
- metadata.gz: 74dc014521891e56bbc8698b7776131b013b6f961acc1817a1706f8330b7c33227ac11cf61e7cc785d22c86ad00604d571a3df3339c93ad3041aa6f4d623ece4
7
- data.tar.gz: 43d90ac5037918ef415c55d911b8a48512e923299ae4b93268bf77e05c5b07b07e0d08636e7bcfa365bb31e69c49a1f2a1c1856d94ceaab9137f44c45579a5c4
6
+ metadata.gz: d6432b20efbd64287f86cb506f37126507de50b722b3bcd9573f84fc5568941b32ca9544aeacfff310efad75cba627ca27ab31a47083b99d29ea21518c40879f
7
+ data.tar.gz: 50ff9a3a5c480e9b5a414d7725a90ea543f875f7bb734a7b5b05b926c5d170b10320a86cc2d2f963d4d06125543e89d0dacacce27f5db205425e8ddd87504892
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.89"
3
+ VERSION = "0.90"
4
4
  end
5
5
  end
@@ -38,7 +38,7 @@ module Megam
38
38
  def bld_toscatype(params)
39
39
  tosca_suffix = DEFAULT_TOSCA_SUFFIX
40
40
  tosca_suffix = "#{params[:mkp_name]}" unless params[:cattype] != 'TORPEDO'.freeze
41
- @tosca_type = DEFAULT_TOSCA_PREFIX + ".#{params[:cattype].downcase}.#{params[:mkp_name].downcase}"
41
+ @tosca_type = DEFAULT_TOSCA_PREFIX + ".#{params[:cattype].downcase}.#{params[:mkp_name].downcase}" if params[:cattype] != nil && params[:mkp_name] != nil
42
42
  end
43
43
  end
44
44
 
@@ -8,7 +8,7 @@ module Megam
8
8
  attr_reader :mixins, :name, :repo, :related_components, :operations, :artifacts, :envs, :outputs
9
9
  def initialize(params)
10
10
  @mixins = CommonDeployable.new(params)
11
- @name = params[:componentname]
11
+ @name = params[:componentname] if params[:componentname]
12
12
  @outputs = Outputs.new(params)
13
13
  @operations = add_operations(params)
14
14
  @related_components = add_related_components(params)
@@ -41,12 +41,12 @@ module Megam
41
41
 
42
42
  def add_related_components(params)
43
43
  related_components = []
44
- related_components << "#{params[:assemblyname]}.#{params[:domain]}/#{params[:componentname]}" if params.key?(:bind_type)
44
+ related_components << "#{params[:bind_type]}" if params.key?(:bind_type)
45
45
  end
46
46
 
47
47
  def add_operations(params)
48
48
  operations = []
49
- operations.push(create_operation(Operations::CI, Operations::CI_DESCRIPTON, params)) unless params[:scm_name] && params[:scm_name].strip.empty?
49
+ operations.push(create_operation(Operations::CI, Operations::CI_DESCRIPTON, params)) if params[:scm_name] && params[:scm_name].strip.empty?
50
50
  operations.push(create_operation(Operations::BIND, Operations::BIND_DESCRIPTON, params)) if params.key?(:bind_type)
51
51
  end
52
52
 
@@ -4,6 +4,7 @@ gem 'minitest' # ensure we are using the gem version
4
4
  require 'minitest/autorun'
5
5
 
6
6
  require File.expand_path("#{File.dirname(__FILE__)}/../../lib/megam/mixins/assemblies")
7
+ require File.expand_path("#{File.dirname(__FILE__)}/../../lib/megam/mixins/components")
7
8
  class TestMixinsAssemblies < MiniTest::Unit::TestCase
8
9
 
9
10
  #=begin
@@ -12,8 +13,8 @@ class TestMixinsAssemblies < MiniTest::Unit::TestCase
12
13
  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
14
 
14
15
  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 "}
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 "}
16
16
 
17
+ #{"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 "}
17
18
 
18
19
  #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"=>[]}]
19
20
 
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.89'
4
+ version: '0.90'
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-26 00:00:00.000000000 Z
12
+ date: 2015-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon