mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-18 10:53:13 +09:00
Merge branch 'one-3.6' of git.opennebula.org:one into one-3.6
This commit is contained in:
commit
0e91e9e3bf
2 files changed
+15
-2
No files matched your search
@@ -26,6 +26,10 @@ class UserOCCI < User
|
||||
<ID><%= self.id.to_s %></ID>
|
||||
<NAME><%= self.name %></NAME>
|
||||
<GROUP><%= self['GNAME'] %></GROUP>
|
||||
<%= self.element_xml('DATASTORE_QUOTA') %>
|
||||
<%= self.element_xml('NETWORK_QUOTA') %>
|
||||
<%= self.element_xml('VM_QUOTA') %>
|
||||
<%= self.element_xml('IMAGE_QUOTA') %>
|
||||
</USER>
|
||||
}
|
||||
|
||||
|
||||
@@ -261,6 +261,15 @@ module OpenNebula
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the xml of an element
|
||||
def element_xml(xpath)
|
||||
if NOKOGIRI
|
||||
@xml.xpath(xpath).to_s
|
||||
else
|
||||
@xml.elements[xpath].to_s
|
||||
end
|
||||
end
|
||||
|
||||
# Returns elements in text form
|
||||
# root_element:: _String_ base element
|
||||
# indent:: _Boolean_ indents the resulting string, default true
|
||||
@@ -368,14 +377,14 @@ module OpenNebula
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
def attr_to_str(attr)
|
||||
attr.gsub!('"',"\\\"")
|
||||
attr = "\"#{attr}\""
|
||||
|
||||
|
||||
return attr
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user