Add verbose option to OCCI resources

(cherry picked from commit 9cd3d3df1b)
This commit is contained in:
Daniel Molina authored and Ruben S. Montero committed 2012-02-14 11:50:47 +01:00
1 parent 7bad159c7d
commit d922575af7
7 files changed
+8 -7

No files matched your search

+1 -1
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)
+1 -1
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)
+1 -1
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)
+1 -1
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)
+1 -1
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)
+1 -1
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
+2 -1
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