Commit 7f3ee619 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Added logging messages

parent ad8602ff
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
</tr> </tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar"> <tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td> <td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">22.37K</span></td> <td><span class="downloadfile-size">22.38K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td> <td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr> </tr>
</tbody> </tbody>
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-js.zip"> <tr class="clickable-row" data-href="drip-api-js.zip">
<td><span class="downloadfile-name">drip-api-js.zip</span></td> <td><span class="downloadfile-name">drip-api-js.zip</span></td>
<td><span class="downloadfile-size">5.45K</span></td> <td><span class="downloadfile-size">5.43K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
...@@ -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">6.03K</span></td> <td><span class="downloadfile-size">6.01K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,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">9.09K</span></td> <td><span class="downloadfile-size">9.11K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -93,92 +93,208 @@ module V1 ...@@ -93,92 +93,208 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class DeployParameter class AnsibleResult
# the IP # (no documentation provided)
attr_accessor :IP attr_accessor :msg
# the user # (no documentation provided)
attr_accessor :user attr_accessor :changed
# the role # (no documentation provided)
attr_accessor :role attr_accessor :end
# (no documentation provided)
attr_accessor :stdout
# (no documentation provided)
attr_accessor :cmd
# (no documentation provided)
attr_accessor :start
# (no documentation provided)
attr_accessor :stderr
# (no documentation provided)
attr_accessor :delta
# the json hash for this DeployParameter # the json hash for this AnsibleResult
def to_jaxb_json_hash def to_jaxb_json_hash
_h = {} _h = {}
_h['IP'] = IP.to_jaxb_json_hash unless IP.nil? _h['msg'] = msg.to_jaxb_json_hash unless msg.nil?
_h['user'] = user.to_jaxb_json_hash unless user.nil? _h['changed'] = changed.to_jaxb_json_hash unless changed.nil?
_h['role'] = role.to_jaxb_json_hash unless role.nil? _h['end'] = end.to_jaxb_json_hash unless end.nil?
_h['stdout'] = stdout.to_jaxb_json_hash unless stdout.nil?
if !cmd.nil?
_ha = Array.new
cmd.each { | _item | _ha.push _item.to_jaxb_json_hash }
_h['cmd'] = _ha
end
_h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['stderr'] = stderr.to_jaxb_json_hash unless stderr.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
return _h return _h
end end
# the json (string form) for this DeployParameter # the json (string form) for this AnsibleResult
def to_json def to_json
to_jaxb_json_hash.to_json to_jaxb_json_hash.to_json
end end
#initializes this DeployParameter with a json hash #initializes this AnsibleResult with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
if !_o['IP'].nil? if !_o['msg'].nil?
_oa = _o['IP'] _oa = _o['msg']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@IP = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @msg = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@IP = String.from_json(_oa) unless _oa['@class'] @msg = 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
@IP = Array.new @msg = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@IP.push String.from_json(_item) @msg.push String.from_json(_item)
else else
@IP.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @msg.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@IP = _oa @msg = _oa
end end
end end
if !_o['user'].nil? if !_o['changed'].nil?
_oa = _o['user'] _oa = _o['changed']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@user = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @changed = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@user = String.from_json(_oa) unless _oa['@class'] @changed = Boolean.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
@user = Array.new @changed = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@user.push String.from_json(_item) @changed.push Boolean.from_json(_item)
else else
@user.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @changed.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@user = _oa @changed = _oa
end end
end end
if !_o['role'].nil? if !_o['end'].nil?
_oa = _o['role'] _oa = _o['end']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@role = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @end = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@role = String.from_json(_oa) unless _oa['@class'] @end = Time.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
@role = Array.new @end = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@role.push String.from_json(_item) @end.push Time.from_json(_item)
else else
@role.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@role = _oa @end = _oa
end
end
if !_o['stdout'].nil?
_oa = _o['stdout']
if(_oa.is_a? Hash)
@stdout = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stdout = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@stdout = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@stdout.push String.from_json(_item)
else
@stdout.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@stdout = _oa
end
end
if !_o['cmd'].nil?
_oa = _o['cmd']
if(_oa.is_a? Hash)
@cmd = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cmd = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@cmd = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cmd.push String.from_json(_item)
else
@cmd.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cmd = _oa
end
end
if !_o['start'].nil?
_oa = _o['start']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
end
end
if !_o['stderr'].nil?
_oa = _o['stderr']
if(_oa.is_a? Hash)
@stderr = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stderr = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@stderr = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@stderr.push String.from_json(_item)
else
@stderr.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@stderr = _oa
end
end
if !_o['delta'].nil?
_oa = _o['delta']
if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@delta = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item)
else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@delta = _oa
end end
end end
end end
# constructs a DeployParameter from a (parsed) JSON hash # constructs a AnsibleResult 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
...@@ -208,6 +324,8 @@ end ...@@ -208,6 +324,8 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -359,208 +477,92 @@ module V1 ...@@ -359,208 +477,92 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class AnsibleResult class DeployParameter
# (no documentation provided) # the IP
attr_accessor :msg attr_accessor :IP
# (no documentation provided) # the user
attr_accessor :changed attr_accessor :user
# (no documentation provided) # the role
attr_accessor :end attr_accessor :role
# (no documentation provided)
attr_accessor :stdout
# (no documentation provided)
attr_accessor :cmd
# (no documentation provided)
attr_accessor :start
# (no documentation provided)
attr_accessor :stderr
# (no documentation provided)
attr_accessor :delta
# the json hash for this AnsibleResult # the json hash for this DeployParameter
def to_jaxb_json_hash def to_jaxb_json_hash
_h = {} _h = {}
_h['msg'] = msg.to_jaxb_json_hash unless msg.nil? _h['IP'] = IP.to_jaxb_json_hash unless IP.nil?
_h['changed'] = changed.to_jaxb_json_hash unless changed.nil? _h['user'] = user.to_jaxb_json_hash unless user.nil?
_h['end'] = end.to_jaxb_json_hash unless end.nil? _h['role'] = role.to_jaxb_json_hash unless role.nil?
_h['stdout'] = stdout.to_jaxb_json_hash unless stdout.nil?
if !cmd.nil?
_ha = Array.new
cmd.each { | _item | _ha.push _item.to_jaxb_json_hash }
_h['cmd'] = _ha
end
_h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['stderr'] = stderr.to_jaxb_json_hash unless stderr.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
return _h return _h
end end
# the json (string form) for this AnsibleResult # the json (string form) for this DeployParameter
def to_json def to_json
to_jaxb_json_hash.to_json to_jaxb_json_hash.to_json
end end
#initializes this AnsibleResult with a json hash #initializes this DeployParameter with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
if !_o['msg'].nil? if !_o['IP'].nil?
_oa = _o['msg'] _oa = _o['IP']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@msg = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @IP = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@msg = String.from_json(_oa) unless _oa['@class'] @IP = 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
@msg = Array.new @IP = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@msg.push String.from_json(_item) @IP.push String.from_json(_item)
else else
@msg.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @IP.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@msg = _oa @IP = _oa
end
end
if !_o['changed'].nil?
_oa = _o['changed']
if(_oa.is_a? Hash)
@changed = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@changed = Boolean.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@changed = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@changed.push Boolean.from_json(_item)
else
@changed.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@changed = _oa
end
end
if !_o['end'].nil?
_oa = _o['end']
if(_oa.is_a? Hash)
@end = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@end = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@end = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@end.push Time.from_json(_item)
else
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@end = _oa
end
end
if !_o['stdout'].nil?
_oa = _o['stdout']
if(_oa.is_a? Hash)
@stdout = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stdout = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@stdout = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@stdout.push String.from_json(_item)
else
@stdout.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@stdout = _oa
end
end
if !_o['cmd'].nil?
_oa = _o['cmd']
if(_oa.is_a? Hash)
@cmd = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cmd = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@cmd = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cmd.push String.from_json(_item)
else
@cmd.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cmd = _oa
end
end
if !_o['start'].nil?
_oa = _o['start']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
end end
end end
if !_o['stderr'].nil? if !_o['user'].nil?
_oa = _o['stderr'] _oa = _o['user']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@stderr = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @user = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stderr = String.from_json(_oa) unless _oa['@class'] @user = 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
@stderr = Array.new @user = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@stderr.push String.from_json(_item) @user.push String.from_json(_item)
else else
@stderr.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @user.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@stderr = _oa @user = _oa
end end
end end
if !_o['delta'].nil? if !_o['role'].nil?
_oa = _o['delta'] _oa = _o['role']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @role = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class'] @role = 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
@delta = Array.new @role = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item) @role.push String.from_json(_item)
else else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @role.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@delta = _oa @role = _oa
end end
end end
end end
# constructs a AnsibleResult from a (parsed) JSON hash # constructs a DeployParameter 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
...@@ -590,8 +592,6 @@ end ...@@ -590,8 +592,6 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -1012,88 +1012,156 @@ module V1 ...@@ -1012,88 +1012,156 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class ScaleRequest < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject class AnsibleOutput < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject
# the scaleTargetID # the host
attr_accessor :scaleTargetID attr_accessor :host
# the scaleTargetName # the result
attr_accessor :scaleTargetName attr_accessor :result
# the numOfInstances # the domain
attr_accessor :numOfInstances attr_accessor :cloudDeploymentDomain
#
attr_accessor :vmType
# the provision ID
attr_accessor :provisionID
# the cloudProvider
attr_accessor :cloudProvider
# the json hash for this ScaleRequest # the json hash for this AnsibleOutput
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['scaleTargetID'] = scaleTargetID.to_jaxb_json_hash unless scaleTargetID.nil? _h['host'] = host.to_jaxb_json_hash unless host.nil?
_h['scaleTargetName'] = scaleTargetName.to_jaxb_json_hash unless scaleTargetName.nil? _h['result'] = result.to_jaxb_json_hash unless result.nil?
_h['numOfInstances'] = numOfInstances.to_jaxb_json_hash unless numOfInstances.nil? _h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['provisionID'] = provisionID.to_jaxb_json_hash unless provisionID.nil?
_h['cloudProvider'] = cloudProvider.to_jaxb_json_hash unless cloudProvider.nil?
return _h return _h
end end
#initializes this ScaleRequest with a json hash #initializes this AnsibleOutput with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['scaleTargetID'].nil? if !_o['host'].nil?
_oa = _o['scaleTargetID'] _oa = _o['host']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@scaleTargetID = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@scaleTargetID = String.from_json(_oa) unless _oa['@class'] @host = 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
@scaleTargetID = Array.new @host = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@scaleTargetID.push String.from_json(_item) @host.push String.from_json(_item)
else else
@scaleTargetID.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@scaleTargetID = _oa @host = _oa
end end
end end
if !_o['scaleTargetName'].nil? if !_o['result'].nil?
_oa = _o['scaleTargetName'] _oa = _o['result']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@scaleTargetName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @result = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@scaleTargetName = String.from_json(_oa) unless _oa['@class'] @result = Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::Ansible::AnsibleResult.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
@scaleTargetName = Array.new @result = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@scaleTargetName.push String.from_json(_item) @result.push Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::Ansible::AnsibleResult.from_json(_item)
else else
@scaleTargetName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @result.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@scaleTargetName = _oa @result = _oa
end end
end end
if !_o['numOfInstances'].nil? if !_o['cloudDeploymentDomain'].nil?
_oa = _o['numOfInstances'] _oa = _o['cloudDeploymentDomain']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@numOfInstances = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @cloudDeploymentDomain = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@numOfInstances = Fixnum.from_json(_oa) unless _oa['@class'] @cloudDeploymentDomain = 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
@numOfInstances = Array.new @cloudDeploymentDomain = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@numOfInstances.push Fixnum.from_json(_item) @cloudDeploymentDomain.push String.from_json(_item)
else else
@numOfInstances.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @cloudDeploymentDomain.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@numOfInstances = _oa @cloudDeploymentDomain = _oa
end
end
if !_o['vmType'].nil?
_oa = _o['vmType']
if(_oa.is_a? Hash)
@vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@vmType = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@vmType = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@vmType.push String.from_json(_item)
else
@vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@vmType = _oa
end
end
if !_o['provisionID'].nil?
_oa = _o['provisionID']
if(_oa.is_a? Hash)
@provisionID = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@provisionID = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@provisionID = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@provisionID.push String.from_json(_item)
else
@provisionID.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@provisionID = _oa
end
end
if !_o['cloudProvider'].nil?
_oa = _o['cloudProvider']
if(_oa.is_a? Hash)
@cloudProvider = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProvider = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@cloudProvider = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudProvider.push String.from_json(_item)
else
@cloudProvider.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cloudProvider = _oa
end end
end end
end end
# constructs a ScaleRequest from a (parsed) JSON hash # constructs a AnsibleOutput 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
...@@ -1123,6 +1191,8 @@ end ...@@ -1123,6 +1191,8 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -1141,110 +1211,156 @@ module V1 ...@@ -1141,110 +1211,156 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class CloudCredentials < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject class BenchmarkResult < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject
# the secret key # (no documentation provided)
attr_accessor :secretKey attr_accessor :cloudDeploymentDomain
# the cloudProviderName # (no documentation provided)
attr_accessor :cloudProviderName attr_accessor :host
# the accessKeyId # (no documentation provided)
attr_accessor :accessKeyId attr_accessor :start
# the attributes # (no documentation provided)
attr_accessor :attributes attr_accessor :vmType
# (no documentation provided)
attr_accessor :end
# (no documentation provided)
attr_accessor :delta
# the json hash for this CloudCredentials # the json hash for this BenchmarkResult
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['secretKey'] = secretKey.to_jaxb_json_hash unless secretKey.nil? _h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
_h['cloudProviderName'] = cloudProviderName.to_jaxb_json_hash unless cloudProviderName.nil? _h['host'] = host.to_jaxb_json_hash unless host.nil?
_h['accessKeyId'] = accessKeyId.to_jaxb_json_hash unless accessKeyId.nil? _h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['attributes'] = attributes.to_jaxb_json_hash unless attributes.nil? _h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['end'] = end.to_jaxb_json_hash unless end.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
return _h return _h
end end
#initializes this CloudCredentials with a json hash #initializes this BenchmarkResult with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['secretKey'].nil? if !_o['cloudDeploymentDomain'].nil?
_oa = _o['secretKey'] _oa = _o['cloudDeploymentDomain']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@secretKey = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @cloudDeploymentDomain = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@secretKey = String.from_json(_oa) unless _oa['@class'] @cloudDeploymentDomain = 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
@secretKey = Array.new @cloudDeploymentDomain = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@secretKey.push String.from_json(_item) @cloudDeploymentDomain.push String.from_json(_item)
else else
@secretKey.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @cloudDeploymentDomain.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@secretKey = _oa @cloudDeploymentDomain = _oa
end end
end end
if !_o['cloudProviderName'].nil? if !_o['host'].nil?
_oa = _o['cloudProviderName'] _oa = _o['host']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@cloudProviderName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProviderName = String.from_json(_oa) unless _oa['@class'] @host = 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
@cloudProviderName = Array.new @host = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudProviderName.push String.from_json(_item) @host.push String.from_json(_item)
else else
@cloudProviderName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@cloudProviderName = _oa @host = _oa
end end
end end
if !_o['accessKeyId'].nil? if !_o['start'].nil?
_oa = _o['accessKeyId'] _oa = _o['start']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@accessKeyId = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@accessKeyId = String.from_json(_oa) unless _oa['@class'] @start = Time.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
@accessKeyId = Array.new @start = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@accessKeyId.push String.from_json(_item) @start.push Time.from_json(_item)
else else
@accessKeyId.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@accessKeyId = _oa @start = _oa
end end
end end
if !_o['attributes'].nil? if !_o['vmType'].nil?
_oa = _o['attributes'] _oa = _o['vmType']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@attributes = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@attributes = Hash.from_json(_oa) unless _oa['@class'] @vmType = 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
@attributes = Array.new @vmType = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@attributes.push Hash.from_json(_item) @vmType.push String.from_json(_item)
else else
@attributes.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@attributes = _oa @vmType = _oa
end
end
if !_o['end'].nil?
_oa = _o['end']
if(_oa.is_a? Hash)
@end = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@end = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@end = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@end.push Time.from_json(_item)
else
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@end = _oa
end
end
if !_o['delta'].nil?
_oa = _o['delta']
if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@delta = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item)
else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@delta = _oa
end end
end end
end end
# constructs a CloudCredentials from a (parsed) JSON hash # constructs a BenchmarkResult 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
...@@ -1274,6 +1390,8 @@ end ...@@ -1274,6 +1390,8 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -1292,156 +1410,110 @@ module V1 ...@@ -1292,156 +1410,110 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class BenchmarkResult < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject class CloudCredentials < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject
# (no documentation provided) # the secret key
attr_accessor :start attr_accessor :secretKey
# (no documentation provided) # the cloudProviderName
attr_accessor :vmType attr_accessor :cloudProviderName
# (no documentation provided) # the accessKeyId
attr_accessor :host attr_accessor :accessKeyId
# (no documentation provided) # the attributes
attr_accessor :delta attr_accessor :attributes
# (no documentation provided)
attr_accessor :cloudDeploymentDomain
# (no documentation provided)
attr_accessor :end
# the json hash for this BenchmarkResult # the json hash for this CloudCredentials
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['start'] = start.to_jaxb_json_hash unless start.nil? _h['secretKey'] = secretKey.to_jaxb_json_hash unless secretKey.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil? _h['cloudProviderName'] = cloudProviderName.to_jaxb_json_hash unless cloudProviderName.nil?
_h['host'] = host.to_jaxb_json_hash unless host.nil? _h['accessKeyId'] = accessKeyId.to_jaxb_json_hash unless accessKeyId.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil? _h['attributes'] = attributes.to_jaxb_json_hash unless attributes.nil?
_h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
_h['end'] = end.to_jaxb_json_hash unless end.nil?
return _h return _h
end end
#initializes this BenchmarkResult with a json hash #initializes this CloudCredentials with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['start'].nil? if !_o['secretKey'].nil?
_oa = _o['start'] _oa = _o['secretKey']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
end
end
if !_o['vmType'].nil?
_oa = _o['vmType']
if(_oa.is_a? Hash)
@vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@vmType = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@vmType = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@vmType.push String.from_json(_item)
else
@vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@vmType = _oa
end
end
if !_o['host'].nil?
_oa = _o['host']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @secretKey = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@host = String.from_json(_oa) unless _oa['@class'] @secretKey = 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
@host = Array.new @secretKey = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@host.push String.from_json(_item) @secretKey.push String.from_json(_item)
else else
@host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @secretKey.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@host = _oa @secretKey = _oa
end end
end end
if !_o['delta'].nil? if !_o['cloudProviderName'].nil?
_oa = _o['delta'] _oa = _o['cloudProviderName']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @cloudProviderName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class'] @cloudProviderName = 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
@delta = Array.new @cloudProviderName = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item) @cloudProviderName.push String.from_json(_item)
else else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @cloudProviderName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@delta = _oa @cloudProviderName = _oa
end end
end end
if !_o['cloudDeploymentDomain'].nil? if !_o['accessKeyId'].nil?
_oa = _o['cloudDeploymentDomain'] _oa = _o['accessKeyId']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@cloudDeploymentDomain = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @accessKeyId = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudDeploymentDomain = String.from_json(_oa) unless _oa['@class'] @accessKeyId = 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
@cloudDeploymentDomain = Array.new @accessKeyId = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudDeploymentDomain.push String.from_json(_item) @accessKeyId.push String.from_json(_item)
else else
@cloudDeploymentDomain.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @accessKeyId.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@cloudDeploymentDomain = _oa @accessKeyId = _oa
end end
end end
if !_o['end'].nil? if !_o['attributes'].nil?
_oa = _o['end'] _oa = _o['attributes']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@end = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @attributes = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@end = Time.from_json(_oa) unless _oa['@class'] @attributes = Hash.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
@end = Array.new @attributes = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@end.push Time.from_json(_item) @attributes.push Hash.from_json(_item)
else else
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @attributes.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@end = _oa @attributes = _oa
end end
end end
end end
# constructs a BenchmarkResult from a (parsed) JSON hash # constructs a CloudCredentials 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
...@@ -1471,8 +1543,6 @@ end ...@@ -1471,8 +1543,6 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -2053,156 +2123,88 @@ module V1 ...@@ -2053,156 +2123,88 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class AnsibleOutput < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject class ScaleRequest < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject
# the host # the scaleTargetID
attr_accessor :host attr_accessor :scaleTargetID
# the result # the scaleTargetName
attr_accessor :result attr_accessor :scaleTargetName
# the domain # the numOfInstances
attr_accessor :cloudDeploymentDomain attr_accessor :numOfInstances
#
attr_accessor :vmType
# the provision ID
attr_accessor :provisionID
# the cloudProvider
attr_accessor :cloudProvider
# the json hash for this AnsibleOutput # the json hash for this ScaleRequest
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['host'] = host.to_jaxb_json_hash unless host.nil? _h['scaleTargetID'] = scaleTargetID.to_jaxb_json_hash unless scaleTargetID.nil?
_h['result'] = result.to_jaxb_json_hash unless result.nil? _h['scaleTargetName'] = scaleTargetName.to_jaxb_json_hash unless scaleTargetName.nil?
_h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil? _h['numOfInstances'] = numOfInstances.to_jaxb_json_hash unless numOfInstances.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['provisionID'] = provisionID.to_jaxb_json_hash unless provisionID.nil?
_h['cloudProvider'] = cloudProvider.to_jaxb_json_hash unless cloudProvider.nil?
return _h return _h
end end
#initializes this AnsibleOutput with a json hash #initializes this ScaleRequest with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['host'].nil? if !_o['scaleTargetID'].nil?
_oa = _o['host'] _oa = _o['scaleTargetID']
if(_oa.is_a? Hash)
@host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@host = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@host = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@host.push String.from_json(_item)
else
@host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@host = _oa
end
end
if !_o['result'].nil?
_oa = _o['result']
if(_oa.is_a? Hash)
@result = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@result = Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::Ansible::AnsibleResult.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@result = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@result.push Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::Ansible::AnsibleResult.from_json(_item)
else
@result.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@result = _oa
end
end
if !_o['cloudDeploymentDomain'].nil?
_oa = _o['cloudDeploymentDomain']
if(_oa.is_a? Hash)
@cloudDeploymentDomain = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudDeploymentDomain = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@cloudDeploymentDomain = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudDeploymentDomain.push String.from_json(_item)
else
@cloudDeploymentDomain.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cloudDeploymentDomain = _oa
end
end
if !_o['vmType'].nil?
_oa = _o['vmType']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @scaleTargetID = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@vmType = String.from_json(_oa) unless _oa['@class'] @scaleTargetID = 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
@vmType = Array.new @scaleTargetID = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@vmType.push String.from_json(_item) @scaleTargetID.push String.from_json(_item)
else else
@vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @scaleTargetID.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@vmType = _oa @scaleTargetID = _oa
end end
end end
if !_o['provisionID'].nil? if !_o['scaleTargetName'].nil?
_oa = _o['provisionID'] _oa = _o['scaleTargetName']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@provisionID = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @scaleTargetName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@provisionID = String.from_json(_oa) unless _oa['@class'] @scaleTargetName = 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
@provisionID = Array.new @scaleTargetName = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@provisionID.push String.from_json(_item) @scaleTargetName.push String.from_json(_item)
else else
@provisionID.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @scaleTargetName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@provisionID = _oa @scaleTargetName = _oa
end end
end end
if !_o['cloudProvider'].nil? if !_o['numOfInstances'].nil?
_oa = _o['cloudProvider'] _oa = _o['numOfInstances']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@cloudProvider = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @numOfInstances = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProvider = String.from_json(_oa) unless _oa['@class'] @numOfInstances = Fixnum.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
@cloudProvider = Array.new @numOfInstances = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudProvider.push String.from_json(_item) @numOfInstances.push Fixnum.from_json(_item)
else else
@cloudProvider.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @numOfInstances.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@cloudProvider = _oa @numOfInstances = _oa
end end
end end
end end
# constructs a AnsibleOutput from a (parsed) JSON hash # constructs a ScaleRequest 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
...@@ -2232,8 +2234,6 @@ end ...@@ -2232,8 +2234,6 @@ end
end end
end
module Nl module Nl
module Uva module Uva
......
...@@ -81,9 +81,9 @@ class</p> ...@@ -81,9 +81,9 @@ class</p>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td> <span class="property-name">start</span> <td> <span class="property-name">host</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">string
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
...@@ -126,9 +126,9 @@ class</p> ...@@ -126,9 +126,9 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">host</span> <td> <span class="property-name">start</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">number
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
...@@ -167,12 +167,12 @@ No need to set during a POST</span></td> ...@@ -167,12 +167,12 @@ No need to set during a POST</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-js example">{ <pre class="prettyprint language-js example">{
&quot;start&quot; : 12345, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
......
...@@ -69,7 +69,7 @@ class</p> ...@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>Subtypes</dt> <dt>Subtypes</dt>
<dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_MonitorringMessage.html">MonitorringMessage</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd> <dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_MonitorringMessage.html">MonitorringMessage</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -792,16 +792,16 @@ class]]> ...@@ -792,16 +792,16 @@ class]]>
<xs:complexContent> <xs:complexContent>
<xs:extension base="ownedObject"> <xs:extension base="ownedObject">
<xs:sequence> <xs:sequence>
<xs:element name="end" type="xs:dateTime" minOccurs="0"> <xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0"> <xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="host" type="xs:string" minOccurs="0"> <xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0"> <xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0"> <xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
......
...@@ -144,12 +144,12 @@ Content-Type: application/json ...@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js"> <code class="prettyprint language-js">
[ { [ {
&quot;start&quot; : 12345, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
...@@ -514,12 +514,12 @@ Content-Type: application/json ...@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js"> <code class="prettyprint language-js">
{ {
&quot;start&quot; : 12345, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
......
...@@ -114,7 +114,11 @@ provisoner to request for resources (VMs)</p> ...@@ -114,7 +114,11 @@ provisoner to request for resources (VMs)</p>
<tbody> <tbody>
<tr> <tr>
<td><span class="label label-warning response-code">404</span></td> <td><span class="label label-warning response-code">404</span></td>
<td><span class="response-condition">Access key ID can't be empty</span></td> <td><span class="response-condition">Key can't be empty</span></td>
</tr>
<tr>
<td><span class="label label-warning response-code">404</span></td>
<td><span class="response-condition">Cloud provider's name can't be empty</span></td>
</tr> </tr>
<tr> <tr>
<td><span class="label label-success response-code">200</span></td> <td><span class="label label-success response-code">200</span></td>
......
...@@ -220,11 +220,11 @@ It is created automatically. No need to set during a POST</span></td> ...@@ -220,11 +220,11 @@ It is created automatically. No need to set during a POST</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt; <pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;end&gt;...&lt;/end&gt; &lt;vmType&gt;...&lt;/vmType&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt; &lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt; &lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;start&gt;...&lt;/start&gt; &lt;start&gt;...&lt;/start&gt;
&lt;owner&gt;user1&lt;/owner&gt; &lt;owner&gt;user1&lt;/owner&gt;
&lt;/b-----&gt; &lt;/b-----&gt;
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
</tr> </tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar"> <tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td> <td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">22.37K</span></td> <td><span class="downloadfile-size">22.38K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td> <td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr> </tr>
</tbody> </tbody>
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-js.zip"> <tr class="clickable-row" data-href="drip-api-js.zip">
<td><span class="downloadfile-name">drip-api-js.zip</span></td> <td><span class="downloadfile-name">drip-api-js.zip</span></td>
<td><span class="downloadfile-size">5.45K</span></td> <td><span class="downloadfile-size">5.43K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
...@@ -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">6.03K</span></td> <td><span class="downloadfile-size">6.01K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,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">9.09K</span></td> <td><span class="downloadfile-size">9.11K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -93,92 +93,208 @@ module V1 ...@@ -93,92 +93,208 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class DeployParameter class AnsibleResult
# the IP # (no documentation provided)
attr_accessor :IP attr_accessor :msg
# the user # (no documentation provided)
attr_accessor :user attr_accessor :changed
# the role # (no documentation provided)
attr_accessor :role attr_accessor :end
# (no documentation provided)
attr_accessor :stdout
# (no documentation provided)
attr_accessor :cmd
# (no documentation provided)
attr_accessor :start
# (no documentation provided)
attr_accessor :stderr
# (no documentation provided)
attr_accessor :delta
# the json hash for this DeployParameter # the json hash for this AnsibleResult
def to_jaxb_json_hash def to_jaxb_json_hash
_h = {} _h = {}
_h['IP'] = IP.to_jaxb_json_hash unless IP.nil? _h['msg'] = msg.to_jaxb_json_hash unless msg.nil?
_h['user'] = user.to_jaxb_json_hash unless user.nil? _h['changed'] = changed.to_jaxb_json_hash unless changed.nil?
_h['role'] = role.to_jaxb_json_hash unless role.nil? _h['end'] = end.to_jaxb_json_hash unless end.nil?
_h['stdout'] = stdout.to_jaxb_json_hash unless stdout.nil?
if !cmd.nil?
_ha = Array.new
cmd.each { | _item | _ha.push _item.to_jaxb_json_hash }
_h['cmd'] = _ha
end
_h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['stderr'] = stderr.to_jaxb_json_hash unless stderr.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
return _h return _h
end end
# the json (string form) for this DeployParameter # the json (string form) for this AnsibleResult
def to_json def to_json
to_jaxb_json_hash.to_json to_jaxb_json_hash.to_json
end end
#initializes this DeployParameter with a json hash #initializes this AnsibleResult with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
if !_o['IP'].nil? if !_o['msg'].nil?
_oa = _o['IP'] _oa = _o['msg']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@IP = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @msg = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@IP = String.from_json(_oa) unless _oa['@class'] @msg = 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
@IP = Array.new @msg = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@IP.push String.from_json(_item) @msg.push String.from_json(_item)
else else
@IP.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @msg.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@IP = _oa @msg = _oa
end end
end end
if !_o['user'].nil? if !_o['changed'].nil?
_oa = _o['user'] _oa = _o['changed']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@user = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @changed = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@user = String.from_json(_oa) unless _oa['@class'] @changed = Boolean.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
@user = Array.new @changed = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@user.push String.from_json(_item) @changed.push Boolean.from_json(_item)
else else
@user.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @changed.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@user = _oa @changed = _oa
end end
end end
if !_o['role'].nil? if !_o['end'].nil?
_oa = _o['role'] _oa = _o['end']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@role = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @end = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@role = String.from_json(_oa) unless _oa['@class'] @end = Time.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
@role = Array.new @end = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@role.push String.from_json(_item) @end.push Time.from_json(_item)
else else
@role.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@role = _oa @end = _oa
end
end
if !_o['stdout'].nil?
_oa = _o['stdout']
if(_oa.is_a? Hash)
@stdout = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stdout = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@stdout = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@stdout.push String.from_json(_item)
else
@stdout.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@stdout = _oa
end
end
if !_o['cmd'].nil?
_oa = _o['cmd']
if(_oa.is_a? Hash)
@cmd = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cmd = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@cmd = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cmd.push String.from_json(_item)
else
@cmd.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cmd = _oa
end
end
if !_o['start'].nil?
_oa = _o['start']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
end
end
if !_o['stderr'].nil?
_oa = _o['stderr']
if(_oa.is_a? Hash)
@stderr = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stderr = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@stderr = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@stderr.push String.from_json(_item)
else
@stderr.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@stderr = _oa
end
end
if !_o['delta'].nil?
_oa = _o['delta']
if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@delta = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item)
else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@delta = _oa
end end
end end
end end
# constructs a DeployParameter from a (parsed) JSON hash # constructs a AnsibleResult 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
...@@ -208,6 +324,8 @@ end ...@@ -208,6 +324,8 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -359,208 +477,92 @@ module V1 ...@@ -359,208 +477,92 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class AnsibleResult class DeployParameter
# (no documentation provided) # the IP
attr_accessor :msg attr_accessor :IP
# (no documentation provided) # the user
attr_accessor :changed attr_accessor :user
# (no documentation provided) # the role
attr_accessor :end attr_accessor :role
# (no documentation provided)
attr_accessor :stdout
# (no documentation provided)
attr_accessor :cmd
# (no documentation provided)
attr_accessor :start
# (no documentation provided)
attr_accessor :stderr
# (no documentation provided)
attr_accessor :delta
# the json hash for this AnsibleResult # the json hash for this DeployParameter
def to_jaxb_json_hash def to_jaxb_json_hash
_h = {} _h = {}
_h['msg'] = msg.to_jaxb_json_hash unless msg.nil? _h['IP'] = IP.to_jaxb_json_hash unless IP.nil?
_h['changed'] = changed.to_jaxb_json_hash unless changed.nil? _h['user'] = user.to_jaxb_json_hash unless user.nil?
_h['end'] = end.to_jaxb_json_hash unless end.nil? _h['role'] = role.to_jaxb_json_hash unless role.nil?
_h['stdout'] = stdout.to_jaxb_json_hash unless stdout.nil?
if !cmd.nil?
_ha = Array.new
cmd.each { | _item | _ha.push _item.to_jaxb_json_hash }
_h['cmd'] = _ha
end
_h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['stderr'] = stderr.to_jaxb_json_hash unless stderr.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
return _h return _h
end end
# the json (string form) for this AnsibleResult # the json (string form) for this DeployParameter
def to_json def to_json
to_jaxb_json_hash.to_json to_jaxb_json_hash.to_json
end end
#initializes this AnsibleResult with a json hash #initializes this DeployParameter with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
if !_o['msg'].nil? if !_o['IP'].nil?
_oa = _o['msg'] _oa = _o['IP']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@msg = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @IP = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@msg = String.from_json(_oa) unless _oa['@class'] @IP = 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
@msg = Array.new @IP = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@msg.push String.from_json(_item) @IP.push String.from_json(_item)
else else
@msg.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @IP.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@msg = _oa @IP = _oa
end
end
if !_o['changed'].nil?
_oa = _o['changed']
if(_oa.is_a? Hash)
@changed = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@changed = Boolean.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@changed = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@changed.push Boolean.from_json(_item)
else
@changed.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@changed = _oa
end
end
if !_o['end'].nil?
_oa = _o['end']
if(_oa.is_a? Hash)
@end = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@end = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@end = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@end.push Time.from_json(_item)
else
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@end = _oa
end
end
if !_o['stdout'].nil?
_oa = _o['stdout']
if(_oa.is_a? Hash)
@stdout = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stdout = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@stdout = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@stdout.push String.from_json(_item)
else
@stdout.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@stdout = _oa
end
end
if !_o['cmd'].nil?
_oa = _o['cmd']
if(_oa.is_a? Hash)
@cmd = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cmd = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@cmd = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cmd.push String.from_json(_item)
else
@cmd.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cmd = _oa
end
end
if !_o['start'].nil?
_oa = _o['start']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
end end
end end
if !_o['stderr'].nil? if !_o['user'].nil?
_oa = _o['stderr'] _oa = _o['user']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@stderr = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @user = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stderr = String.from_json(_oa) unless _oa['@class'] @user = 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
@stderr = Array.new @user = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@stderr.push String.from_json(_item) @user.push String.from_json(_item)
else else
@stderr.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @user.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@stderr = _oa @user = _oa
end end
end end
if !_o['delta'].nil? if !_o['role'].nil?
_oa = _o['delta'] _oa = _o['role']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @role = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class'] @role = 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
@delta = Array.new @role = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item) @role.push String.from_json(_item)
else else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @role.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@delta = _oa @role = _oa
end end
end end
end end
# constructs a AnsibleResult from a (parsed) JSON hash # constructs a DeployParameter 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
...@@ -590,8 +592,6 @@ end ...@@ -590,8 +592,6 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -1012,88 +1012,156 @@ module V1 ...@@ -1012,88 +1012,156 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class ScaleRequest < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject class AnsibleOutput < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject
# the scaleTargetID # the host
attr_accessor :scaleTargetID attr_accessor :host
# the scaleTargetName # the result
attr_accessor :scaleTargetName attr_accessor :result
# the numOfInstances # the domain
attr_accessor :numOfInstances attr_accessor :cloudDeploymentDomain
#
attr_accessor :vmType
# the provision ID
attr_accessor :provisionID
# the cloudProvider
attr_accessor :cloudProvider
# the json hash for this ScaleRequest # the json hash for this AnsibleOutput
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['scaleTargetID'] = scaleTargetID.to_jaxb_json_hash unless scaleTargetID.nil? _h['host'] = host.to_jaxb_json_hash unless host.nil?
_h['scaleTargetName'] = scaleTargetName.to_jaxb_json_hash unless scaleTargetName.nil? _h['result'] = result.to_jaxb_json_hash unless result.nil?
_h['numOfInstances'] = numOfInstances.to_jaxb_json_hash unless numOfInstances.nil? _h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['provisionID'] = provisionID.to_jaxb_json_hash unless provisionID.nil?
_h['cloudProvider'] = cloudProvider.to_jaxb_json_hash unless cloudProvider.nil?
return _h return _h
end end
#initializes this ScaleRequest with a json hash #initializes this AnsibleOutput with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['scaleTargetID'].nil? if !_o['host'].nil?
_oa = _o['scaleTargetID'] _oa = _o['host']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@scaleTargetID = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@scaleTargetID = String.from_json(_oa) unless _oa['@class'] @host = 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
@scaleTargetID = Array.new @host = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@scaleTargetID.push String.from_json(_item) @host.push String.from_json(_item)
else else
@scaleTargetID.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@scaleTargetID = _oa @host = _oa
end end
end end
if !_o['scaleTargetName'].nil? if !_o['result'].nil?
_oa = _o['scaleTargetName'] _oa = _o['result']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@scaleTargetName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @result = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@scaleTargetName = String.from_json(_oa) unless _oa['@class'] @result = Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::Ansible::AnsibleResult.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
@scaleTargetName = Array.new @result = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@scaleTargetName.push String.from_json(_item) @result.push Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::Ansible::AnsibleResult.from_json(_item)
else else
@scaleTargetName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @result.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@scaleTargetName = _oa @result = _oa
end end
end end
if !_o['numOfInstances'].nil? if !_o['cloudDeploymentDomain'].nil?
_oa = _o['numOfInstances'] _oa = _o['cloudDeploymentDomain']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@numOfInstances = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @cloudDeploymentDomain = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@numOfInstances = Fixnum.from_json(_oa) unless _oa['@class'] @cloudDeploymentDomain = 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
@numOfInstances = Array.new @cloudDeploymentDomain = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@numOfInstances.push Fixnum.from_json(_item) @cloudDeploymentDomain.push String.from_json(_item)
else else
@numOfInstances.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @cloudDeploymentDomain.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@numOfInstances = _oa @cloudDeploymentDomain = _oa
end
end
if !_o['vmType'].nil?
_oa = _o['vmType']
if(_oa.is_a? Hash)
@vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@vmType = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@vmType = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@vmType.push String.from_json(_item)
else
@vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@vmType = _oa
end
end
if !_o['provisionID'].nil?
_oa = _o['provisionID']
if(_oa.is_a? Hash)
@provisionID = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@provisionID = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@provisionID = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@provisionID.push String.from_json(_item)
else
@provisionID.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@provisionID = _oa
end
end
if !_o['cloudProvider'].nil?
_oa = _o['cloudProvider']
if(_oa.is_a? Hash)
@cloudProvider = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProvider = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@cloudProvider = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudProvider.push String.from_json(_item)
else
@cloudProvider.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cloudProvider = _oa
end end
end end
end end
# constructs a ScaleRequest from a (parsed) JSON hash # constructs a AnsibleOutput 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
...@@ -1123,6 +1191,8 @@ end ...@@ -1123,6 +1191,8 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -1141,110 +1211,156 @@ module V1 ...@@ -1141,110 +1211,156 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class CloudCredentials < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject class BenchmarkResult < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject
# the secret key # (no documentation provided)
attr_accessor :secretKey attr_accessor :cloudDeploymentDomain
# the cloudProviderName # (no documentation provided)
attr_accessor :cloudProviderName attr_accessor :host
# the accessKeyId # (no documentation provided)
attr_accessor :accessKeyId attr_accessor :start
# the attributes # (no documentation provided)
attr_accessor :attributes attr_accessor :vmType
# (no documentation provided)
attr_accessor :end
# (no documentation provided)
attr_accessor :delta
# the json hash for this CloudCredentials # the json hash for this BenchmarkResult
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['secretKey'] = secretKey.to_jaxb_json_hash unless secretKey.nil? _h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
_h['cloudProviderName'] = cloudProviderName.to_jaxb_json_hash unless cloudProviderName.nil? _h['host'] = host.to_jaxb_json_hash unless host.nil?
_h['accessKeyId'] = accessKeyId.to_jaxb_json_hash unless accessKeyId.nil? _h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['attributes'] = attributes.to_jaxb_json_hash unless attributes.nil? _h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['end'] = end.to_jaxb_json_hash unless end.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
return _h return _h
end end
#initializes this CloudCredentials with a json hash #initializes this BenchmarkResult with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['secretKey'].nil? if !_o['cloudDeploymentDomain'].nil?
_oa = _o['secretKey'] _oa = _o['cloudDeploymentDomain']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@secretKey = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @cloudDeploymentDomain = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@secretKey = String.from_json(_oa) unless _oa['@class'] @cloudDeploymentDomain = 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
@secretKey = Array.new @cloudDeploymentDomain = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@secretKey.push String.from_json(_item) @cloudDeploymentDomain.push String.from_json(_item)
else else
@secretKey.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @cloudDeploymentDomain.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@secretKey = _oa @cloudDeploymentDomain = _oa
end end
end end
if !_o['cloudProviderName'].nil? if !_o['host'].nil?
_oa = _o['cloudProviderName'] _oa = _o['host']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@cloudProviderName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProviderName = String.from_json(_oa) unless _oa['@class'] @host = 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
@cloudProviderName = Array.new @host = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudProviderName.push String.from_json(_item) @host.push String.from_json(_item)
else else
@cloudProviderName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@cloudProviderName = _oa @host = _oa
end end
end end
if !_o['accessKeyId'].nil? if !_o['start'].nil?
_oa = _o['accessKeyId'] _oa = _o['start']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@accessKeyId = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@accessKeyId = String.from_json(_oa) unless _oa['@class'] @start = Time.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
@accessKeyId = Array.new @start = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@accessKeyId.push String.from_json(_item) @start.push Time.from_json(_item)
else else
@accessKeyId.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@accessKeyId = _oa @start = _oa
end end
end end
if !_o['attributes'].nil? if !_o['vmType'].nil?
_oa = _o['attributes'] _oa = _o['vmType']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@attributes = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@attributes = Hash.from_json(_oa) unless _oa['@class'] @vmType = 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
@attributes = Array.new @vmType = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@attributes.push Hash.from_json(_item) @vmType.push String.from_json(_item)
else else
@attributes.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@attributes = _oa @vmType = _oa
end
end
if !_o['end'].nil?
_oa = _o['end']
if(_oa.is_a? Hash)
@end = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@end = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@end = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@end.push Time.from_json(_item)
else
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@end = _oa
end
end
if !_o['delta'].nil?
_oa = _o['delta']
if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@delta = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item)
else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@delta = _oa
end end
end end
end end
# constructs a CloudCredentials from a (parsed) JSON hash # constructs a BenchmarkResult 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
...@@ -1274,6 +1390,8 @@ end ...@@ -1274,6 +1390,8 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -1292,156 +1410,110 @@ module V1 ...@@ -1292,156 +1410,110 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class BenchmarkResult < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject class CloudCredentials < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject
# (no documentation provided) # the secret key
attr_accessor :start attr_accessor :secretKey
# (no documentation provided) # the cloudProviderName
attr_accessor :vmType attr_accessor :cloudProviderName
# (no documentation provided) # the accessKeyId
attr_accessor :host attr_accessor :accessKeyId
# (no documentation provided) # the attributes
attr_accessor :delta attr_accessor :attributes
# (no documentation provided)
attr_accessor :cloudDeploymentDomain
# (no documentation provided)
attr_accessor :end
# the json hash for this BenchmarkResult # the json hash for this CloudCredentials
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['start'] = start.to_jaxb_json_hash unless start.nil? _h['secretKey'] = secretKey.to_jaxb_json_hash unless secretKey.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil? _h['cloudProviderName'] = cloudProviderName.to_jaxb_json_hash unless cloudProviderName.nil?
_h['host'] = host.to_jaxb_json_hash unless host.nil? _h['accessKeyId'] = accessKeyId.to_jaxb_json_hash unless accessKeyId.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil? _h['attributes'] = attributes.to_jaxb_json_hash unless attributes.nil?
_h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
_h['end'] = end.to_jaxb_json_hash unless end.nil?
return _h return _h
end end
#initializes this BenchmarkResult with a json hash #initializes this CloudCredentials with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['start'].nil? if !_o['secretKey'].nil?
_oa = _o['start'] _oa = _o['secretKey']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
end
end
if !_o['vmType'].nil?
_oa = _o['vmType']
if(_oa.is_a? Hash)
@vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@vmType = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@vmType = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@vmType.push String.from_json(_item)
else
@vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@vmType = _oa
end
end
if !_o['host'].nil?
_oa = _o['host']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @secretKey = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@host = String.from_json(_oa) unless _oa['@class'] @secretKey = 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
@host = Array.new @secretKey = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@host.push String.from_json(_item) @secretKey.push String.from_json(_item)
else else
@host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @secretKey.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@host = _oa @secretKey = _oa
end end
end end
if !_o['delta'].nil? if !_o['cloudProviderName'].nil?
_oa = _o['delta'] _oa = _o['cloudProviderName']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @cloudProviderName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class'] @cloudProviderName = 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
@delta = Array.new @cloudProviderName = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item) @cloudProviderName.push String.from_json(_item)
else else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @cloudProviderName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@delta = _oa @cloudProviderName = _oa
end end
end end
if !_o['cloudDeploymentDomain'].nil? if !_o['accessKeyId'].nil?
_oa = _o['cloudDeploymentDomain'] _oa = _o['accessKeyId']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@cloudDeploymentDomain = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @accessKeyId = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudDeploymentDomain = String.from_json(_oa) unless _oa['@class'] @accessKeyId = 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
@cloudDeploymentDomain = Array.new @accessKeyId = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudDeploymentDomain.push String.from_json(_item) @accessKeyId.push String.from_json(_item)
else else
@cloudDeploymentDomain.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @accessKeyId.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@cloudDeploymentDomain = _oa @accessKeyId = _oa
end end
end end
if !_o['end'].nil? if !_o['attributes'].nil?
_oa = _o['end'] _oa = _o['attributes']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@end = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @attributes = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@end = Time.from_json(_oa) unless _oa['@class'] @attributes = Hash.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
@end = Array.new @attributes = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@end.push Time.from_json(_item) @attributes.push Hash.from_json(_item)
else else
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @attributes.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@end = _oa @attributes = _oa
end end
end end
end end
# constructs a BenchmarkResult from a (parsed) JSON hash # constructs a CloudCredentials 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
...@@ -1471,8 +1543,6 @@ end ...@@ -1471,8 +1543,6 @@ end
end end
end
module Nl module Nl
module Uva module Uva
...@@ -2053,156 +2123,88 @@ module V1 ...@@ -2053,156 +2123,88 @@ module V1
module External module External
module Ansible
# (no documentation provided) # (no documentation provided)
class AnsibleOutput < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject class ScaleRequest < Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::OwnedObject
# the host # the scaleTargetID
attr_accessor :host attr_accessor :scaleTargetID
# the result # the scaleTargetName
attr_accessor :result attr_accessor :scaleTargetName
# the domain # the numOfInstances
attr_accessor :cloudDeploymentDomain attr_accessor :numOfInstances
#
attr_accessor :vmType
# the provision ID
attr_accessor :provisionID
# the cloudProvider
attr_accessor :cloudProvider
# the json hash for this AnsibleOutput # the json hash for this ScaleRequest
def to_jaxb_json_hash def to_jaxb_json_hash
_h = super _h = super
_h['host'] = host.to_jaxb_json_hash unless host.nil? _h['scaleTargetID'] = scaleTargetID.to_jaxb_json_hash unless scaleTargetID.nil?
_h['result'] = result.to_jaxb_json_hash unless result.nil? _h['scaleTargetName'] = scaleTargetName.to_jaxb_json_hash unless scaleTargetName.nil?
_h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil? _h['numOfInstances'] = numOfInstances.to_jaxb_json_hash unless numOfInstances.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['provisionID'] = provisionID.to_jaxb_json_hash unless provisionID.nil?
_h['cloudProvider'] = cloudProvider.to_jaxb_json_hash unless cloudProvider.nil?
return _h return _h
end end
#initializes this AnsibleOutput with a json hash #initializes this ScaleRequest with a json hash
def init_jaxb_json_hash(_o) def init_jaxb_json_hash(_o)
super _o super _o
if !_o['host'].nil? if !_o['scaleTargetID'].nil?
_oa = _o['host'] _oa = _o['scaleTargetID']
if(_oa.is_a? Hash)
@host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@host = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@host = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@host.push String.from_json(_item)
else
@host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@host = _oa
end
end
if !_o['result'].nil?
_oa = _o['result']
if(_oa.is_a? Hash)
@result = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@result = Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::Ansible::AnsibleResult.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@result = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@result.push Nl::Uva::Sne::Drip::Drip::Commons::Data::V1::External::Ansible::AnsibleResult.from_json(_item)
else
@result.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@result = _oa
end
end
if !_o['cloudDeploymentDomain'].nil?
_oa = _o['cloudDeploymentDomain']
if(_oa.is_a? Hash)
@cloudDeploymentDomain = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudDeploymentDomain = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@cloudDeploymentDomain = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudDeploymentDomain.push String.from_json(_item)
else
@cloudDeploymentDomain.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cloudDeploymentDomain = _oa
end
end
if !_o['vmType'].nil?
_oa = _o['vmType']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @scaleTargetID = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@vmType = String.from_json(_oa) unless _oa['@class'] @scaleTargetID = 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
@vmType = Array.new @scaleTargetID = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@vmType.push String.from_json(_item) @scaleTargetID.push String.from_json(_item)
else else
@vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @scaleTargetID.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@vmType = _oa @scaleTargetID = _oa
end end
end end
if !_o['provisionID'].nil? if !_o['scaleTargetName'].nil?
_oa = _o['provisionID'] _oa = _o['scaleTargetName']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@provisionID = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @scaleTargetName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@provisionID = String.from_json(_oa) unless _oa['@class'] @scaleTargetName = 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
@provisionID = Array.new @scaleTargetName = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@provisionID.push String.from_json(_item) @scaleTargetName.push String.from_json(_item)
else else
@provisionID.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @scaleTargetName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@provisionID = _oa @scaleTargetName = _oa
end end
end end
if !_o['cloudProvider'].nil? if !_o['numOfInstances'].nil?
_oa = _o['cloudProvider'] _oa = _o['numOfInstances']
if(_oa.is_a? Hash) if(_oa.is_a? Hash)
@cloudProvider = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class'] @numOfInstances = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProvider = String.from_json(_oa) unless _oa['@class'] @numOfInstances = Fixnum.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
@cloudProvider = Array.new @numOfInstances = Array.new
_oa.each { | _item | _oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true) if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudProvider.push String.from_json(_item) @numOfInstances.push Fixnum.from_json(_item)
else else
@cloudProvider.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item) @numOfInstances.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end end
} }
else else
@cloudProvider = _oa @numOfInstances = _oa
end end
end end
end end
# constructs a AnsibleOutput from a (parsed) JSON hash # constructs a ScaleRequest 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
...@@ -2232,8 +2234,6 @@ end ...@@ -2232,8 +2234,6 @@ end
end end
end
module Nl module Nl
module Uva module Uva
......
...@@ -81,16 +81,16 @@ class</p> ...@@ -81,16 +81,16 @@ class</p>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td> <span class="property-name">start</span> <td> <span class="property-name">cloudDeploymentDomain</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">string
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">vmType</span> <td> <span class="property-name">host</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">string
</span> </span>
...@@ -99,34 +99,34 @@ class</p> ...@@ -99,34 +99,34 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">host</span> <td> <span class="property-name">start</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">number
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">delta</span> <td> <span class="property-name">vmType</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">string
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">cloudDeploymentDomain</span> <td> <span class="property-name">end</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">number
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">end</span> <td> <span class="property-name">delta</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">number
</span> </span>
...@@ -167,12 +167,12 @@ No need to set during a POST</span></td> ...@@ -167,12 +167,12 @@ No need to set during a POST</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-js example">{ <pre class="prettyprint language-js example">{
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
......
...@@ -69,7 +69,7 @@ class</p> ...@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>Subtypes</dt> <dt>Subtypes</dt>
<dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_MonitorringMessage.html">MonitorringMessage</a></dd> <dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_MonitorringMessage.html">MonitorringMessage</a></dd>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -792,18 +792,18 @@ class]]> ...@@ -792,18 +792,18 @@ class]]>
<xs:complexContent> <xs:complexContent>
<xs:extension base="ownedObject"> <xs:extension base="ownedObject">
<xs:sequence> <xs:sequence>
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0"> <xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0"> <xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0"> <xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
</xs:sequence> </xs:sequence>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
......
...@@ -144,12 +144,12 @@ Content-Type: application/json ...@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js"> <code class="prettyprint language-js">
[ { [ {
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
...@@ -514,12 +514,12 @@ Content-Type: application/json ...@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js"> <code class="prettyprint language-js">
{ {
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
......
...@@ -114,7 +114,11 @@ provisoner to request for resources (VMs)</p> ...@@ -114,7 +114,11 @@ provisoner to request for resources (VMs)</p>
<tbody> <tbody>
<tr> <tr>
<td><span class="label label-warning response-code">404</span></td> <td><span class="label label-warning response-code">404</span></td>
<td><span class="response-condition">Access key ID can't be empty</span></td> <td><span class="response-condition">Key can't be empty</span></td>
</tr>
<tr>
<td><span class="label label-warning response-code">404</span></td>
<td><span class="response-condition">Cloud provider's name can't be empty</span></td>
</tr> </tr>
<tr> <tr>
<td><span class="label label-success response-code">200</span></td> <td><span class="label label-success response-code">200</span></td>
......
...@@ -220,12 +220,12 @@ It is created automatically. No need to set during a POST</span></td> ...@@ -220,12 +220,12 @@ It is created automatically. No need to set during a POST</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt; <pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;end&gt;...&lt;/end&gt; &lt;end&gt;...&lt;/end&gt;
&lt;start&gt;...&lt;/start&gt; &lt;start&gt;...&lt;/start&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;delta&gt;...&lt;/delta&gt; &lt;delta&gt;...&lt;/delta&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;owner&gt;user1&lt;/owner&gt; &lt;owner&gt;user1&lt;/owner&gt;
&lt;/b-----&gt; &lt;/b-----&gt;
</pre> </pre>
......
...@@ -70,33 +70,33 @@ import nl.uva.sne.drip.drip.commons.data.v1.external.ScaleRequest; ...@@ -70,33 +70,33 @@ import nl.uva.sne.drip.drip.commons.data.v1.external.ScaleRequest;
@Service @Service
@PreAuthorize("isAuthenticated()") @PreAuthorize("isAuthenticated()")
public class ProvisionService { public class ProvisionService {
@Autowired @Autowired
private ProvisionResponseDao provisionDao; private ProvisionResponseDao provisionDao;
@Autowired @Autowired
private CloudCredentialsService cloudCredentialsService; private CloudCredentialsService cloudCredentialsService;
@Autowired @Autowired
private SimplePlannerService simplePlanService; private SimplePlannerService simplePlanService;
@Autowired @Autowired
private ScriptService userScriptService; private ScriptService userScriptService;
@Autowired @Autowired
private KeyPairService keyPairService; private KeyPairService keyPairService;
@Value("${message.broker.host}") @Value("${message.broker.host}")
private String messageBrokerHost; private String messageBrokerHost;
public ProvisionResponse save(ProvisionResponse ownedObject) { public ProvisionResponse save(ProvisionResponse ownedObject) {
User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
String owner = user.getUsername(); String owner = user.getUsername();
ownedObject.setOwner(owner); ownedObject.setOwner(owner);
return provisionDao.save(ownedObject); return provisionDao.save(ownedObject);
} }
@PostAuthorize("(returnObject.owner == authentication.name) or (hasRole('ROLE_ADMIN'))") @PostAuthorize("(returnObject.owner == authentication.name) or (hasRole('ROLE_ADMIN'))")
public ProvisionResponse findOne(String id) { public ProvisionResponse findOne(String id) {
ProvisionResponse provisionInfo = provisionDao.findOne(id); ProvisionResponse provisionInfo = provisionDao.findOne(id);
...@@ -105,7 +105,7 @@ public class ProvisionService { ...@@ -105,7 +105,7 @@ public class ProvisionService {
} }
return provisionInfo; return provisionInfo;
} }
@PostAuthorize("(returnObject.owner == authentication.name) or (hasRole('ROLE_ADMIN'))") @PostAuthorize("(returnObject.owner == authentication.name) or (hasRole('ROLE_ADMIN'))")
public ProvisionResponse delete(String id) { public ProvisionResponse delete(String id) {
ProvisionResponse provisionInfo = provisionDao.findOne(id); ProvisionResponse provisionInfo = provisionDao.findOne(id);
...@@ -123,9 +123,9 @@ public class ProvisionService { ...@@ -123,9 +123,9 @@ public class ProvisionService {
public List<ProvisionResponse> findAll() { public List<ProvisionResponse> findAll() {
return provisionDao.findAll(); return provisionDao.findAll();
} }
public ProvisionResponse provisionResources(ProvisionRequest provisionRequest, int provisionerVersion) throws IOException, TimeoutException, JSONException, InterruptedException, Exception { public ProvisionResponse provisionResources(ProvisionRequest provisionRequest, int provisionerVersion) throws IOException, TimeoutException, JSONException, InterruptedException, Exception {
switch (provisionerVersion) { switch (provisionerVersion) {
case 0: case 0:
return callProvisioner0(provisionRequest); return callProvisioner0(provisionRequest);
...@@ -133,9 +133,9 @@ public class ProvisionService { ...@@ -133,9 +133,9 @@ public class ProvisionService {
return callProvisioner1(provisionRequest); return callProvisioner1(provisionRequest);
} }
return null; return null;
} }
private Message buildProvisioner0Message(ProvisionRequest pReq) throws JSONException, IOException { private Message buildProvisioner0Message(ProvisionRequest pReq) throws JSONException, IOException {
Message invokationMessage = new Message(); Message invokationMessage = new Message();
List<MessageParameter> parameters = new ArrayList(); List<MessageParameter> parameters = new ArrayList();
...@@ -145,24 +145,24 @@ public class ProvisionService { ...@@ -145,24 +145,24 @@ public class ProvisionService {
} }
MessageParameter conf = buildCloudCredentialParam(cred, 0).get(0); MessageParameter conf = buildCloudCredentialParam(cred, 0).get(0);
parameters.add(conf); parameters.add(conf);
List<MessageParameter> certs = buildCertificatesParam(cred); List<MessageParameter> certs = buildCertificatesParam(cred);
parameters.addAll(certs); parameters.addAll(certs);
List<MessageParameter> topologies = buildTopologyParams(pReq.getPlanID()); List<MessageParameter> topologies = buildTopologyParams(pReq.getPlanID());
parameters.addAll(topologies); parameters.addAll(topologies);
List<String> userKeyIDs = pReq.getUserKeyPairIDs(); List<String> userKeyIDs = pReq.getUserKeyPairIDs();
if (userKeyIDs != null) { if (userKeyIDs != null) {
List<MessageParameter> userKeys = buildUserKeysParams(userKeyIDs.get(0), 0); List<MessageParameter> userKeys = buildUserKeysParams(userKeyIDs.get(0), 0);
parameters.addAll(userKeys); parameters.addAll(userKeys);
} }
invokationMessage.setParameters(parameters); invokationMessage.setParameters(parameters);
invokationMessage.setCreationDate((System.currentTimeMillis())); invokationMessage.setCreationDate((System.currentTimeMillis()));
return invokationMessage; return invokationMessage;
} }
private List<MessageParameter> buildCloudCredentialParam(CloudCredentials cred, int version) throws JsonProcessingException, JSONException, IOException { private List<MessageParameter> buildCloudCredentialParam(CloudCredentials cred, int version) throws JsonProcessingException, JSONException, IOException {
List<MessageParameter> cloudCredentialParams = new ArrayList<>(); List<MessageParameter> cloudCredentialParams = new ArrayList<>();
if (version == 0) { if (version == 0) {
...@@ -197,15 +197,15 @@ public class ProvisionService { ...@@ -197,15 +197,15 @@ public class ProvisionService {
mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
String jsonInString = mapper.writeValueAsString(cred); String jsonInString = mapper.writeValueAsString(cred);
cloudCred.setValue("\"" + jsonInString + "\""); cloudCred.setValue("\"" + jsonInString + "\"");
cloudCredentialParams.add(cloudCred); cloudCredentialParams.add(cloudCred);
return cloudCredentialParams; return cloudCredentialParams;
} }
return null; return null;
} }
private List<MessageParameter> buildCertificatesParam(CloudCredentials cred) { private List<MessageParameter> buildCertificatesParam(CloudCredentials cred) {
// List<String> loginKeysIDs = cred.getkeyPairIDs(); // List<String> loginKeysIDs = cred.getkeyPairIDs();
List<KeyPair> loginKeys = new ArrayList<>(); List<KeyPair> loginKeys = new ArrayList<>();
...@@ -232,10 +232,10 @@ public class ProvisionService { ...@@ -232,10 +232,10 @@ public class ProvisionService {
} }
return parameters; return parameters;
} }
private List<MessageParameter> buildTopologyParams(String planID) throws JSONException, FileNotFoundException { private List<MessageParameter> buildTopologyParams(String planID) throws JSONException, FileNotFoundException {
PlanResponse plan = simplePlanService.getDao().findOne(planID); PlanResponse plan = simplePlanService.getDao().findOne(planID);
if (plan == null) { if (plan == null) {
throw new PlanNotFoundException(); throw new PlanNotFoundException();
} }
...@@ -250,7 +250,7 @@ public class ProvisionService { ...@@ -250,7 +250,7 @@ public class ProvisionService {
attributes.put("filename", FilenameUtils.removeExtension(plan.getName())); attributes.put("filename", FilenameUtils.removeExtension(plan.getName()));
topology.setAttributes(attributes); topology.setAttributes(attributes);
parameters.add(topology); parameters.add(topology);
Set<String> ids = plan.getLoweLevelPlanIDs(); Set<String> ids = plan.getLoweLevelPlanIDs();
if (ids != null) { if (ids != null) {
for (String lowID : ids) { for (String lowID : ids) {
...@@ -269,10 +269,10 @@ public class ProvisionService { ...@@ -269,10 +269,10 @@ public class ProvisionService {
} }
return parameters; return parameters;
} }
private List<MessageParameter> buildProvisionedTopologyParams(ProvisionResponse provisionInfo) throws JSONException { private List<MessageParameter> buildProvisionedTopologyParams(ProvisionResponse provisionInfo) throws JSONException {
List<MessageParameter> parameters = new ArrayList(); List<MessageParameter> parameters = new ArrayList();
Map<String, Object> map = provisionInfo.getKeyValue(); Map<String, Object> map = provisionInfo.getKeyValue();
for (String topoName : map.keySet()) { for (String topoName : map.keySet()) {
Map<String, Object> topo = (Map<String, Object>) map.get(topoName); Map<String, Object> topo = (Map<String, Object>) map.get(topoName);
...@@ -291,13 +291,13 @@ public class ProvisionService { ...@@ -291,13 +291,13 @@ public class ProvisionService {
} }
return parameters; return parameters;
} }
private List<MessageParameter> buildClusterKeyParams(ProvisionResponse provisionInfo) { private List<MessageParameter> buildClusterKeyParams(ProvisionResponse provisionInfo) {
List<MessageParameter> parameters = new ArrayList(); List<MessageParameter> parameters = new ArrayList();
List<String> ids = provisionInfo.getDeployerKeyPairIDs(); List<String> ids = provisionInfo.getDeployerKeyPairIDs();
for (String id : ids) { for (String id : ids) {
KeyPair pair = keyPairService.findOne(id); KeyPair pair = keyPairService.findOne(id);
MessageParameter param = new MessageParameter(); MessageParameter param = new MessageParameter();
param.setName("private_deployer_key"); param.setName("private_deployer_key");
param.setValue(pair.getPrivateKey().getKey()); param.setValue(pair.getPrivateKey().getKey());
...@@ -308,7 +308,7 @@ public class ProvisionService { ...@@ -308,7 +308,7 @@ public class ProvisionService {
attributes.put("name", pair.getPrivateKey().getName()); attributes.put("name", pair.getPrivateKey().getName());
param.setAttributes(attributes); param.setAttributes(attributes);
parameters.add(param); parameters.add(param);
param = new MessageParameter(); param = new MessageParameter();
param.setName("public_deployer_key"); param.setName("public_deployer_key");
param.setValue(pair.getPublicKey().getKey()); param.setValue(pair.getPublicKey().getKey());
...@@ -320,16 +320,16 @@ public class ProvisionService { ...@@ -320,16 +320,16 @@ public class ProvisionService {
attributes.put("name", pair.getPublicKey().getName()); attributes.put("name", pair.getPublicKey().getName());
parameters.add(param); parameters.add(param);
} }
return parameters; return parameters;
} }
private List<MessageParameter> buildUserKeyParams(ProvisionResponse provisionInfo) { private List<MessageParameter> buildUserKeyParams(ProvisionResponse provisionInfo) {
List<MessageParameter> parameters = new ArrayList(); List<MessageParameter> parameters = new ArrayList();
List<String> ids = provisionInfo.getUserKeyPairIDs(); List<String> ids = provisionInfo.getUserKeyPairIDs();
for (String id : ids) { for (String id : ids) {
KeyPair pair = keyPairService.findOne(id); KeyPair pair = keyPairService.findOne(id);
MessageParameter param = new MessageParameter(); MessageParameter param = new MessageParameter();
param.setName("private_user_key"); param.setName("private_user_key");
param.setValue(pair.getPrivateKey().getKey()); param.setValue(pair.getPrivateKey().getKey());
...@@ -340,7 +340,7 @@ public class ProvisionService { ...@@ -340,7 +340,7 @@ public class ProvisionService {
attributes.put("name", pair.getPrivateKey().getName()); attributes.put("name", pair.getPrivateKey().getName());
param.setAttributes(attributes); param.setAttributes(attributes);
parameters.add(param); parameters.add(param);
param = new MessageParameter(); param = new MessageParameter();
param.setName("public_user_key"); param.setName("public_user_key");
param.setValue(pair.getPublicKey().getKey()); param.setValue(pair.getPublicKey().getKey());
...@@ -353,14 +353,14 @@ public class ProvisionService { ...@@ -353,14 +353,14 @@ public class ProvisionService {
} }
return parameters; return parameters;
} }
private List<MessageParameter> buildCloudKeyParams(ProvisionResponse provisionInfo) { private List<MessageParameter> buildCloudKeyParams(ProvisionResponse provisionInfo) {
List<MessageParameter> parameters = new ArrayList(); List<MessageParameter> parameters = new ArrayList();
List<String> ids = provisionInfo.getCloudKeyPairIDs(); List<String> ids = provisionInfo.getCloudKeyPairIDs();
if (ids != null) { if (ids != null) {
for (String id : ids) { for (String id : ids) {
KeyPair pair = keyPairService.findOne(id); KeyPair pair = keyPairService.findOne(id);
MessageParameter param = new MessageParameter(); MessageParameter param = new MessageParameter();
param.setName("private_cloud_key"); param.setName("private_cloud_key");
param.setValue(pair.getPrivateKey().getKey()); param.setValue(pair.getPrivateKey().getKey());
...@@ -370,7 +370,7 @@ public class ProvisionService { ...@@ -370,7 +370,7 @@ public class ProvisionService {
attributes.put("key_pair_id", pair.getKeyPairId()); attributes.put("key_pair_id", pair.getKeyPairId());
param.setAttributes(attributes); param.setAttributes(attributes);
parameters.add(param); parameters.add(param);
param = new MessageParameter(); param = new MessageParameter();
param.setName("public_cloud_key"); param.setName("public_cloud_key");
param.setValue(pair.getPublicKey().getKey()); param.setValue(pair.getPublicKey().getKey());
...@@ -382,11 +382,11 @@ public class ProvisionService { ...@@ -382,11 +382,11 @@ public class ProvisionService {
parameters.add(param); parameters.add(param);
} }
} }
return parameters; return parameters;
} }
private MessageParameter buildEC2Conf(CloudCredentials cred) throws JsonProcessingException, JSONException, IOException { private MessageParameter buildEC2Conf(CloudCredentials cred) throws JsonProcessingException, JSONException, IOException {
Properties prop = Converter.getEC2Properties(cred); Properties prop = Converter.getEC2Properties(cred);
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
...@@ -397,9 +397,9 @@ public class ProvisionService { ...@@ -397,9 +397,9 @@ public class ProvisionService {
String charset = "UTF-8"; String charset = "UTF-8";
conf.setValue(new String(bytes, charset)); conf.setValue(new String(bytes, charset));
return conf; return conf;
} }
private List<MessageParameter> buildScriptParams(String userScriptID) { private List<MessageParameter> buildScriptParams(String userScriptID) {
Script script = userScriptService.findOne(userScriptID); Script script = userScriptService.findOne(userScriptID);
if (script == null) { if (script == null) {
...@@ -413,7 +413,7 @@ public class ProvisionService { ...@@ -413,7 +413,7 @@ public class ProvisionService {
parameters.add(scriptParameter); parameters.add(scriptParameter);
return parameters; return parameters;
} }
private List<MessageParameter> buildUserKeysParams(String userKeyID, int version) { private List<MessageParameter> buildUserKeysParams(String userKeyID, int version) {
KeyPair key = keyPairService.findOne(userKeyID); KeyPair key = keyPairService.findOne(userKeyID);
if (key == null) { if (key == null) {
...@@ -432,33 +432,33 @@ public class ProvisionService { ...@@ -432,33 +432,33 @@ public class ProvisionService {
parameters.add(keyParameter); parameters.add(keyParameter);
return parameters; return parameters;
} }
@PostFilter("(hasRole('ROLE_ADMIN'))") @PostFilter("(hasRole('ROLE_ADMIN'))")
public void deleteAll() { public void deleteAll() {
provisionDao.deleteAll(); provisionDao.deleteAll();
} }
private ProvisionResponse callProvisioner0(ProvisionRequest provisionRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception { private ProvisionResponse callProvisioner0(ProvisionRequest provisionRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception {
try (DRIPCaller provisioner = new ProvisionerCaller0(messageBrokerHost);) { try (DRIPCaller provisioner = new ProvisionerCaller0(messageBrokerHost);) {
Message provisionerInvokationMessage = buildProvisioner0Message(provisionRequest); Message provisionerInvokationMessage = buildProvisioner0Message(provisionRequest);
Message response = (provisioner.call(provisionerInvokationMessage)); Message response = (provisioner.call(provisionerInvokationMessage));
return parseCreateResourcesResponse(response.getParameters(), provisionRequest, null, true, true); return parseCreateResourcesResponse(response.getParameters(), provisionRequest, null, true, true);
} }
} }
private ProvisionResponse callProvisioner1(ProvisionRequest provisionRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception { private ProvisionResponse callProvisioner1(ProvisionRequest provisionRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception {
try (DRIPCaller provisioner = new ProvisionerCaller1(messageBrokerHost);) { try (DRIPCaller provisioner = new ProvisionerCaller1(messageBrokerHost);) {
Message provisionerInvokationMessage = buildProvisioner1Message(provisionRequest); Message provisionerInvokationMessage = buildProvisioner1Message(provisionRequest);
Message response = (provisioner.call(provisionerInvokationMessage)); Message response = (provisioner.call(provisionerInvokationMessage));
return parseCreateResourcesResponse(response.getParameters(), provisionRequest, null, true, true); return parseCreateResourcesResponse(response.getParameters(), provisionRequest, null, true, true);
} }
} }
public void deleteProvisionedResources(ProvisionResponse provisionInfo) throws IOException, TimeoutException, InterruptedException, JSONException { public void deleteProvisionedResources(ProvisionResponse provisionInfo) throws IOException, TimeoutException, InterruptedException, JSONException {
try (DRIPCaller provisioner = new ProvisionerCaller1(messageBrokerHost);) { try (DRIPCaller provisioner = new ProvisionerCaller1(messageBrokerHost);) {
Message deleteInvokationMessage = buildTopoplogyModificationMessage(provisionInfo, "kill_topology", null); Message deleteInvokationMessage = buildTopoplogyModificationMessage(provisionInfo, "kill_topology", null);
...@@ -466,7 +466,7 @@ public class ProvisionService { ...@@ -466,7 +466,7 @@ public class ProvisionService {
parseDeleteResourcesResponse(response.getParameters(), provisionInfo); parseDeleteResourcesResponse(response.getParameters(), provisionInfo);
} }
} }
public ProvisionResponse scale(ScaleRequest scaleRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception { public ProvisionResponse scale(ScaleRequest scaleRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception {
String provisionID = scaleRequest.getScaleTargetID(); String provisionID = scaleRequest.getScaleTargetID();
String scaleName = scaleRequest.getScaleTargetName(); String scaleName = scaleRequest.getScaleTargetName();
...@@ -496,12 +496,12 @@ public class ProvisionService { ...@@ -496,12 +496,12 @@ public class ProvisionService {
} }
} }
} }
if (!scaleNameExists) { if (!scaleNameExists) {
throw new BadRequestException("Name of topology dosen't exist"); throw new BadRequestException("Name of topology dosen't exist");
} }
int numOfInstances = Math.abs(currentNumOfInstances - scaleRequest.getNumOfInstances()); int numOfInstances = Math.abs(currentNumOfInstances - scaleRequest.getNumOfInstances());
if (currentNumOfInstances > scaleRequest.getNumOfInstances() && currentNumOfInstances != 0) { if (currentNumOfInstances > scaleRequest.getNumOfInstances() && currentNumOfInstances != 0) {
try (DRIPCaller provisioner = new ProvisionerCaller1(messageBrokerHost);) { try (DRIPCaller provisioner = new ProvisionerCaller1(messageBrokerHost);) {
Map<String, String> extra = new HashMap<>(); Map<String, String> extra = new HashMap<>();
...@@ -509,7 +509,7 @@ public class ProvisionService { ...@@ -509,7 +509,7 @@ public class ProvisionService {
extra.put("number_of_instances", String.valueOf(numOfInstances)); extra.put("number_of_instances", String.valueOf(numOfInstances));
extra.put("cloud_provider", cloudProvider); extra.put("cloud_provider", cloudProvider);
extra.put("domain", domain); extra.put("domain", domain);
Message scaleMessage = buildTopoplogyModificationMessage(provisionInfo, "scale_topology_down", extra); Message scaleMessage = buildTopoplogyModificationMessage(provisionInfo, "scale_topology_down", extra);
Message response = provisioner.call(scaleMessage); Message response = provisioner.call(scaleMessage);
parseCreateResourcesResponse(response.getParameters(), null, provisionInfo, false, false); parseCreateResourcesResponse(response.getParameters(), null, provisionInfo, false, false);
...@@ -521,7 +521,7 @@ public class ProvisionService { ...@@ -521,7 +521,7 @@ public class ProvisionService {
extra.put("number_of_instances", String.valueOf(numOfInstances)); extra.put("number_of_instances", String.valueOf(numOfInstances));
extra.put("cloud_provider", cloudProvider); extra.put("cloud_provider", cloudProvider);
extra.put("domain", domain); extra.put("domain", domain);
Message scaleMessage = buildTopoplogyModificationMessage(provisionInfo, "scale_topology_up", extra); Message scaleMessage = buildTopoplogyModificationMessage(provisionInfo, "scale_topology_up", extra);
Message response = provisioner.call(scaleMessage); Message response = provisioner.call(scaleMessage);
parseCreateResourcesResponse(response.getParameters(), null, provisionInfo, false, false); parseCreateResourcesResponse(response.getParameters(), null, provisionInfo, false, false);
...@@ -529,19 +529,19 @@ public class ProvisionService { ...@@ -529,19 +529,19 @@ public class ProvisionService {
} }
return provisionInfo; return provisionInfo;
} }
private Message buildProvisioner1Message(ProvisionRequest provisionRequest) throws JSONException, FileNotFoundException, IOException { private Message buildProvisioner1Message(ProvisionRequest provisionRequest) throws JSONException, FileNotFoundException, IOException {
Message invokationMessage = new Message(); Message invokationMessage = new Message();
List<MessageParameter> parameters = new ArrayList(); List<MessageParameter> parameters = new ArrayList();
MessageParameter action = new MessageParameter(); MessageParameter action = new MessageParameter();
action.setName("action"); action.setName("action");
action.setValue("start_topology"); action.setValue("start_topology");
parameters.add(action); parameters.add(action);
List<MessageParameter> topologies = buildTopologyParams(provisionRequest.getPlanID()); List<MessageParameter> topologies = buildTopologyParams(provisionRequest.getPlanID());
parameters.addAll(topologies); parameters.addAll(topologies);
List<String> userKeyIDs = provisionRequest.getUserKeyPairIDs(); List<String> userKeyIDs = provisionRequest.getUserKeyPairIDs();
if (userKeyIDs != null) { if (userKeyIDs != null) {
for (String keyID : userKeyIDs) { for (String keyID : userKeyIDs) {
...@@ -549,7 +549,7 @@ public class ProvisionService { ...@@ -549,7 +549,7 @@ public class ProvisionService {
parameters.addAll(userKeys); parameters.addAll(userKeys);
} }
} }
List<String> deployerKeys = provisionRequest.getDeployerKeyPairIDs(); List<String> deployerKeys = provisionRequest.getDeployerKeyPairIDs();
if (userKeyIDs != null) { if (userKeyIDs != null) {
for (String keyID : deployerKeys) { for (String keyID : deployerKeys) {
...@@ -565,34 +565,34 @@ public class ProvisionService { ...@@ -565,34 +565,34 @@ public class ProvisionService {
List<MessageParameter> cloudCredentialParams = buildCloudCredentialParam(cred, 1); List<MessageParameter> cloudCredentialParams = buildCloudCredentialParam(cred, 1);
parameters.addAll(cloudCredentialParams); parameters.addAll(cloudCredentialParams);
} }
invokationMessage.setParameters(parameters); invokationMessage.setParameters(parameters);
invokationMessage.setCreationDate((System.currentTimeMillis())); invokationMessage.setCreationDate((System.currentTimeMillis()));
return invokationMessage; return invokationMessage;
} }
private Message buildTopoplogyModificationMessage(ProvisionResponse provisionInfo, String actionName, Map<String, String> extraAttributes) throws JSONException, IOException { private Message buildTopoplogyModificationMessage(ProvisionResponse provisionInfo, String actionName, Map<String, String> extraAttributes) throws JSONException, IOException {
Message invokationMessage = new Message(); Message invokationMessage = new Message();
List<MessageParameter> parameters = new ArrayList(); List<MessageParameter> parameters = new ArrayList();
MessageParameter action = new MessageParameter(); MessageParameter action = new MessageParameter();
action.setName("action"); action.setName("action");
action.setValue(actionName); action.setValue(actionName);
parameters.add(action); parameters.add(action);
List<MessageParameter> topologies = buildProvisionedTopologyParams(provisionInfo); List<MessageParameter> topologies = buildProvisionedTopologyParams(provisionInfo);
parameters.addAll(topologies); parameters.addAll(topologies);
List<MessageParameter> clusterKeys = buildClusterKeyParams(provisionInfo); List<MessageParameter> clusterKeys = buildClusterKeyParams(provisionInfo);
parameters.addAll(clusterKeys); parameters.addAll(clusterKeys);
List<MessageParameter> userKeys = buildUserKeyParams(provisionInfo); List<MessageParameter> userKeys = buildUserKeyParams(provisionInfo);
parameters.addAll(userKeys); parameters.addAll(userKeys);
List<MessageParameter> cloudKeys = buildCloudKeyParams(provisionInfo); List<MessageParameter> cloudKeys = buildCloudKeyParams(provisionInfo);
parameters.addAll(cloudKeys); parameters.addAll(cloudKeys);
for (String id : provisionInfo.getCloudCredentialsIDs()) { for (String id : provisionInfo.getCloudCredentialsIDs()) {
CloudCredentials cred = cloudCredentialsService.findOne(id); CloudCredentials cred = cloudCredentialsService.findOne(id);
if (cred == null) { if (cred == null) {
...@@ -616,7 +616,7 @@ public class ProvisionService { ...@@ -616,7 +616,7 @@ public class ProvisionService {
invokationMessage.setCreationDate(System.currentTimeMillis()); invokationMessage.setCreationDate(System.currentTimeMillis());
return invokationMessage; return invokationMessage;
} }
private List<MessageParameter> buildDeployKeysParams(String keyID) { private List<MessageParameter> buildDeployKeysParams(String keyID) {
KeyPair key = keyPairService.findOne(keyID); KeyPair key = keyPairService.findOne(keyID);
if (key == null) { if (key == null) {
...@@ -624,29 +624,29 @@ public class ProvisionService { ...@@ -624,29 +624,29 @@ public class ProvisionService {
} }
List<MessageParameter> parameters = new ArrayList(); List<MessageParameter> parameters = new ArrayList();
MessageParameter keyParameter = new MessageParameter(); MessageParameter keyParameter = new MessageParameter();
keyParameter.setName("deployer_ssh_key"); keyParameter.setName("deployer_ssh_key");
keyParameter.setValue(key.getPublicKey().getKey()); keyParameter.setValue(key.getPublicKey().getKey());
keyParameter.setEncoding("UTF-8"); keyParameter.setEncoding("UTF-8");
parameters.add(keyParameter); parameters.add(keyParameter);
return parameters; return parameters;
} }
private ProvisionResponse parseCreateResourcesResponse(List<MessageParameter> parameters, private ProvisionResponse parseCreateResourcesResponse(List<MessageParameter> parameters,
ProvisionRequest provisionRequest, ProvisionResponse provisionResponse, boolean saveUserKeys, boolean saveDeployerKeyI) throws Exception { ProvisionRequest provisionRequest, ProvisionResponse provisionResponse, boolean saveUserKeys, boolean saveDeployerKeyI) throws Exception {
if (provisionResponse == null) { if (provisionResponse == null) {
provisionResponse = new ProvisionResponse(); provisionResponse = new ProvisionResponse();
} }
List<DeployParameter> deployParameters = new ArrayList<>(); List<DeployParameter> deployParameters = new ArrayList<>();
Map<String, Object> kvMap = null; Map<String, Object> kvMap = null;
KeyPair userKey = new KeyPair(); KeyPair userKey = new KeyPair();
KeyPair deployerKey = new KeyPair(); KeyPair deployerKey = new KeyPair();
Map<String, Key> privateCloudKeys = new HashMap<>(); Map<String, Key> privateCloudKeys = new HashMap<>();
Map<String, Key> publicCloudKeys = new HashMap<>(); Map<String, Key> publicCloudKeys = new HashMap<>();
for (MessageParameter p : parameters) { for (MessageParameter p : parameters) {
String name = p.getName(); String name = p.getName();
if (name.toLowerCase().contains("exception")) { if (name.toLowerCase().contains("exception")) {
...@@ -660,6 +660,7 @@ public class ProvisionService { ...@@ -660,6 +660,7 @@ public class ProvisionService {
String[] lines = value.split("\n"); String[] lines = value.split("\n");
if (value.length() < 2) { if (value.length() < 2) {
throw new Exception("Provision failed"); throw new Exception("Provision failed");
// this.deleteProvisionedResources(provisionResponse);
} }
for (String line : lines) { for (String line : lines) {
DeployParameter deployParam = new DeployParameter(); DeployParameter deployParam = new DeployParameter();
...@@ -669,7 +670,7 @@ public class ProvisionService { ...@@ -669,7 +670,7 @@ public class ProvisionService {
// String deployCertPath = parts[2]; // String deployCertPath = parts[2];
// String cloudCertificateName = FilenameUtils.removeExtension(FilenameUtils.getBaseName(deployCertPath)); // String cloudCertificateName = FilenameUtils.removeExtension(FilenameUtils.getBaseName(deployCertPath));
String deployRole = parts[2]; String deployRole = parts[2];
deployParam.setIP(deployIP); deployParam.setIP(deployIP);
deployParam.setRole(deployRole); deployParam.setRole(deployRole);
deployParam.setUser(deployUser); deployParam.setUser(deployUser);
...@@ -713,7 +714,7 @@ public class ProvisionService { ...@@ -713,7 +714,7 @@ public class ProvisionService {
key.setAttributes(p.getAttributes()); key.setAttributes(p.getAttributes());
publicCloudKeys.put(p.getAttributes().get("key_pair_id"), key); publicCloudKeys.put(p.getAttributes().get("key_pair_id"), key);
break; break;
case "private_cloud_key": case "private_cloud_key":
key = new Key(); key = new Key();
key.setKey(p.getValue()); key.setKey(p.getValue());
...@@ -722,7 +723,7 @@ public class ProvisionService { ...@@ -722,7 +723,7 @@ public class ProvisionService {
key.setAttributes(p.getAttributes()); key.setAttributes(p.getAttributes());
privateCloudKeys.put(p.getAttributes().get("key_pair_id"), key); privateCloudKeys.put(p.getAttributes().get("key_pair_id"), key);
break; break;
default: default:
value = p.getValue(); value = p.getValue();
if (kvMap == null) { if (kvMap == null) {
...@@ -738,7 +739,7 @@ public class ProvisionService { ...@@ -738,7 +739,7 @@ public class ProvisionService {
} else { } else {
userKeyIds = provisionResponse.getUserKeyPairIDs(); userKeyIds = provisionResponse.getUserKeyPairIDs();
} }
if (saveUserKeys) { if (saveUserKeys) {
if (userKeyIds != null && !userKeyIds.isEmpty()) { if (userKeyIds != null && !userKeyIds.isEmpty()) {
} else { } else {
...@@ -757,7 +758,7 @@ public class ProvisionService { ...@@ -757,7 +758,7 @@ public class ProvisionService {
deployerKeyIds.add(deployerKey.getId()); deployerKeyIds.add(deployerKey.getId());
} }
} }
ArrayList<String> cloudKeyPairIDs = new ArrayList<>(); ArrayList<String> cloudKeyPairIDs = new ArrayList<>();
List<KeyPair> allPirs = keyPairService.findAll(); List<KeyPair> allPirs = keyPairService.findAll();
for (String id : publicCloudKeys.keySet()) { for (String id : publicCloudKeys.keySet()) {
...@@ -780,7 +781,7 @@ public class ProvisionService { ...@@ -780,7 +781,7 @@ public class ProvisionService {
cloudPair = keyPairService.save(cloudPair); cloudPair = keyPairService.save(cloudPair);
cloudKeyPairIDs.add(cloudPair.getId()); cloudKeyPairIDs.add(cloudPair.getId());
} }
} }
ArrayList<String> existingCloudKeyPairIDs = provisionResponse.getCloudKeyPairIDs(); ArrayList<String> existingCloudKeyPairIDs = provisionResponse.getCloudKeyPairIDs();
if (existingCloudKeyPairIDs != null) { if (existingCloudKeyPairIDs != null) {
...@@ -789,25 +790,25 @@ public class ProvisionService { ...@@ -789,25 +790,25 @@ public class ProvisionService {
existingCloudKeyPairIDs = cloudKeyPairIDs; existingCloudKeyPairIDs = cloudKeyPairIDs;
} }
provisionResponse.setCloudKeyPairIDs(existingCloudKeyPairIDs); provisionResponse.setCloudKeyPairIDs(existingCloudKeyPairIDs);
provisionResponse.setDeployParameters(deployParameters); provisionResponse.setDeployParameters(deployParameters);
provisionResponse.setKvMap(kvMap); provisionResponse.setKvMap(kvMap);
if (provisionRequest != null) { if (provisionRequest != null) {
provisionResponse.setCloudCredentialsIDs(provisionRequest.getCloudCredentialsIDs()); provisionResponse.setCloudCredentialsIDs(provisionRequest.getCloudCredentialsIDs());
provisionResponse.setPlanID(provisionRequest.getPlanID()); provisionResponse.setPlanID(provisionRequest.getPlanID());
} }
if (userKeyIds != null) { if (userKeyIds != null) {
provisionResponse.setUserKeyPairIDs(userKeyIds); provisionResponse.setUserKeyPairIDs(userKeyIds);
} }
if (deployerKeyIds != null) { if (deployerKeyIds != null) {
provisionResponse.setDeployerKeyPairIDs(deployerKeyIds); provisionResponse.setDeployerKeyPairIDs(deployerKeyIds);
} }
provisionResponse = save(provisionResponse); provisionResponse = save(provisionResponse);
return provisionResponse; return provisionResponse;
} }
private void parseDeleteResourcesResponse(List<MessageParameter> parameters, ProvisionResponse provisionInfo) { private void parseDeleteResourcesResponse(List<MessageParameter> parameters, ProvisionResponse provisionInfo) {
// for (MessageParameter p : parameters) { // for (MessageParameter p : parameters) {
// System.err.println(p.getName() + " : " + p.getValue()); // System.err.println(p.getName() + " : " + p.getValue());
......
...@@ -79,14 +79,15 @@ public class CloudCredentialsController { ...@@ -79,14 +79,15 @@ public class CloudCredentialsController {
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON) @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON)
@RolesAllowed({UserService.USER, UserService.ADMIN}) @RolesAllowed({UserService.USER, UserService.ADMIN})
@StatusCodes({ @StatusCodes({
@ResponseCode(code = 404, condition = "Access key ID can't be empty"), @ResponseCode(code = 404, condition = "Key can't be empty"),
@ResponseCode(code = 404, condition = "Cloud provider's name can't be empty"),
@ResponseCode(code = 200, condition = "At least one key ID is posted") @ResponseCode(code = 200, condition = "At least one key ID is posted")
}) })
public @ResponseBody public @ResponseBody
String postCredentials(@RequestBody CloudCredentials cloudCredentials) { String postCredentials(@RequestBody CloudCredentials cloudCredentials) {
// if (cloudCredentials.getAccessKeyId() == null || cloudCredentials.getAccessKeyId().length() < 1) { if (cloudCredentials.getSecretKey() == null || cloudCredentials.getSecretKey().length() < 1) {
// throw new NullKeyException(); throw new NullKeyException();
// } }
if (cloudCredentials.getCloudProviderName() == null || cloudCredentials.getCloudProviderName().length() < 1) { if (cloudCredentials.getCloudProviderName() == null || cloudCredentials.getCloudProviderName().length() < 1) {
throw new NullCloudProviderException(); throw new NullCloudProviderException();
} }
......
...@@ -151,6 +151,7 @@ public class Consumer extends DefaultConsumer { ...@@ -151,6 +151,7 @@ public class Consumer extends DefaultConsumer {
} }
private Message startTopology(JSONArray parameters, String tempInputDirPath) throws Exception { private Message startTopology(JSONArray parameters, String tempInputDirPath) throws Exception {
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Starting topology");
TEngine tEngine = new TEngine(); TEngine tEngine = new TEngine();
TopologyAnalysisMain tam = null; TopologyAnalysisMain tam = null;
UserCredential userCredential = new UserCredential(); UserCredential userCredential = new UserCredential();
...@@ -165,7 +166,7 @@ public class Consumer extends DefaultConsumer { ...@@ -165,7 +166,7 @@ public class Consumer extends DefaultConsumer {
// File secondaryTopologyFile = new File(tempInputDirPath + File.separator + lowLevelTopologyFile.getName() + ".yml"); // File secondaryTopologyFile = new File(tempInputDirPath + File.separator + lowLevelTopologyFile.getName() + ".yml");
// FileUtils.moveFile(lowLevelTopologyFile, secondaryTopologyFile); // FileUtils.moveFile(lowLevelTopologyFile, secondaryTopologyFile);
// } // }
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Saved topology file");
Map<String, Object> map = Converter.ymlStream2Map(new FileInputStream(topTopologyLoadingPath)); Map<String, Object> map = Converter.ymlStream2Map(new FileInputStream(topTopologyLoadingPath));
String userPublicKeyName = ((String) map.get("publicKeyPath")); String userPublicKeyName = ((String) map.get("publicKeyPath"));
if (userPublicKeyName != null) { if (userPublicKeyName != null) {
...@@ -176,7 +177,7 @@ public class Consumer extends DefaultConsumer { ...@@ -176,7 +177,7 @@ public class Consumer extends DefaultConsumer {
String cont = Converter.map2YmlString(map); String cont = Converter.map2YmlString(map);
MessageParsing.writeValueToFile(cont, new File(topTopologyLoadingPath)); MessageParsing.writeValueToFile(cont, new File(topTopologyLoadingPath));
} }
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Generated id_rsa.pub");
String userPrivateName = FilenameUtils.removeExtension(userPublicKeyName); String userPrivateName = FilenameUtils.removeExtension(userPublicKeyName);
List<File> sshKeys = MessageParsing.getSSHKeys(parameters, tempInputDirPath, userPublicKeyName, "user_ssh_key"); List<File> sshKeys = MessageParsing.getSSHKeys(parameters, tempInputDirPath, userPublicKeyName, "user_ssh_key");
if (sshKeys == null || sshKeys.isEmpty()) { if (sshKeys == null || sshKeys.isEmpty()) {
...@@ -203,10 +204,11 @@ public class Consumer extends DefaultConsumer { ...@@ -203,10 +204,11 @@ public class Consumer extends DefaultConsumer {
} else if (!userCredential.initial(sshKeyPairs, tam.wholeTopology)) { } else if (!userCredential.initial(sshKeyPairs, tam.wholeTopology)) {
throw new IOException("ssh key pair initilaziation error"); throw new IOException("ssh key pair initilaziation error");
} }
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Generated ssh keys");
userDatabase = getUserDB(); userDatabase = getUserDB();
tEngine.provisionAll(tam.wholeTopology, userCredential, userDatabase); tEngine.provisionAll(tam.wholeTopology, userCredential, userDatabase);
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Provisioned resources");
return buildTopologuResponse(tam, tempInputDirPath, userPublicKeyName, userPrivateName); return buildTopologuResponse(tam, tempInputDirPath, userPublicKeyName, userPrivateName);
} catch (Throwable ex) { } catch (Throwable ex) {
......
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