Commit 766640e6 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Fixed null bug with key name-value in building invocation message

parent a1ff1a3a
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip"> <tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td> <td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">3.75K</span></td> <td><span class="downloadfile-size">3.76K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -1417,43 +1417,65 @@ module V1 ...@@ -1417,43 +1417,65 @@ module V1
module Types module Types
# (no documentation provided) # (no documentation provided)
class ToscaRepresentation < Nl::Uva::Sne::Drip::Commons::V1::Types::KeyValueHolder class DeployResponse < Nl::Uva::Sne::Drip::Commons::V1::Types::DeployRequest
# the name # (no documentation provided)
attr_accessor :name attr_accessor :key
# the id
attr_accessor :id
# the json hash for this ToscaRepresentation # the json hash for this DeployResponse
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['name'] = name.to_jaxb_json_hash unless name.nil? _h['key'] = key.to_jaxb_json_hash unless key.nil?
_h['id'] = id.to_jaxb_json_hash unless id.nil?
return _h return _h
end end
#initializes this ToscaRepresentation with a json hash #initializes this DeployResponse with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['name'].nil? if !_o['key'].nil?
_oa = _o['name'] _oa = _o['key']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@name = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @key = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@name = String.from_json(_oa) unless _oa['@class'] @key = Nl::Uva::Sne::Drip::Commons::V1::Types::Key.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array) elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar #an array(of hashes hopefully) or scalar
@name = Array.new @key = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@name.push String.from_json(_item) @key.push Nl::Uva::Sne::Drip::Commons::V1::Types::Key.from_json(_item)
else else
@name.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @key.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@name = _oa @key = _oa
end
end
if !_o['id'].nil?
_oa = _o['id']
if(_oa.is_a? Hash)
@id = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@id = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@id = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@id.push String.from_json(_item)
else
@id.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@id = _oa
end end
end end
end end
# constructs a ToscaRepresentation from a (parsed) JSON hash # constructs a DeployResponse from a (parsed) JSON hash
def self.from_json(o) def self.from_json(o)
if o.nil? if o.nil?
return nil return nil
...@@ -1494,65 +1516,43 @@ module V1 ...@@ -1494,65 +1516,43 @@ module V1
module Types module Types
# (no documentation provided) # (no documentation provided)
class DeployResponse < Nl::Uva::Sne::Drip::Commons::V1::Types::DeployRequest class ToscaRepresentation < Nl::Uva::Sne::Drip::Commons::V1::Types::KeyValueHolder
# (no documentation provided) # the name
attr_accessor :key attr_accessor :name
# the id
attr_accessor :id
# the json hash for this DeployResponse # the json hash for this ToscaRepresentation
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['key'] = key.to_jaxb_json_hash unless key.nil? _h['name'] = name.to_jaxb_json_hash unless name.nil?
_h['id'] = id.to_jaxb_json_hash unless id.nil?
return _h return _h
end end
#initializes this DeployResponse with a json hash #initializes this ToscaRepresentation with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['key'].nil? if !_o['name'].nil?
_oa = _o['key'] _oa = _o['name']
if(_oa.is_a? Hash)
@key = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@key = Nl::Uva::Sne::Drip::Commons::V1::Types::Key.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@key = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@key.push Nl::Uva::Sne::Drip::Commons::V1::Types::Key.from_json(_item)
else
@key.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@key = _oa
end
end
if !_o['id'].nil?
_oa = _o['id']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@id = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @name = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@id = String.from_json(_oa) unless _oa['@class'] @name = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array) elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar #an array(of hashes hopefully) or scalar
@id = Array.new @name = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@id.push String.from_json(_item) @name.push String.from_json(_item)
else else
@id.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @name.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@id = _oa @name = _oa
end end
end end
end end
# constructs a DeployResponse from a (parsed) JSON hash # constructs a ToscaRepresentation from a (parsed) JSON hash
def self.from_json(o) def self.from_json(o)
if o.nil? if o.nil?
return nil return nil
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>Subtypes</dt> <dt>Subtypes</dt>
<dd><a href="json_PlaybookRepresentation.html">PlaybookRepresentation</a>, <a href="json_Script.html">Script</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_ToscaRepresentation.html">ToscaRepresentation</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_PlanResponse.html">PlanResponse</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_Key.html">Key</a>, <a href="json_CloudCredentials.html">CloudCredentials</a></dd> <dd><a href="json_PlaybookRepresentation.html">PlaybookRepresentation</a>, <a href="json_Script.html">Script</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_ToscaRepresentation.html">ToscaRepresentation</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_PlanResponse.html">PlanResponse</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_Key.html">Key</a>, <a href="json_CloudCredentials.html">CloudCredentials</a></dd>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -187,10 +187,7 @@ public class DeployService { ...@@ -187,10 +187,7 @@ public class DeployService {
messageParameter.setEncoding("UTF-8"); messageParameter.setEncoding("UTF-8");
String key = null; String key = null;
for (Key lk : loginKeys) { for (Key lk : loginKeys) {
String lkName = lk.getName(); String lkName = lk.getAttributes().get("domain_name");
if (lkName == null) {
lkName = lk.getAttributes().get("domain_name");
}
if (lkName.equals(cName)) { if (lkName.equals(cName)) {
key = lk.getKey(); key = lk.getKey();
break; break;
......
...@@ -45,6 +45,7 @@ def handleDelivery(message): ...@@ -45,6 +45,7 @@ def handleDelivery(message):
cluster_type = param["value"] cluster_type = param["value"]
elif name == "credential": elif name == "credential":
value = param["value"] value = param["value"]
print "Value: %s" %value
ip = param["attributes"]["IP"] ip = param["attributes"]["IP"]
user = param["attributes"]["user"] user = param["attributes"]["user"]
role = param["attributes"]["role"] role = param["attributes"]["role"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment