Commit adbe068c authored by Spiros Koulouzis's avatar Spiros Koulouzis

Moved log handler to commons

parent 2902febd
......@@ -116,7 +116,7 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-json-client.jar">
<td><span class="downloadfile-name">drip-api-json-client.jar</span></td>
<td><span class="downloadfile-size">18.03K</span></td>
<td><span class="downloadfile-size">18.04K</span></td>
<td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</tr>
<tr class="clickable-row" data-href="drip-api-json-client-json-sources.jar">
......@@ -149,7 +149,7 @@
</tr>
<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-size">23.27K</span></td>
<td><span class="downloadfile-size">23.28K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
......@@ -184,7 +184,7 @@
<tbody data-link="row" class="rowlink">
<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-size">5.91K</span></td>
<td><span class="downloadfile-size">6.02K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......@@ -213,7 +213,7 @@
<tbody data-link="row" class="rowlink">
<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-size">6.67K</span></td>
<td><span class="downloadfile-size">6.74K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......@@ -245,7 +245,7 @@
<tbody data-link="row" class="rowlink">
<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-size">9.61K</span></td>
<td><span class="downloadfile-size">9.62K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
......@@ -93,92 +93,208 @@ module V1
module External
module Ansible
# (no documentation provided)
class DeployParameter
class AnsibleResult
# the IP
attr_accessor :IP
# the user
attr_accessor :user
# the role
attr_accessor :role
# (no documentation provided)
attr_accessor :msg
# (no documentation provided)
attr_accessor :changed
# (no documentation provided)
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
_h = {}
_h['IP'] = IP.to_jaxb_json_hash unless IP.nil?
_h['user'] = user.to_jaxb_json_hash unless user.nil?
_h['role'] = role.to_jaxb_json_hash unless role.nil?
_h['msg'] = msg.to_jaxb_json_hash unless msg.nil?
_h['changed'] = changed.to_jaxb_json_hash unless changed.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
end
# the json (string form) for this DeployParameter
# the json (string form) for this AnsibleResult
def to_json
to_jaxb_json_hash.to_json
end
#initializes this DeployParameter with a json hash
#initializes this AnsibleResult with a json hash
def init_jaxb_json_hash(_o)
if !_o['IP'].nil?
_oa = _o['IP']
if !_o['msg'].nil?
_oa = _o['msg']
if(_oa.is_a? Hash)
@IP = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@IP = String.from_json(_oa) unless _oa['@class']
@msg = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@msg = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@IP = Array.new
@msg = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@IP.push String.from_json(_item)
@msg.push String.from_json(_item)
else
@IP.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@msg.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@IP = _oa
@msg = _oa
end
end
if !_o['user'].nil?
_oa = _o['user']
if !_o['changed'].nil?
_oa = _o['changed']
if(_oa.is_a? Hash)
@user = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@user = String.from_json(_oa) unless _oa['@class']
@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
@user = Array.new
@changed = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@user.push String.from_json(_item)
@changed.push Boolean.from_json(_item)
else
@user.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@changed.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@user = _oa
@changed = _oa
end
end
if !_o['role'].nil?
_oa = _o['role']
if !_o['end'].nil?
_oa = _o['end']
if(_oa.is_a? Hash)
@role = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@role = String.from_json(_oa) unless _oa['@class']
@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
@role = Array.new
@end = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@role.push String.from_json(_item)
@end.push Time.from_json(_item)
else
@role.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
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
# constructs a DeployParameter from a (parsed) JSON hash
# constructs a AnsibleResult from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -208,6 +324,8 @@ end
end
end
module Nl
module Uva
......@@ -359,208 +477,92 @@ module V1
module External
module Ansible
# (no documentation provided)
class AnsibleResult
class DeployParameter
# (no documentation provided)
attr_accessor :msg
# (no documentation provided)
attr_accessor :changed
# (no documentation provided)
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 IP
attr_accessor :IP
# the user
attr_accessor :user
# the role
attr_accessor :role
# the json hash for this AnsibleResult
# the json hash for this DeployParameter
def to_jaxb_json_hash
_h = {}
_h['msg'] = msg.to_jaxb_json_hash unless msg.nil?
_h['changed'] = changed.to_jaxb_json_hash unless changed.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?
_h['IP'] = IP.to_jaxb_json_hash unless IP.nil?
_h['user'] = user.to_jaxb_json_hash unless user.nil?
_h['role'] = role.to_jaxb_json_hash unless role.nil?
return _h
end
# the json (string form) for this AnsibleResult
# the json (string form) for this DeployParameter
def to_json
to_jaxb_json_hash.to_json
end
#initializes this AnsibleResult with a json hash
#initializes this DeployParameter with a json hash
def init_jaxb_json_hash(_o)
if !_o['msg'].nil?
_oa = _o['msg']
if(_oa.is_a? Hash)
@msg = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@msg = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@msg = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@msg.push String.from_json(_item)
else
@msg.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@msg = _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 !_o['IP'].nil?
_oa = _o['IP']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
@IP = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@IP = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
@IP = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
@IP.push String.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@IP.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
@IP = _oa
end
end
if !_o['stderr'].nil?
_oa = _o['stderr']
if !_o['user'].nil?
_oa = _o['user']
if(_oa.is_a? Hash)
@stderr = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stderr = String.from_json(_oa) unless _oa['@class']
@user = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@user = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@stderr = Array.new
@user = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@stderr.push String.from_json(_item)
@user.push String.from_json(_item)
else
@stderr.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@user.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@stderr = _oa
@user = _oa
end
end
if !_o['delta'].nil?
_oa = _o['delta']
if !_o['role'].nil?
_oa = _o['role']
if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class']
@role = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@role = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@delta = Array.new
@role = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item)
@role.push String.from_json(_item)
else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@role.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@delta = _oa
@role = _oa
end
end
end
# constructs a AnsibleResult from a (parsed) JSON hash
# constructs a DeployParameter from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -590,8 +592,6 @@ end
end
end
module Nl
module Uva
......@@ -1211,156 +1211,110 @@ module V1
module External
module Ansible
# (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)
attr_accessor :end
# (no documentation provided)
attr_accessor :cloudDeploymentDomain
# (no documentation provided)
attr_accessor :host
# (no documentation provided)
attr_accessor :vmType
# (no documentation provided)
attr_accessor :delta
# (no documentation provided)
attr_accessor :start
# the secret key
attr_accessor :secretKey
# the cloudProviderName
attr_accessor :cloudProviderName
# the accessKeyId
attr_accessor :accessKeyId
# the attributes
attr_accessor :attributes
# the json hash for this BenchmarkResult
# the json hash for this CloudCredentials
def to_jaxb_json_hash
_h = super
_h['end'] = end.to_jaxb_json_hash unless end.nil?
_h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
_h['host'] = host.to_jaxb_json_hash unless host.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
_h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['secretKey'] = secretKey.to_jaxb_json_hash unless secretKey.nil?
_h['cloudProviderName'] = cloudProviderName.to_jaxb_json_hash unless cloudProviderName.nil?
_h['accessKeyId'] = accessKeyId.to_jaxb_json_hash unless accessKeyId.nil?
_h['attributes'] = attributes.to_jaxb_json_hash unless attributes.nil?
return _h
end
#initializes this BenchmarkResult with a json hash
#initializes this CloudCredentials with a json hash
def init_jaxb_json_hash(_o)
super _o
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['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['host'].nil?
_oa = _o['host']
if !_o['secretKey'].nil?
_oa = _o['secretKey']
if(_oa.is_a? Hash)
@host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@host = String.from_json(_oa) unless _oa['@class']
@secretKey = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@secretKey = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@host = Array.new
@secretKey = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@host.push String.from_json(_item)
@secretKey.push String.from_json(_item)
else
@host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@secretKey.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@host = _oa
@secretKey = _oa
end
end
if !_o['vmType'].nil?
_oa = _o['vmType']
if !_o['cloudProviderName'].nil?
_oa = _o['cloudProviderName']
if(_oa.is_a? Hash)
@vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@vmType = String.from_json(_oa) unless _oa['@class']
@cloudProviderName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProviderName = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@vmType = Array.new
@cloudProviderName = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@vmType.push String.from_json(_item)
@cloudProviderName.push String.from_json(_item)
else
@vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@cloudProviderName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@vmType = _oa
@cloudProviderName = _oa
end
end
if !_o['delta'].nil?
_oa = _o['delta']
if !_o['accessKeyId'].nil?
_oa = _o['accessKeyId']
if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class']
@accessKeyId = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@accessKeyId = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@delta = Array.new
@accessKeyId = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item)
@accessKeyId.push String.from_json(_item)
else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@accessKeyId.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@delta = _oa
@accessKeyId = _oa
end
end
if !_o['start'].nil?
_oa = _o['start']
if !_o['attributes'].nil?
_oa = _o['attributes']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
@attributes = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@attributes = Hash.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
@attributes = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
@attributes.push Hash.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@attributes.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
@attributes = _oa
end
end
end
# constructs a BenchmarkResult from a (parsed) JSON hash
# constructs a CloudCredentials from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -1390,8 +1344,6 @@ end
end
end
module Nl
module Uva
......@@ -2189,110 +2141,156 @@ module V1
module External
module Ansible
# (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
attr_accessor :secretKey
# the cloudProviderName
attr_accessor :cloudProviderName
# the accessKeyId
attr_accessor :accessKeyId
# the attributes
attr_accessor :attributes
# (no documentation provided)
attr_accessor :delta
# (no documentation provided)
attr_accessor :host
# (no documentation provided)
attr_accessor :start
# (no documentation provided)
attr_accessor :end
# (no documentation provided)
attr_accessor :vmType
# (no documentation provided)
attr_accessor :cloudDeploymentDomain
# the json hash for this CloudCredentials
# the json hash for this BenchmarkResult
def to_jaxb_json_hash
_h = super
_h['secretKey'] = secretKey.to_jaxb_json_hash unless secretKey.nil?
_h['cloudProviderName'] = cloudProviderName.to_jaxb_json_hash unless cloudProviderName.nil?
_h['accessKeyId'] = accessKeyId.to_jaxb_json_hash unless accessKeyId.nil?
_h['attributes'] = attributes.to_jaxb_json_hash unless attributes.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
_h['host'] = host.to_jaxb_json_hash unless host.nil?
_h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['end'] = end.to_jaxb_json_hash unless end.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
return _h
end
#initializes this CloudCredentials with a json hash
#initializes this BenchmarkResult with a json hash
def init_jaxb_json_hash(_o)
super _o
if !_o['secretKey'].nil?
_oa = _o['secretKey']
if !_o['delta'].nil?
_oa = _o['delta']
if(_oa.is_a? Hash)
@secretKey = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@secretKey = String.from_json(_oa) unless _oa['@class']
@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
@secretKey = Array.new
@delta = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@secretKey.push String.from_json(_item)
@delta.push Time.from_json(_item)
else
@secretKey.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@secretKey = _oa
@delta = _oa
end
end
if !_o['cloudProviderName'].nil?
_oa = _o['cloudProviderName']
if !_o['host'].nil?
_oa = _o['host']
if(_oa.is_a? Hash)
@cloudProviderName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProviderName = String.from_json(_oa) unless _oa['@class']
@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
@cloudProviderName = Array.new
@host = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudProviderName.push String.from_json(_item)
@host.push String.from_json(_item)
else
@cloudProviderName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cloudProviderName = _oa
@host = _oa
end
end
if !_o['accessKeyId'].nil?
_oa = _o['accessKeyId']
if !_o['start'].nil?
_oa = _o['start']
if(_oa.is_a? Hash)
@accessKeyId = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@accessKeyId = String.from_json(_oa) unless _oa['@class']
@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
@accessKeyId = Array.new
@start = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@accessKeyId.push String.from_json(_item)
@start.push Time.from_json(_item)
else
@accessKeyId.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@accessKeyId = _oa
@start = _oa
end
end
if !_o['attributes'].nil?
_oa = _o['attributes']
if !_o['end'].nil?
_oa = _o['end']
if(_oa.is_a? Hash)
@attributes = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@attributes = Hash.from_json(_oa) unless _oa['@class']
@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
@attributes = Array.new
@end = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@attributes.push Hash.from_json(_item)
@end.push Time.from_json(_item)
else
@attributes.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@attributes = _oa
@end = _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['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
end
# constructs a CloudCredentials from a (parsed) JSON hash
# constructs a BenchmarkResult from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -2322,6 +2320,8 @@ end
end
end
module Nl
module Uva
......
......@@ -81,27 +81,27 @@ class</p>
</thead>
<tbody>
<tr>
<td> <span class="property-name">start</span>
<td> <span class="property-name">vmType</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">end</span>
<td> <span class="property-name">cloudDeploymentDomain</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">cloudDeploymentDomain</span>
<td> <span class="property-name">delta</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
......@@ -117,16 +117,16 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">vmType</span>
<td> <span class="property-name">end</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">delta</span>
<td> <span class="property-name">start</span>
</td>
<td> <span class="datatype-reference">number
</span>
......@@ -167,12 +167,12 @@ No need to set during a POST</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal">
<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_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_DRIPLogRecord.html">DRIPLogRecord</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_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_DRIPLogRecord.html">DRIPLogRecord</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>
<table class="table datatype-properties">
......
......@@ -821,17 +821,17 @@ class]]>
<xs:complexContent>
<xs:extension base="ownedObject">
<xs:sequence>
<xs:element name="start" type="xs:dateTime" minOccurs="0">
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<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="delta" type="xs:dateTime" 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>
<xs:element name="vmType" type="xs:string" minOccurs="0">
<xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
......
......@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
[ {
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -220,12 +220,12 @@ It is created automatically. No need to set during a POST</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;/b-----&gt;
</pre>
......
......@@ -116,7 +116,7 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-json-client.jar">
<td><span class="downloadfile-name">drip-api-json-client.jar</span></td>
<td><span class="downloadfile-size">18.03K</span></td>
<td><span class="downloadfile-size">18.04K</span></td>
<td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</tr>
<tr class="clickable-row" data-href="drip-api-json-client-json-sources.jar">
......@@ -149,7 +149,7 @@
</tr>
<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-size">23.27K</span></td>
<td><span class="downloadfile-size">23.28K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
......@@ -184,7 +184,7 @@
<tbody data-link="row" class="rowlink">
<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-size">5.91K</span></td>
<td><span class="downloadfile-size">6.02K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......@@ -213,7 +213,7 @@
<tbody data-link="row" class="rowlink">
<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-size">6.67K</span></td>
<td><span class="downloadfile-size">6.74K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......@@ -245,7 +245,7 @@
<tbody data-link="row" class="rowlink">
<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-size">9.61K</span></td>
<td><span class="downloadfile-size">9.62K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
......@@ -93,92 +93,208 @@ module V1
module External
module Ansible
# (no documentation provided)
class DeployParameter
class AnsibleResult
# the IP
attr_accessor :IP
# the user
attr_accessor :user
# the role
attr_accessor :role
# (no documentation provided)
attr_accessor :msg
# (no documentation provided)
attr_accessor :changed
# (no documentation provided)
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
_h = {}
_h['IP'] = IP.to_jaxb_json_hash unless IP.nil?
_h['user'] = user.to_jaxb_json_hash unless user.nil?
_h['role'] = role.to_jaxb_json_hash unless role.nil?
_h['msg'] = msg.to_jaxb_json_hash unless msg.nil?
_h['changed'] = changed.to_jaxb_json_hash unless changed.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
end
# the json (string form) for this DeployParameter
# the json (string form) for this AnsibleResult
def to_json
to_jaxb_json_hash.to_json
end
#initializes this DeployParameter with a json hash
#initializes this AnsibleResult with a json hash
def init_jaxb_json_hash(_o)
if !_o['IP'].nil?
_oa = _o['IP']
if !_o['msg'].nil?
_oa = _o['msg']
if(_oa.is_a? Hash)
@IP = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@IP = String.from_json(_oa) unless _oa['@class']
@msg = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@msg = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@IP = Array.new
@msg = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@IP.push String.from_json(_item)
@msg.push String.from_json(_item)
else
@IP.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@msg.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@IP = _oa
@msg = _oa
end
end
if !_o['user'].nil?
_oa = _o['user']
if !_o['changed'].nil?
_oa = _o['changed']
if(_oa.is_a? Hash)
@user = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@user = String.from_json(_oa) unless _oa['@class']
@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
@user = Array.new
@changed = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@user.push String.from_json(_item)
@changed.push Boolean.from_json(_item)
else
@user.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@changed.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@user = _oa
@changed = _oa
end
end
if !_o['role'].nil?
_oa = _o['role']
if !_o['end'].nil?
_oa = _o['end']
if(_oa.is_a? Hash)
@role = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@role = String.from_json(_oa) unless _oa['@class']
@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
@role = Array.new
@end = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@role.push String.from_json(_item)
@end.push Time.from_json(_item)
else
@role.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
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
# constructs a DeployParameter from a (parsed) JSON hash
# constructs a AnsibleResult from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -208,6 +324,8 @@ end
end
end
module Nl
module Uva
......@@ -359,208 +477,92 @@ module V1
module External
module Ansible
# (no documentation provided)
class AnsibleResult
class DeployParameter
# (no documentation provided)
attr_accessor :msg
# (no documentation provided)
attr_accessor :changed
# (no documentation provided)
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 IP
attr_accessor :IP
# the user
attr_accessor :user
# the role
attr_accessor :role
# the json hash for this AnsibleResult
# the json hash for this DeployParameter
def to_jaxb_json_hash
_h = {}
_h['msg'] = msg.to_jaxb_json_hash unless msg.nil?
_h['changed'] = changed.to_jaxb_json_hash unless changed.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?
_h['IP'] = IP.to_jaxb_json_hash unless IP.nil?
_h['user'] = user.to_jaxb_json_hash unless user.nil?
_h['role'] = role.to_jaxb_json_hash unless role.nil?
return _h
end
# the json (string form) for this AnsibleResult
# the json (string form) for this DeployParameter
def to_json
to_jaxb_json_hash.to_json
end
#initializes this AnsibleResult with a json hash
#initializes this DeployParameter with a json hash
def init_jaxb_json_hash(_o)
if !_o['msg'].nil?
_oa = _o['msg']
if(_oa.is_a? Hash)
@msg = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@msg = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@msg = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@msg.push String.from_json(_item)
else
@msg.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@msg = _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 !_o['IP'].nil?
_oa = _o['IP']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
@IP = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@IP = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
@IP = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
@IP.push String.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@IP.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
@IP = _oa
end
end
if !_o['stderr'].nil?
_oa = _o['stderr']
if !_o['user'].nil?
_oa = _o['user']
if(_oa.is_a? Hash)
@stderr = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@stderr = String.from_json(_oa) unless _oa['@class']
@user = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@user = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@stderr = Array.new
@user = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@stderr.push String.from_json(_item)
@user.push String.from_json(_item)
else
@stderr.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@user.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@stderr = _oa
@user = _oa
end
end
if !_o['delta'].nil?
_oa = _o['delta']
if !_o['role'].nil?
_oa = _o['role']
if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class']
@role = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@role = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@delta = Array.new
@role = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item)
@role.push String.from_json(_item)
else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@role.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@delta = _oa
@role = _oa
end
end
end
# constructs a AnsibleResult from a (parsed) JSON hash
# constructs a DeployParameter from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -590,8 +592,6 @@ end
end
end
module Nl
module Uva
......@@ -1211,156 +1211,110 @@ module V1
module External
module Ansible
# (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)
attr_accessor :end
# (no documentation provided)
attr_accessor :cloudDeploymentDomain
# (no documentation provided)
attr_accessor :host
# (no documentation provided)
attr_accessor :vmType
# (no documentation provided)
attr_accessor :delta
# (no documentation provided)
attr_accessor :start
# the secret key
attr_accessor :secretKey
# the cloudProviderName
attr_accessor :cloudProviderName
# the accessKeyId
attr_accessor :accessKeyId
# the attributes
attr_accessor :attributes
# the json hash for this BenchmarkResult
# the json hash for this CloudCredentials
def to_jaxb_json_hash
_h = super
_h['end'] = end.to_jaxb_json_hash unless end.nil?
_h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
_h['host'] = host.to_jaxb_json_hash unless host.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
_h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['secretKey'] = secretKey.to_jaxb_json_hash unless secretKey.nil?
_h['cloudProviderName'] = cloudProviderName.to_jaxb_json_hash unless cloudProviderName.nil?
_h['accessKeyId'] = accessKeyId.to_jaxb_json_hash unless accessKeyId.nil?
_h['attributes'] = attributes.to_jaxb_json_hash unless attributes.nil?
return _h
end
#initializes this BenchmarkResult with a json hash
#initializes this CloudCredentials with a json hash
def init_jaxb_json_hash(_o)
super _o
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['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['host'].nil?
_oa = _o['host']
if !_o['secretKey'].nil?
_oa = _o['secretKey']
if(_oa.is_a? Hash)
@host = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@host = String.from_json(_oa) unless _oa['@class']
@secretKey = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@secretKey = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@host = Array.new
@secretKey = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@host.push String.from_json(_item)
@secretKey.push String.from_json(_item)
else
@host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@secretKey.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@host = _oa
@secretKey = _oa
end
end
if !_o['vmType'].nil?
_oa = _o['vmType']
if !_o['cloudProviderName'].nil?
_oa = _o['cloudProviderName']
if(_oa.is_a? Hash)
@vmType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@vmType = String.from_json(_oa) unless _oa['@class']
@cloudProviderName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProviderName = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@vmType = Array.new
@cloudProviderName = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@vmType.push String.from_json(_item)
@cloudProviderName.push String.from_json(_item)
else
@vmType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@cloudProviderName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@vmType = _oa
@cloudProviderName = _oa
end
end
if !_o['delta'].nil?
_oa = _o['delta']
if !_o['accessKeyId'].nil?
_oa = _o['accessKeyId']
if(_oa.is_a? Hash)
@delta = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@delta = Time.from_json(_oa) unless _oa['@class']
@accessKeyId = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@accessKeyId = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@delta = Array.new
@accessKeyId = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@delta.push Time.from_json(_item)
@accessKeyId.push String.from_json(_item)
else
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@accessKeyId.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@delta = _oa
@accessKeyId = _oa
end
end
if !_o['start'].nil?
_oa = _o['start']
if !_o['attributes'].nil?
_oa = _o['attributes']
if(_oa.is_a? Hash)
@start = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@start = Time.from_json(_oa) unless _oa['@class']
@attributes = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@attributes = Hash.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@start = Array.new
@attributes = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@start.push Time.from_json(_item)
@attributes.push Hash.from_json(_item)
else
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@attributes.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@start = _oa
@attributes = _oa
end
end
end
# constructs a BenchmarkResult from a (parsed) JSON hash
# constructs a CloudCredentials from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -1390,8 +1344,6 @@ end
end
end
module Nl
module Uva
......@@ -2189,110 +2141,156 @@ module V1
module External
module Ansible
# (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
attr_accessor :secretKey
# the cloudProviderName
attr_accessor :cloudProviderName
# the accessKeyId
attr_accessor :accessKeyId
# the attributes
attr_accessor :attributes
# (no documentation provided)
attr_accessor :delta
# (no documentation provided)
attr_accessor :host
# (no documentation provided)
attr_accessor :start
# (no documentation provided)
attr_accessor :end
# (no documentation provided)
attr_accessor :vmType
# (no documentation provided)
attr_accessor :cloudDeploymentDomain
# the json hash for this CloudCredentials
# the json hash for this BenchmarkResult
def to_jaxb_json_hash
_h = super
_h['secretKey'] = secretKey.to_jaxb_json_hash unless secretKey.nil?
_h['cloudProviderName'] = cloudProviderName.to_jaxb_json_hash unless cloudProviderName.nil?
_h['accessKeyId'] = accessKeyId.to_jaxb_json_hash unless accessKeyId.nil?
_h['attributes'] = attributes.to_jaxb_json_hash unless attributes.nil?
_h['delta'] = delta.to_jaxb_json_hash unless delta.nil?
_h['host'] = host.to_jaxb_json_hash unless host.nil?
_h['start'] = start.to_jaxb_json_hash unless start.nil?
_h['end'] = end.to_jaxb_json_hash unless end.nil?
_h['vmType'] = vmType.to_jaxb_json_hash unless vmType.nil?
_h['cloudDeploymentDomain'] = cloudDeploymentDomain.to_jaxb_json_hash unless cloudDeploymentDomain.nil?
return _h
end
#initializes this CloudCredentials with a json hash
#initializes this BenchmarkResult with a json hash
def init_jaxb_json_hash(_o)
super _o
if !_o['secretKey'].nil?
_oa = _o['secretKey']
if !_o['delta'].nil?
_oa = _o['delta']
if(_oa.is_a? Hash)
@secretKey = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@secretKey = String.from_json(_oa) unless _oa['@class']
@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
@secretKey = Array.new
@delta = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@secretKey.push String.from_json(_item)
@delta.push Time.from_json(_item)
else
@secretKey.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@delta.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@secretKey = _oa
@delta = _oa
end
end
if !_o['cloudProviderName'].nil?
_oa = _o['cloudProviderName']
if !_o['host'].nil?
_oa = _o['host']
if(_oa.is_a? Hash)
@cloudProviderName = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@cloudProviderName = String.from_json(_oa) unless _oa['@class']
@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
@cloudProviderName = Array.new
@host = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@cloudProviderName.push String.from_json(_item)
@host.push String.from_json(_item)
else
@cloudProviderName.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@host.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@cloudProviderName = _oa
@host = _oa
end
end
if !_o['accessKeyId'].nil?
_oa = _o['accessKeyId']
if !_o['start'].nil?
_oa = _o['start']
if(_oa.is_a? Hash)
@accessKeyId = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@accessKeyId = String.from_json(_oa) unless _oa['@class']
@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
@accessKeyId = Array.new
@start = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@accessKeyId.push String.from_json(_item)
@start.push Time.from_json(_item)
else
@accessKeyId.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@start.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@accessKeyId = _oa
@start = _oa
end
end
if !_o['attributes'].nil?
_oa = _o['attributes']
if !_o['end'].nil?
_oa = _o['end']
if(_oa.is_a? Hash)
@attributes = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@attributes = Hash.from_json(_oa) unless _oa['@class']
@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
@attributes = Array.new
@end = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@attributes.push Hash.from_json(_item)
@end.push Time.from_json(_item)
else
@attributes.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@end.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@attributes = _oa
@end = _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['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
end
# constructs a CloudCredentials from a (parsed) JSON hash
# constructs a BenchmarkResult from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -2322,6 +2320,8 @@ end
end
end
module Nl
module Uva
......
......@@ -81,7 +81,7 @@ class</p>
</thead>
<tbody>
<tr>
<td> <span class="property-name">start</span>
<td> <span class="property-name">delta</span>
</td>
<td> <span class="datatype-reference">number
</span>
......@@ -90,27 +90,27 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">delta</span>
<td> <span class="property-name">host</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">cloudDeploymentDomain</span>
<td> <span class="property-name">start</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">host</span>
<td> <span class="property-name">end</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
......@@ -126,9 +126,9 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">end</span>
<td> <span class="property-name">cloudDeploymentDomain</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
......@@ -167,12 +167,12 @@ No need to set during a POST</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal">
<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_DRIPLogRecord.html">DRIPLogRecord</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_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_DRIPLogRecord.html">DRIPLogRecord</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>
<table class="table datatype-properties">
......
......@@ -821,18 +821,18 @@ class]]>
<xs:complexContent>
<xs:extension base="ownedObject">
<xs:sequence>
<xs:element name="host" type="xs:string" minOccurs="0">
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
......
......@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
[ {
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -220,12 +220,12 @@ It is created automatically. No need to set during a POST</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;/b-----&gt;
</pre>
......
......@@ -127,7 +127,7 @@ public class DeployService {
User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
String owner = user.getUsername();
ownedObject.setOwner(owner);
return deployDao.save(ownedObject);
}
......@@ -139,7 +139,8 @@ public class DeployService {
deployInfo.getConfigurationID(),
null,
null);
;
deployerInvokationMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
// Message response = MessageGenerator.generateArtificialMessage(System.getProperty("user.home")
// + File.separator + "workspace" + File.separator + "DRIP"
// + File.separator + "docs" + File.separator + "json_samples"
......@@ -169,6 +170,7 @@ public class DeployService {
null,
null);
Map<String, Object> info;
deployerInvokationMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
try (DRIPCaller deployer = new DeployerCaller(messageBrokerHost);) {
Message response = (deployer.call(deployerInvokationMessage));
List<MessageParameter> params = response.getParameters();
......@@ -322,7 +324,7 @@ public class DeployService {
}
Message message = buildDeployerMessage(deployment.getProvisionID(), "scale", confID, scaleReq.getScaleTargetName(), scaleReq.getNumOfInstances());
message.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
try (DRIPCaller deployer = new DeployerCaller(messageBrokerHost);) {
Message response = (deployer.call(message));
List<MessageParameter> params = response.getParameters();
......@@ -603,7 +605,7 @@ public class DeployService {
String jsonResp = param.getValue().replaceAll("^\"|\"$", "");
System.err.println(jsonResp);
Map<String, Object> kv = Converter.jsonString2Map(jsonResp);
info.putAll(kv);
}
return info;
......
......@@ -15,6 +15,7 @@
*/
package nl.uva.sne.drip.api.service;
import nl.uva.sne.drip.commons.utils.DRIPLogHandler;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
......@@ -30,6 +31,7 @@ import java.util.logging.Logger;
import nl.uva.sne.drip.api.dao.PlanDao;
import nl.uva.sne.drip.api.exception.BadRequestException;
import nl.uva.sne.drip.api.exception.NotFoundException;
import nl.uva.sne.drip.api.rpc.DRIPCaller;
import nl.uva.sne.drip.api.rpc.PlannerCaller;
import nl.uva.sne.drip.drip.commons.data.internal.Message;
import nl.uva.sne.drip.drip.commons.data.internal.MessageParameter;
......@@ -77,9 +79,10 @@ public class PlannerService {
}
public PlanResponse getPlan(String toscaId) throws JSONException, UnsupportedEncodingException, IOException, TimeoutException, InterruptedException {
try (PlannerCaller planner = new PlannerCaller(messageBrokerHost)) {
try (DRIPCaller planner = new PlannerCaller(messageBrokerHost)) {
Message plannerInvokationMessage = buildPlannerMessage(toscaId);
logger.log(Level.INFO, "Calling planner");
plannerInvokationMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
Message plannerReturnedMessage = (planner.call(plannerInvokationMessage));
logger.log(Level.INFO, "Got response from planner");
ObjectMapper mapper = new ObjectMapper();
......
......@@ -441,7 +441,7 @@ public class ProvisionService {
private ProvisionResponse callProvisioner0(ProvisionRequest provisionRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception {
try (DRIPCaller provisioner = new ProvisionerCaller0(messageBrokerHost);) {
Message provisionerInvokationMessage = buildProvisioner0Message(provisionRequest);
provisionerInvokationMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
Message response = (provisioner.call(provisionerInvokationMessage));
return parseCreateResourcesResponse(response.getParameters(), provisionRequest, null, true, true);
......@@ -453,6 +453,7 @@ public class ProvisionService {
private ProvisionResponse callProvisioner1(ProvisionRequest provisionRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception {
try (DRIPCaller provisioner = new ProvisionerCaller1(messageBrokerHost);) {
Message provisionerInvokationMessage = buildProvisioner1Message(provisionRequest);
provisionerInvokationMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
Message response = (provisioner.call(provisionerInvokationMessage));
return parseCreateResourcesResponse(response.getParameters(), provisionRequest, null, true, true);
}
......@@ -462,6 +463,7 @@ public class ProvisionService {
public void deleteProvisionedResources(ProvisionResponse provisionInfo) throws IOException, TimeoutException, InterruptedException, JSONException {
try (DRIPCaller provisioner = new ProvisionerCaller1(messageBrokerHost);) {
Message deleteInvokationMessage = buildTopoplogyModificationMessage(provisionInfo, "kill_topology", null);
deleteInvokationMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
Message response = (provisioner.call(deleteInvokationMessage));
parseDeleteResourcesResponse(response.getParameters(), provisionInfo);
}
......@@ -511,6 +513,7 @@ public class ProvisionService {
extra.put("domain", domain);
Message scaleMessage = buildTopoplogyModificationMessage(provisionInfo, "scale_topology_down", extra);
scaleMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
Message response = provisioner.call(scaleMessage);
parseCreateResourcesResponse(response.getParameters(), null, provisionInfo, false, false);
}
......@@ -523,6 +526,7 @@ public class ProvisionService {
extra.put("domain", domain);
Message scaleMessage = buildTopoplogyModificationMessage(provisionInfo, "scale_topology_up", extra);
scaleMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
Message response = provisioner.call(scaleMessage);
parseCreateResourcesResponse(response.getParameters(), null, provisionInfo, false, false);
}
......
......@@ -166,6 +166,7 @@ public class ToscaService {
String dockerCompose;
try (DRIPCaller transformer = new TransformerCaller(messageBrokerHost);) {
Message transformerInvokationMessage = buildDockerComposeMessage(toscaRep);
transformerInvokationMessage.setOwner(((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername());
Message response = (transformer.call(transformerInvokationMessage));
dockerCompose = response.getParameters().get(0).getValue();
}
......
......@@ -86,7 +86,14 @@
<artifactId>enunciate-core-annotations</artifactId>
<version>2.9.1</version>
<type>jar</type>
</dependency>
</dependency>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>4.0.2</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
......
......@@ -13,33 +13,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nl.uva.sne.drip.api.service;
package nl.uva.sne.drip.commons.utils;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.BuiltinExchangeType;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.MessageProperties;
import java.io.IOException;
import java.util.concurrent.TimeoutException;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import java.util.logging.StreamHandler;
import nl.uva.sne.drip.api.dao.CloudCredentialsDao;
import nl.uva.sne.drip.commons.utils.DRIPLogRecordFactory;
import nl.uva.sne.drip.drip.commons.data.v1.external.DRIPLogRecord;
import nl.uva.sne.drip.drip.commons.data.v1.external.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
/**
*
......
......@@ -31,7 +31,9 @@ import java.util.List;
*
* @author S. Koulouzis.
*/
public class Message implements Serializable {
public class Message implements Serializable {
private String owner;
private Long creationDate;
......@@ -53,4 +55,18 @@ import java.util.List;
this.creationDate = creationDate;
}
/**
* @return the owner
*/
public String getOwner() {
return owner;
}
/**
* @param owner the owner to set
*/
public void setOwner(String owner) {
this.owner = owner;
}
}
import logging
class DRIPLogHandler(logging.StreamHandler):
def emit(self, record):
try:
msg = self.format(record)
stream = self.stream
same_line = hasattr(record, 'same_line')
if self.on_same_line and not same_line:
stream.write(self.terminator)
stream.write(msg)
if same_line:
stream.write('... ')
self.on_same_line = True
else:
stream.write(self.terminator)
self.on_same_line = False
self.flush()
except (KeyboardInterrupt, SystemExit):
raise
except:
self.handleError(record)
\ No newline at end of file
......@@ -2,16 +2,16 @@
# To change this template file, choose Tools | Templates
# and open the template in the editor.
import json
import logging
import os
import os.path
from os.path import expanduser
import pika
from planner.dum_planner import *
import sys
import tempfile
import time
import json
from planner.dum_planner import *
from os.path import expanduser
import logging
logger = logging.getLogger(__name__)
if not getattr(logger, 'handler_set', None):
......@@ -57,8 +57,9 @@ def on_request(ch, method, props, body):
def handle_delivery(message):
parsed_json_message = json.loads(message)
params = parsed_json_message["parameters"]
owner = parsed_json_message['owner']
param = params[0]
value = json.loads( param['value'])
value = json.loads(param['value'])
tosca_file_name = param["name"]
current_milli_time = lambda: int(round(time.time() * 1000))
......@@ -94,7 +95,7 @@ if __name__ == "__main__":
# home = expanduser("~")
# planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/BEIA_cardif2.yml")
# print planner.plan()
logger.info("Input args: "+sys.argv[0]+' '+sys.argv[1]+' '+sys.argv[2])
logger.info("Input args: " + sys.argv[0] + ' ' + sys.argv[1] + ' ' + sys.argv[2])
channel = init_chanel(sys.argv)
global queue_name
queue_name = sys.argv[2]
......
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