mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Add verbose option to OCCI resources
(cherry picked from commit 9cd3d3df1b80919f3d1abecaf9c3b1d583ef4688)
This commit is contained in:
parent
7bad159c7d
commit
d922575af7
@ -84,7 +84,7 @@ class ImageOCCI < Image
|
||||
end
|
||||
|
||||
# Creates the OCCI representation of an Image
|
||||
def to_occi(base_url)
|
||||
def to_occi(base_url, verbose=false)
|
||||
begin
|
||||
occi_im = ERB.new(OCCI_IMAGE)
|
||||
occi_im_text = occi_im.result(binding)
|
||||
|
@ -30,7 +30,7 @@ class ImagePoolOCCI < ImagePool
|
||||
}
|
||||
|
||||
# Creates the OCCI representation of a Virtual Machine Pool
|
||||
def to_occi(base_url)
|
||||
def to_occi(base_url, verbose=false)
|
||||
begin
|
||||
occi = ERB.new(OCCI_IMAGE_POOL)
|
||||
occi_text = occi.result(binding)
|
||||
|
@ -51,7 +51,7 @@ class UserOCCI < User
|
||||
end
|
||||
|
||||
# Creates the OCCI representation of a User
|
||||
def to_occi(base_url)
|
||||
def to_occi(base_url, verbose=false)
|
||||
quota = Quota.new
|
||||
user_usage = quota.get_usage(self.id, nil, FORCE_USAGE)
|
||||
user_usage.delete(:uid)
|
||||
|
@ -30,7 +30,7 @@ class UserPoolOCCI < UserPool
|
||||
}
|
||||
|
||||
# Creates the OCCI representation of a User Pool
|
||||
def to_occi(base_url)
|
||||
def to_occi(base_url, verbose=false)
|
||||
begin
|
||||
occi = ERB.new(OCCI_USER_POOL)
|
||||
occi_text = occi.result(binding)
|
||||
|
@ -122,7 +122,7 @@ class VirtualMachineOCCI < VirtualMachine
|
||||
end
|
||||
|
||||
# Creates the VMI representation of a Virtual Machine
|
||||
def to_occi(base_url)
|
||||
def to_occi(base_url, verbose=false)
|
||||
begin
|
||||
occi_vm = ERB.new(OCCI_VM)
|
||||
occi_vm_text = occi_vm.result(binding)
|
||||
|
@ -54,7 +54,7 @@ class VirtualNetworkOCCI < VirtualNetwork
|
||||
end
|
||||
|
||||
# Creates the OCCI representation of a Virtual Network
|
||||
def to_occi(base_url)
|
||||
def to_occi(base_url, verbose=false)
|
||||
network_address = nil
|
||||
network_size = nil
|
||||
|
||||
|
@ -31,7 +31,8 @@ class VirtualNetworkPoolOCCI < VirtualNetworkPool
|
||||
|
||||
|
||||
# Creates the OCCI representation of a Virtual Machine Pool
|
||||
def to_occi(base_url)begin
|
||||
def to_occi(base_url, verbose=false)
|
||||
begin
|
||||
occi = ERB.new(OCCI_NETWORK_POOL)
|
||||
occi_text = occi.result(binding)
|
||||
rescue Exception => e
|
||||
|
Loading…
x
Reference in New Issue
Block a user