1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Add verbose option to OCCI resources

This commit is contained in:
Daniel Molina 2012-02-14 11:28:36 +01:00
parent da82e97164
commit 9cd3d3df1b
7 changed files with 8 additions and 7 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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