lib/fog/cloudstack/requests/compute/update_template_permissions.rb in fog-1.23.0 vs lib/fog/cloudstack/requests/compute/update_template_permissions.rb in fog-1.24.0

- old
+ new

@@ -3,15 +3,19 @@ class Cloudstack class Real # Updates a template visibility permissions. A public template is visible to all accounts within the same domain. A private template is visible only to the owner of the template. A priviledged template is a private template with account permissions added. Only accounts specified under the template permissions are visible to them. # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/updateTemplatePermissions.html] - def update_template_permissions(id, options={}) - options.merge!( - 'command' => 'updateTemplatePermissions', - 'id' => id - ) + # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateTemplatePermissions.html] + def update_template_permissions(*args) + options = {} + if args[0].is_a? Hash + options = args[0] + options.merge!('command' => 'updateTemplatePermissions') + else + options.merge!('command' => 'updateTemplatePermissions', + 'id' => args[0]) + end request(options) end end end