class Fog::Cosmic::Compute::Real
Public Class Methods
# File lib/fog/cosmic/compute.rb, line 411 def initialize(options={}) @cosmic_api_key = options[:cosmic_api_key] @cosmic_secret_access_key = options[:cosmic_secret_access_key] @cosmic_session_id = options[:cosmic_session_id] @cosmic_session_key = options[:cosmic_session_key] @cosmic_project_id = options[:cosmic_project_id] @host = options[:cosmic_host] @path = options[:cosmic_path] || '/client/api' @port = options[:cosmic_port] || 443 @scheme = options[:cosmic_scheme] || 'https' @connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", options[:cosmic_persistent], {:ssl_verify_peer => false}) end
Public Instance Methods
Activates a project
# File lib/fog/cosmic/requests/compute/activate_project.rb, line 9 def activate_project(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'activateProject') else options.merge!('command' => 'activateProject', 'id' => args[0]) end request(options) end
Adds acoount to a project
# File lib/fog/cosmic/requests/compute/add_account_to_project.rb, line 9 def add_account_to_project(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addAccountToProject') else options.merge!('command' => 'addAccountToProject', 'projectid' => args[0]) end request(options) end
Adds a new cluster
# File lib/fog/cosmic/requests/compute/add_cluster.rb, line 9 def add_cluster(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addCluster') else options.merge!('command' => 'addCluster', 'clustertype' => args[0], 'hypervisor' => args[1], 'clustername' => args[2], 'podid' => args[3], 'zoneid' => args[4]) end request(options) end
Add a new guest OS type
# File lib/fog/cosmic/requests/compute/add_guest_os.rb, line 9 def add_guest_os(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addGuestOs') else options.merge!('command' => 'addGuestOs', 'osdisplayname' => args[0], 'oscategoryid' => args[1]) end request(options) end
Adds a guest OS name to hypervisor OS name mapping
# File lib/fog/cosmic/requests/compute/add_guest_os_mapping.rb, line 9 def add_guest_os_mapping(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addGuestOsMapping') else options.merge!('command' => 'addGuestOsMapping', 'hypervisor' => args[0], 'osnameforhypervisor' => args[1], 'hypervisorversion' => args[2]) end request(options) end
Adds a new host.
# File lib/fog/cosmic/requests/compute/add_host.rb, line 9 def add_host(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addHost') else options.merge!('command' => 'addHost', 'url' => args[0], 'zoneid' => args[1], 'username' => args[2], 'password' => args[3], 'hypervisor' => args[4], 'podid' => args[5]) end request(options) end
Adds backup image store.
# File lib/fog/cosmic/requests/compute/add_image_store.rb, line 9 def add_image_store(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addImageStore') else options.merge!('command' => 'addImageStore', 'provider' => args[0]) end request(options) end
Assigns secondary IP to NIC
# File lib/fog/cosmic/requests/compute/add_ip_to_nic.rb, line 9 def add_ip_to_nic(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addIpToNic') else options.merge!('command' => 'addIpToNic', 'nicid' => args[0]) end request(options) end
Add a new Ldap Configuration
# File lib/fog/cosmic/requests/compute/add_ldap_configuration.rb, line 9 def add_ldap_configuration(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addLdapConfiguration') else options.merge!('command' => 'addLdapConfiguration', 'port' => args[0], 'hostname' => args[1]) end request(options) end
Adds a network device of one of the following types: ExternalDhcp, ExternalFirewall, ExternalLoadBalancer, PxeServer
# File lib/fog/cosmic/requests/compute/add_network_device.rb, line 9 def add_network_device(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addNetworkDevice') else options.merge!('command' => 'addNetworkDevice') end request(options) end
Adds a network serviceProvider to a physical network
# File lib/fog/cosmic/requests/compute/add_network_service_provider.rb, line 9 def add_network_service_provider(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addNetworkServiceProvider') else options.merge!('command' => 'addNetworkServiceProvider', 'name' => args[0], 'physicalnetworkid' => args[1]) end request(options) end
Adds VM to specified network by creating a NIC
# File lib/fog/cosmic/requests/compute/add_nic_to_virtual_machine.rb, line 9 def add_nic_to_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addNicToVirtualMachine') else options.merge!('command' => 'addNicToVirtualMachine', 'virtualmachineid' => args[0], 'networkid' => args[1]) end request(options) end
Adds a Nicira NVP device
# File lib/fog/cosmic/requests/compute/add_nicira_nvp_device.rb, line 9 def add_nicira_nvp_device(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addNiciraNvpDevice') else options.merge!('command' => 'addNiciraNvpDevice', 'physicalnetworkid' => args[0], 'transportzoneuuid' => args[1], 'username' => args[2], 'password' => args[3], 'hostname' => args[4]) end request(options) end
Adds a Region
# File lib/fog/cosmic/requests/compute/add_region.rb, line 9 def add_region(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addRegion') else options.merge!('command' => 'addRegion', 'id' => args[0], 'name' => args[1], 'endpoint' => args[2]) end request(options) end
Adds detail for the Resource.
# File lib/fog/cosmic/requests/compute/add_resource_detail.rb, line 9 def add_resource_detail(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addResourceDetail') else options.merge!('command' => 'addResourceDetail', 'resourcetype' => args[0], 'details' => args[1], 'resourceid' => args[2]) end request(options) end
Adds secondary storage.
# File lib/fog/cosmic/requests/compute/add_secondary_storage.rb, line 9 def add_secondary_storage(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addSecondaryStorage') else options.merge!('command' => 'addSecondaryStorage', 'url' => args[0]) end request(options) end
Adds traffic type to a physical network
# File lib/fog/cosmic/requests/compute/add_traffic_type.rb, line 9 def add_traffic_type(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addTrafficType') else options.merge!('command' => 'addTrafficType', 'traffictype' => args[0], 'physicalnetworkid' => args[1]) end request(options) end
Adds vpn users
# File lib/fog/cosmic/requests/compute/add_vpn_user.rb, line 9 def add_vpn_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'addVpnUser') else options.merge!('command' => 'addVpnUser', 'password' => args[0], 'username' => args[1]) end request(options) end
Archive one or more alerts.
# File lib/fog/cosmic/requests/compute/archive_alerts.rb, line 9 def archive_alerts(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'archiveAlerts') else options.merge!('command' => 'archiveAlerts') end request(options) end
Archive one or more events.
# File lib/fog/cosmic/requests/compute/archive_events.rb, line 9 def archive_events(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'archiveEvents') else options.merge!('command' => 'archiveEvents') end request(options) end
Assigns a certificate to a Load Balancer Rule
# File lib/fog/cosmic/requests/compute/assign_cert_to_load_balancer.rb, line 9 def assign_cert_to_load_balancer(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'assignCertToLoadBalancer') else options.merge!('command' => 'assignCertToLoadBalancer', 'lbruleid' => args[0], 'certid' => args[1]) end request(options) end
Assigns virtual machine or a list of virtual machines to a load balancer rule.
# File lib/fog/cosmic/requests/compute/assign_to_load_balancer_rule.rb, line 9 def assign_to_load_balancer_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'assignToLoadBalancerRule') else options.merge!('command' => 'assignToLoadBalancerRule', 'id' => args[0]) end request(options) end
Change ownership of a VM from one account to another. A root administrator can reassign a VM from any account to any other account in any domain. A domain administrator can reassign a VM to any account in the same domain.
# File lib/fog/cosmic/requests/compute/assign_virtual_machine.rb, line 9 def assign_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'assignVirtualMachine') else options.merge!('command' => 'assignVirtualMachine', 'account' => args[0], 'virtualmachineid' => args[1], 'domainid' => args[2]) end request(options) end
Acquires and associates a public IP to an account.
# File lib/fog/cosmic/requests/compute/associate_ip_address.rb, line 9 def associate_ip_address(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'associateIpAddress') else options.merge!('command' => 'associateIpAddress') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Attaches an ISO to a virtual machine.
# File lib/fog/cosmic/requests/compute/attach_iso.rb, line 9 def attach_iso(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'attachIso') else options.merge!('command' => 'attachIso', 'virtualmachineid' => args[0], 'id' => args[1]) end request(options) end
Attaches a disk volume to a virtual machine.
# File lib/fog/cosmic/requests/compute/attach_volume.rb, line 9 def attach_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'attachVolume') else options.merge!('command' => 'attachVolume', 'virtualmachineid' => args[0], 'id' => args[1]) end request(options) end
Cancels host maintenance.
# File lib/fog/cosmic/requests/compute/cancel_host_maintenance.rb, line 9 def cancel_host_maintenance(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'cancelHostMaintenance') else options.merge!('command' => 'cancelHostMaintenance', 'id' => args[0]) end request(options) end
Cancels maintenance for primary storage
# File lib/fog/cosmic/requests/compute/cancel_storage_maintenance.rb, line 9 def cancel_storage_maintenance(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'cancelStorageMaintenance') else options.merge!('command' => 'cancelStorageMaintenance', 'id' => args[0]) end request(options) end
Upgrades domain router to a new service offering
# File lib/fog/cosmic/requests/compute/change_service_for_router.rb, line 9 def change_service_for_router(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'changeServiceForRouter') else options.merge!('command' => 'changeServiceForRouter', 'serviceofferingid' => args[0], 'id' => args[1]) end request(options) end
Changes the service offering for a system vm (console proxy or secondary storage). The system vm must be in a “Stopped” state for this command to take effect.
# File lib/fog/cosmic/requests/compute/change_service_for_system_vm.rb, line 9 def change_service_for_system_vm(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'changeServiceForSystemVm') else options.merge!('command' => 'changeServiceForSystemVm', 'id' => args[0], 'serviceofferingid' => args[1]) end request(options) end
Changes the service offering for a virtual machine. The virtual machine must be in a “Stopped” state for this command to take effect.
# File lib/fog/cosmic/requests/compute/change_service_for_virtual_machine.rb, line 9 def change_service_for_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'changeServiceForVirtualMachine') else options.merge!('command' => 'changeServiceForVirtualMachine', 'serviceofferingid' => args[0], 'id' => args[1]) end request(options) end
Cleanups VM reservations in the database.
# File lib/fog/cosmic/requests/compute/clean_vmreservations.rb, line 9 def clean_vmreservations(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'cleanVMReservations') else options.merge!('command' => 'cleanVMReservations') end request(options) end
Configures a virtual router element.
# File lib/fog/cosmic/requests/compute/configure_virtual_router_element.rb, line 9 def configure_virtual_router_element(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'configureVirtualRouterElement') else options.merge!('command' => 'configureVirtualRouterElement', 'id' => args[0], 'enabled' => args[1]) end request(options) end
Copies an iso from one zone to another.
# File lib/fog/cosmic/requests/compute/copy_iso.rb, line 9 def copy_iso(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'copyIso') else options.merge!('command' => 'copyIso', 'destzoneid' => args[0], 'id' => args[1]) end request(options) end
Copies a template from one zone to another.
# File lib/fog/cosmic/requests/compute/copy_template.rb, line 9 def copy_template(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'copyTemplate') else options.merge!('command' => 'copyTemplate', 'id' => args[0], 'destzoneid' => args[1]) end request(options) end
Creates an account
# File lib/fog/cosmic/requests/compute/create_account.rb, line 9 def create_account(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createAccount') else options.merge!('command' => 'createAccount', 'accounttype' => args[0], 'lastname' => args[1], 'email' => args[2], 'firstname' => args[3], 'username' => args[4], 'password' => args[5]) end request(options) end
Creates an affinity/anti-affinity group
# File lib/fog/cosmic/requests/compute/create_affinity_group.rb, line 9 def create_affinity_group(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createAffinityGroup') else options.merge!('command' => 'createAffinityGroup', 'type' => args[0], 'name' => args[1]) end request(options) end
Creates a disk offering.
# File lib/fog/cosmic/requests/compute/create_disk_offering.rb, line 9 def create_disk_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createDiskOffering') else options.merge!('command' => 'createDiskOffering', 'displaytext' => args[0], 'name' => args[1]) end request(options) end
Creates a domain
# File lib/fog/cosmic/requests/compute/create_domain.rb, line 9 def create_domain(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createDomain') else options.merge!('command' => 'createDomain', 'name' => args[0]) end request(options) end
Creates a egress firewall rule for a given network
# File lib/fog/cosmic/requests/compute/create_egress_firewall_rule.rb, line 9 def create_egress_firewall_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createEgressFirewallRule') else options.merge!('command' => 'createEgressFirewallRule', 'networkid' => args[0], 'protocol' => args[1]) end request(options) end
Creates a firewall rule for a given ip address
# File lib/fog/cosmic/requests/compute/create_firewall_rule.rb, line 9 def create_firewall_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createFirewallRule') else options.merge!('command' => 'createFirewallRule', 'ipaddressid' => args[0], 'protocol' => args[1]) end request(options) end
Creates a vm group
# File lib/fog/cosmic/requests/compute/create_instance_group.rb, line 9 def create_instance_group(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createInstanceGroup') else options.merge!('command' => 'createInstanceGroup', 'name' => args[0]) end request(options) end
Creates an ip forwarding rule
# File lib/fog/cosmic/requests/compute/create_ip_forwarding_rule.rb, line 9 def create_ip_forwarding_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createIpForwardingRule') else options.merge!('command' => 'createIpForwardingRule', 'ipaddressid' => args[0], 'protocol' => args[1], 'startport' => args[2]) end request(options) end
Creates a Load Balancer healthcheck policy
# File lib/fog/cosmic/requests/compute/create_lb_health_check_policy.rb, line 9 def create_lb_health_check_policy(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createLBHealthCheckPolicy') else options.merge!('command' => 'createLBHealthCheckPolicy', 'lbruleid' => args[0]) end request(options) end
Creates a Load Balancer stickiness policy
# File lib/fog/cosmic/requests/compute/create_lb_stickiness_policy.rb, line 9 def create_lb_stickiness_policy(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createLBStickinessPolicy') else options.merge!('command' => 'createLBStickinessPolicy', 'methodname' => args[0], 'name' => args[1], 'lbruleid' => args[2]) end request(options) end
Creates a load balancer rule
# File lib/fog/cosmic/requests/compute/create_load_balancer_rule.rb, line 9 def create_load_balancer_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createLoadBalancerRule') else options.merge!('command' => 'createLoadBalancerRule', 'name' => args[0], 'privateport' => args[1], 'algorithm' => args[2], 'publicport' => args[3]) end request(options) end
Creates a network
# File lib/fog/cosmic/requests/compute/create_network.rb, line 9 def create_network(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createNetwork') else options.merge!('command' => 'createNetwork', 'displaytext' => args[0], 'zoneid' => args[1], 'name' => args[2], 'networkofferingid' => args[3]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Creates a ACL rule in the given network (the network has to belong to VPC)
# File lib/fog/cosmic/requests/compute/create_network_acl.rb, line 9 def create_network_acl(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createNetworkACL') else options.merge!('command' => 'createNetworkACL', 'protocol' => args[0]) end request(options) end
Creates a Network
ACL for the given VPC
# File lib/fog/cosmic/requests/compute/create_network_acl_list.rb, line 9 def create_network_acl_list(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createNetworkACLList') else options.merge!('command' => 'createNetworkACLList', 'name' => args[0], 'vpcid' => args[1]) end request(options) end
Creates a network offering.
# File lib/fog/cosmic/requests/compute/create_network_offering.rb, line 9 def create_network_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createNetworkOffering') else options.merge!('command' => 'createNetworkOffering', 'traffictype' => args[0], 'guestiptype' => args[1], 'name' => args[2], 'supportedservices' => args[3], 'displaytext' => args[4]) end request(options) end
Creates a physical network
# File lib/fog/cosmic/requests/compute/create_physical_network.rb, line 9 def create_physical_network(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createPhysicalNetwork') else options.merge!('command' => 'createPhysicalNetwork', 'name' => args[0], 'zoneid' => args[1]) end request(options) end
Creates a new Pod.
# File lib/fog/cosmic/requests/compute/create_pod.rb, line 9 def create_pod(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createPod') else options.merge!('command' => 'createPod', 'netmask' => args[0], 'zoneid' => args[1], 'name' => args[2], 'gateway' => args[3], 'startip' => args[4]) end request(options) end
Creates a port forwarding rule
# File lib/fog/cosmic/requests/compute/create_port_forwarding_rule.rb, line 9 def create_port_forwarding_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createPortForwardingRule') else options.merge!('command' => 'createPortForwardingRule', 'virtualmachineid' => args[0], 'protocol' => args[1], 'privateport' => args[2], 'ipaddressid' => args[3], 'publicport' => args[4]) end request(options) end
Creates a private gateway
# File lib/fog/cosmic/requests/compute/create_private_gateway.rb, line 9 def create_private_gateway(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createPrivateGateway') else options.merge!('command' => 'createPrivateGateway', 'ipaddress' => args[0], 'vlan' => args[1], 'netmask' => args[2], 'vpcid' => args[3], 'gateway' => args[4]) end request(options) end
Creates a project
# File lib/fog/cosmic/requests/compute/create_project.rb, line 9 def create_project(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createProject') else options.merge!('command' => 'createProject', 'displaytext' => args[0], 'name' => args[1]) end request(options) end
Creates a l2tp/ipsec remote access vpn
# File lib/fog/cosmic/requests/compute/create_remote_access_vpn.rb, line 9 def create_remote_access_vpn(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createRemoteAccessVpn') else options.merge!('command' => 'createRemoteAccessVpn', 'publicipid' => args[0]) end request(options) end
create secondary staging store.
# File lib/fog/cosmic/requests/compute/create_secondary_staging_store.rb, line 9 def create_secondary_staging_store(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createSecondaryStagingStore') else options.merge!('command' => 'createSecondaryStagingStore', 'url' => args[0]) end request(options) end
Creates a service offering.
# File lib/fog/cosmic/requests/compute/create_service_offering.rb, line 9 def create_service_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createServiceOffering') else options.merge!('command' => 'createServiceOffering', 'name' => args[0], 'displaytext' => args[1]) end request(options) end
Creates an instant snapshot of a volume.
# File lib/fog/cosmic/requests/compute/create_snapshot.rb, line 9 def create_snapshot(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createSnapshot') else options.merge!('command' => 'createSnapshot', 'volumeid' => args[0]) end request(options) end
Create a new keypair and returns the private key
# File lib/fog/cosmic/requests/compute/create_ssh_key_pair.rb, line 9 def create_ssh_key_pair(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createSSHKeyPair') else options.merge!('command' => 'createSSHKeyPair', 'name' => args[0]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Creates a static route
# File lib/fog/cosmic/requests/compute/create_static_route.rb, line 9 def create_static_route(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createStaticRoute') else options.merge!('command' => 'createStaticRoute', 'gatewayid' => args[0], 'cidr' => args[1]) end request(options) end
Creates a Storage network IP range.
# File lib/fog/cosmic/requests/compute/create_storage_network_ip_range.rb, line 9 def create_storage_network_ip_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createStorageNetworkIpRange') else options.merge!('command' => 'createStorageNetworkIpRange', 'podid' => args[0], 'netmask' => args[1], 'gateway' => args[2], 'startip' => args[3]) end request(options) end
Creates a storage pool.
# File lib/fog/cosmic/requests/compute/create_storage_pool.rb, line 9 def create_storage_pool(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createStoragePool') else options.merge!('command' => 'createStoragePool', 'url' => args[0], 'name' => args[1], 'zoneid' => args[2]) end request(options) end
Creates a template of a virtual machine. The virtual machine must be in a STOPPED state. A template created from this command is automatically designated as a private template visible to the account that created it.
# File lib/fog/cosmic/requests/compute/create_template.rb, line 9 def create_template(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createTemplate') else options.merge!('command' => 'createTemplate', 'ostypeid' => args[0], 'name' => args[1], 'displaytext' => args[2]) end request(options) end
Creates a user for an account that already exists
# File lib/fog/cosmic/requests/compute/create_user.rb, line 9 def create_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createUser') else options.merge!('command' => 'createUser', 'email' => args[0], 'username' => args[1], 'lastname' => args[2], 'password' => args[3], 'firstname' => args[4], 'account' => args[5]) end request(options) end
Create a virtual router element.
# File lib/fog/cosmic/requests/compute/create_virtual_router_element.rb, line 9 def create_virtual_router_element(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVirtualRouterElement') else options.merge!('command' => 'createVirtualRouterElement', 'nspid' => args[0]) end request(options) end
Creates a VLAN IP range.
# File lib/fog/cosmic/requests/compute/create_vlan_ip_range.rb, line 9 def create_vlan_ip_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVlanIpRange') else options.merge!('command' => 'createVlanIpRange') end request(options) end
Creates snapshot for a vm.
# File lib/fog/cosmic/requests/compute/create_vm_snapshot.rb, line 9 def create_vm_snapshot(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVMSnapshot') else options.merge!('command' => 'createVMSnapshot', 'virtualmachineid' => args[0]) end request(options) end
Creates a disk volume from a disk offering. This disk volume must still be attached to a virtual machine to make use of it.
# File lib/fog/cosmic/requests/compute/create_volume.rb, line 9 def create_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVolume') else options.merge!('command' => 'createVolume', 'name' => args[0]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Creates a VPC
# File lib/fog/cosmic/requests/compute/create_vpc.rb, line 9 def create_vpc(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVPC') else options.merge!('command' => 'createVPC', 'vpcofferingid' => args[0], 'zoneid' => args[1], 'name' => args[2], 'cidr' => args[3], 'displaytext' => args[4]) end request(options) end
Creates VPC offering
# File lib/fog/cosmic/requests/compute/create_vpcoffering.rb, line 9 def create_vpcoffering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVPCOffering') else options.merge!('command' => 'createVPCOffering', 'supportedservices' => args[0], 'name' => args[1], 'displaytext' => args[2]) end request(options) end
Create site to site vpn connection
# File lib/fog/cosmic/requests/compute/create_vpn_connection.rb, line 9 def create_vpn_connection(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVpnConnection') else options.merge!('command' => 'createVpnConnection', 's2svpngatewayid' => args[0], 's2scustomergatewayid' => args[1]) end request(options) end
Creates site to site vpn customer gateway
# File lib/fog/cosmic/requests/compute/create_vpn_customer_gateway.rb, line 9 def create_vpn_customer_gateway(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVpnCustomerGateway') else options.merge!('command' => 'createVpnCustomerGateway', 'esppolicy' => args[0], 'cidrlist' => args[1], 'ikepolicy' => args[2], 'gateway' => args[3], 'ipsecpsk' => args[4]) end request(options) end
Creates site to site vpn local gateway
# File lib/fog/cosmic/requests/compute/create_vpn_gateway.rb, line 9 def create_vpn_gateway(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createVpnGateway') else options.merge!('command' => 'createVpnGateway', 'vpcid' => args[0]) end request(options) end
Creates a Zone
.
# File lib/fog/cosmic/requests/compute/create_zone.rb, line 9 def create_zone(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'createZone') else options.merge!('command' => 'createZone', 'dns1' => args[0], 'internaldns1' => args[1], 'networktype' => args[2], 'name' => args[3]) end request(options) end
Dedicate an existing cluster
# File lib/fog/cosmic/requests/compute/dedicate_cluster.rb, line 9 def dedicate_cluster(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'dedicateCluster') else options.merge!('command' => 'dedicateCluster', 'clusterid' => args[0], 'domainid' => args[1]) end request(options) end
Dedicates a guest vlan range to an account
# File lib/fog/cosmic/requests/compute/dedicate_guest_vlan_range.rb, line 9 def dedicate_guest_vlan_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'dedicateGuestVlanRange') else options.merge!('command' => 'dedicateGuestVlanRange', 'account' => args[0], 'domainid' => args[1], 'vlanrange' => args[2], 'physicalnetworkid' => args[3]) end request(options) end
Dedicates a host.
# File lib/fog/cosmic/requests/compute/dedicate_host.rb, line 9 def dedicate_host(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'dedicateHost') else options.merge!('command' => 'dedicateHost', 'hostid' => args[0], 'domainid' => args[1]) end request(options) end
Dedicates a Pod.
# File lib/fog/cosmic/requests/compute/dedicate_pod.rb, line 9 def dedicate_pod(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'dedicatePod') else options.merge!('command' => 'dedicatePod', 'podid' => args[0], 'domainid' => args[1]) end request(options) end
Dedicates a Public IP range to an account
# File lib/fog/cosmic/requests/compute/dedicate_public_ip_range.rb, line 9 def dedicate_public_ip_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'dedicatePublicIpRange') else options.merge!('command' => 'dedicatePublicIpRange', 'domainid' => args[0], 'account' => args[1], 'id' => args[2]) end request(options) end
Dedicates a zones.
# File lib/fog/cosmic/requests/compute/dedicate_zone.rb, line 9 def dedicate_zone(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'dedicateZone') else options.merge!('command' => 'dedicateZone', 'domainid' => args[0], 'zoneid' => args[1]) end request(options) end
Deletes a account, and all users associated with this account
# File lib/fog/cosmic/requests/compute/delete_account.rb, line 9 def delete_account(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteAccount') else options.merge!('command' => 'deleteAccount', 'id' => args[0]) end request(options) end
Deletes account from the project
# File lib/fog/cosmic/requests/compute/delete_account_from_project.rb, line 9 def delete_account_from_project(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteAccountFromProject') else options.merge!('command' => 'deleteAccountFromProject', 'projectid' => args[0], 'account' => args[1]) end request(options) end
Deletes affinity group
# File lib/fog/cosmic/requests/compute/delete_affinity_group.rb, line 9 def delete_affinity_group(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteAffinityGroup') else options.merge!('command' => 'deleteAffinityGroup') end request(options) end
Delete one or more alerts.
# File lib/fog/cosmic/requests/compute/delete_alerts.rb, line 9 def delete_alerts(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteAlerts') else options.merge!('command' => 'deleteAlerts') end request(options) end
Deletes a cluster.
# File lib/fog/cosmic/requests/compute/delete_cluster.rb, line 9 def delete_cluster(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteCluster') else options.merge!('command' => 'deleteCluster', 'id' => args[0]) end request(options) end
Updates a disk offering.
# File lib/fog/cosmic/requests/compute/delete_disk_offering.rb, line 9 def delete_disk_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteDiskOffering') else options.merge!('command' => 'deleteDiskOffering', 'id' => args[0]) end request(options) end
Deletes a specified domain
# File lib/fog/cosmic/requests/compute/delete_domain.rb, line 9 def delete_domain(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteDomain') else options.merge!('command' => 'deleteDomain', 'id' => args[0]) end request(options) end
Deletes an ggress firewall rule
# File lib/fog/cosmic/requests/compute/delete_egress_firewall_rule.rb, line 9 def delete_egress_firewall_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteEgressFirewallRule') else options.merge!('command' => 'deleteEgressFirewallRule', 'id' => args[0]) end request(options) end
Delete one or more events.
# File lib/fog/cosmic/requests/compute/delete_events.rb, line 9 def delete_events(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteEvents') else options.merge!('command' => 'deleteEvents') end request(options) end
Deletes a firewall rule
# File lib/fog/cosmic/requests/compute/delete_firewall_rule.rb, line 9 def delete_firewall_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteFirewallRule') else options.merge!('command' => 'deleteFirewallRule', 'id' => args[0]) end request(options) end
Deletes a host.
# File lib/fog/cosmic/requests/compute/delete_host.rb, line 9 def delete_host(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteHost') else options.merge!('command' => 'deleteHost', 'id' => args[0]) end request(options) end
Deletes an image store .
# File lib/fog/cosmic/requests/compute/delete_image_store.rb, line 9 def delete_image_store(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteImageStore') else options.merge!('command' => 'deleteImageStore', 'id' => args[0]) end request(options) end
Deletes a vm group
# File lib/fog/cosmic/requests/compute/delete_instance_group.rb, line 9 def delete_instance_group(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteInstanceGroup') else options.merge!('command' => 'deleteInstanceGroup', 'id' => args[0]) end request(options) end
Deletes an ip forwarding rule
# File lib/fog/cosmic/requests/compute/delete_ip_forwarding_rule.rb, line 9 def delete_ip_forwarding_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteIpForwardingRule') else options.merge!('command' => 'deleteIpForwardingRule', 'id' => args[0]) end request(options) end
Deletes an ISO file.
# File lib/fog/cosmic/requests/compute/delete_iso.rb, line 9 def delete_iso(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteIso') else options.merge!('command' => 'deleteIso', 'id' => args[0]) end request(options) end
Deletes a load balancer HealthCheck policy.
# File lib/fog/cosmic/requests/compute/delete_lb_health_check_policy.rb, line 9 def delete_lb_health_check_policy(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteLBHealthCheckPolicy') else options.merge!('command' => 'deleteLBHealthCheckPolicy', 'id' => args[0]) end request(options) end
Deletes a LB stickiness policy.
# File lib/fog/cosmic/requests/compute/delete_lb_stickiness_policy.rb, line 9 def delete_lb_stickiness_policy(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteLBStickinessPolicy') else options.merge!('command' => 'deleteLBStickinessPolicy', 'id' => args[0]) end request(options) end
Remove an Ldap Configuration
# File lib/fog/cosmic/requests/compute/delete_ldap_configuration.rb, line 9 def delete_ldap_configuration(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteLdapConfiguration') else options.merge!('command' => 'deleteLdapConfiguration', 'hostname' => args[0]) end request(options) end
Deletes a load balancer rule.
# File lib/fog/cosmic/requests/compute/delete_load_balancer_rule.rb, line 9 def delete_load_balancer_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteLoadBalancerRule') else options.merge!('command' => 'deleteLoadBalancerRule', 'id' => args[0]) end request(options) end
Deletes a network
# File lib/fog/cosmic/requests/compute/delete_network.rb, line 9 def delete_network(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteNetwork') else options.merge!('command' => 'deleteNetwork', 'id' => args[0]) end request(options) end
Deletes a Network
ACL
# File lib/fog/cosmic/requests/compute/delete_network_acl.rb, line 9 def delete_network_acl(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteNetworkACL') else options.merge!('command' => 'deleteNetworkACL', 'id' => args[0]) end request(options) end
Deletes a Network
ACL
# File lib/fog/cosmic/requests/compute/delete_network_acl_list.rb, line 9 def delete_network_acl_list(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteNetworkACLList') else options.merge!('command' => 'deleteNetworkACLList', 'id' => args[0]) end request(options) end
Deletes network device.
# File lib/fog/cosmic/requests/compute/delete_network_device.rb, line 9 def delete_network_device(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteNetworkDevice') else options.merge!('command' => 'deleteNetworkDevice', 'id' => args[0]) end request(options) end
Deletes a network offering.
# File lib/fog/cosmic/requests/compute/delete_network_offering.rb, line 9 def delete_network_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteNetworkOffering') else options.merge!('command' => 'deleteNetworkOffering', 'id' => args[0]) end request(options) end
Deletes a Network
Service Provider.
# File lib/fog/cosmic/requests/compute/delete_network_service_provider.rb, line 9 def delete_network_service_provider(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteNetworkServiceProvider') else options.merge!('command' => 'deleteNetworkServiceProvider', 'id' => args[0]) end request(options) end
delete a nicira nvp device
# File lib/fog/cosmic/requests/compute/delete_nicira_nvp_device.rb, line 9 def delete_nicira_nvp_device(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteNiciraNvpDevice') else options.merge!('command' => 'deleteNiciraNvpDevice', 'nvpdeviceid' => args[0]) end request(options) end
Deletes a Physical Network
.
# File lib/fog/cosmic/requests/compute/delete_physical_network.rb, line 9 def delete_physical_network(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deletePhysicalNetwork') else options.merge!('command' => 'deletePhysicalNetwork', 'id' => args[0]) end request(options) end
Deletes a Pod.
# File lib/fog/cosmic/requests/compute/delete_pod.rb, line 9 def delete_pod(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deletePod') else options.merge!('command' => 'deletePod', 'id' => args[0]) end request(options) end
Deletes a port forwarding rule
# File lib/fog/cosmic/requests/compute/delete_port_forwarding_rule.rb, line 9 def delete_port_forwarding_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deletePortForwardingRule') else options.merge!('command' => 'deletePortForwardingRule', 'id' => args[0]) end request(options) end
Deletes a Private gateway
# File lib/fog/cosmic/requests/compute/delete_private_gateway.rb, line 9 def delete_private_gateway(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deletePrivateGateway') else options.merge!('command' => 'deletePrivateGateway', 'id' => args[0]) end request(options) end
Deletes a project
# File lib/fog/cosmic/requests/compute/delete_project.rb, line 9 def delete_project(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteProject') else options.merge!('command' => 'deleteProject', 'id' => args[0]) end request(options) end
Accepts or declines project invitation
# File lib/fog/cosmic/requests/compute/delete_project_invitation.rb, line 9 def delete_project_invitation(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteProjectInvitation') else options.merge!('command' => 'deleteProjectInvitation', 'id' => args[0]) end request(options) end
Destroys a l2tp/ipsec remote access vpn
# File lib/fog/cosmic/requests/compute/delete_remote_access_vpn.rb, line 9 def delete_remote_access_vpn(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteRemoteAccessVpn') else options.merge!('command' => 'deleteRemoteAccessVpn', 'publicipid' => args[0]) end request(options) end
Deletes a secondary staging store .
# File lib/fog/cosmic/requests/compute/delete_secondary_staging_store.rb, line 9 def delete_secondary_staging_store(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteSecondaryStagingStore') else options.merge!('command' => 'deleteSecondaryStagingStore', 'id' => args[0]) end request(options) end
Deletes a service offering.
# File lib/fog/cosmic/requests/compute/delete_service_offering.rb, line 9 def delete_service_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteServiceOffering') else options.merge!('command' => 'deleteServiceOffering', 'id' => args[0]) end request(options) end
Deletes a snapshot of a disk volume.
# File lib/fog/cosmic/requests/compute/delete_snapshot.rb, line 9 def delete_snapshot(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteSnapshot') else options.merge!('command' => 'deleteSnapshot', 'id' => args[0]) end request(options) end
Deletes a keypair by name
# File lib/fog/cosmic/requests/compute/delete_ssh_key_pair.rb, line 9 def delete_ssh_key_pair(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteSSHKeyPair') else options.merge!('command' => 'deleteSSHKeyPair', 'name' => args[0]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Delete a certificate from Cosmic
# File lib/fog/cosmic/requests/compute/delete_ssl_cert.rb, line 9 def delete_ssl_cert(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteSslCert') else options.merge!('command' => 'deleteSslCert', 'id' => args[0]) end request(options) end
Deletes a static route
# File lib/fog/cosmic/requests/compute/delete_static_route.rb, line 9 def delete_static_route(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteStaticRoute') else options.merge!('command' => 'deleteStaticRoute', 'id' => args[0]) end request(options) end
Deletes a storage network IP Range.
# File lib/fog/cosmic/requests/compute/delete_storage_network_ip_range.rb, line 9 def delete_storage_network_ip_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteStorageNetworkIpRange') else options.merge!('command' => 'deleteStorageNetworkIpRange', 'id' => args[0]) end request(options) end
Deletes a storage pool.
# File lib/fog/cosmic/requests/compute/delete_storage_pool.rb, line 9 def delete_storage_pool(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteStoragePool') else options.merge!('command' => 'deleteStoragePool', 'id' => args[0]) end request(options) end
Deletes a template from the system. All virtual machines using the deleted template will not be affected.
# File lib/fog/cosmic/requests/compute/delete_template.rb, line 9 def delete_template(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteTemplate') else options.merge!('command' => 'deleteTemplate', 'id' => args[0]) end request(options) end
Deletes traffic type of a physical network
# File lib/fog/cosmic/requests/compute/delete_traffic_type.rb, line 9 def delete_traffic_type(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteTrafficType') else options.merge!('command' => 'deleteTrafficType', 'id' => args[0]) end request(options) end
Deletes a user for an account
# File lib/fog/cosmic/requests/compute/delete_user.rb, line 9 def delete_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteUser') else options.merge!('command' => 'deleteUser', 'id' => args[0]) end request(options) end
Creates a VLAN IP range.
# File lib/fog/cosmic/requests/compute/delete_vlan_ip_range.rb, line 9 def delete_vlan_ip_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteVlanIpRange') else options.merge!('command' => 'deleteVlanIpRange', 'id' => args[0]) end request(options) end
Deletes a vmsnapshot.
# File lib/fog/cosmic/requests/compute/delete_vm_snapshot.rb, line 9 def delete_vm_snapshot(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteVMSnapshot') else options.merge!('command' => 'deleteVMSnapshot', 'vmsnapshotid' => args[0]) end request(options) end
Deletes a detached disk volume.
# File lib/fog/cosmic/requests/compute/delete_volume.rb, line 9 def delete_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteVolume') else options.merge!('command' => 'deleteVolume', 'id' => args[0]) end request(options) end
Deletes a VPC
# File lib/fog/cosmic/requests/compute/delete_vpc.rb, line 9 def delete_vpc(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteVPC') else options.merge!('command' => 'deleteVPC', 'id' => args[0]) end request(options) end
Deletes VPC offering
# File lib/fog/cosmic/requests/compute/delete_vpcoffering.rb, line 9 def delete_vpcoffering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteVPCOffering') else options.merge!('command' => 'deleteVPCOffering', 'id' => args[0]) end request(options) end
Delete site to site vpn connection
# File lib/fog/cosmic/requests/compute/delete_vpn_connection.rb, line 9 def delete_vpn_connection(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteVpnConnection') else options.merge!('command' => 'deleteVpnConnection', 'id' => args[0]) end request(options) end
Delete site to site vpn customer gateway
# File lib/fog/cosmic/requests/compute/delete_vpn_customer_gateway.rb, line 9 def delete_vpn_customer_gateway(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteVpnCustomerGateway') else options.merge!('command' => 'deleteVpnCustomerGateway', 'id' => args[0]) end request(options) end
Delete site to site vpn gateway
# File lib/fog/cosmic/requests/compute/delete_vpn_gateway.rb, line 9 def delete_vpn_gateway(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteVpnGateway') else options.merge!('command' => 'deleteVpnGateway', 'id' => args[0]) end request(options) end
Deletes a Zone
.
# File lib/fog/cosmic/requests/compute/delete_zone.rb, line 9 def delete_zone(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deleteZone') else options.merge!('command' => 'deleteZone', 'id' => args[0]) end request(options) end
Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.
# File lib/fog/cosmic/requests/compute/deploy_virtual_machine.rb, line 9 def deploy_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'deployVirtualMachine') else options.merge!('command' => 'deployVirtualMachine', 'templateid' => args[0], 'zoneid' => args[1], 'serviceofferingid' => args[2]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Destroys a router.
# File lib/fog/cosmic/requests/compute/destroy_router.rb, line 9 def destroy_router(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'destroyRouter') else options.merge!('command' => 'destroyRouter', 'id' => args[0]) end request(options) end
Destroyes a system virtual machine.
# File lib/fog/cosmic/requests/compute/destroy_system_vm.rb, line 9 def destroy_system_vm(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'destroySystemVm') else options.merge!('command' => 'destroySystemVm', 'id' => args[0]) end request(options) end
Destroys a virtual machine. Once destroyed, only the administrator can recover it.
# File lib/fog/cosmic/requests/compute/destroy_virtual_machine.rb, line 9 def destroy_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'destroyVirtualMachine') else options.merge!('command' => 'destroyVirtualMachine', 'id' => args[0]) end request(options) end
Detaches any ISO file (if any) currently attached to a virtual machine.
# File lib/fog/cosmic/requests/compute/detach_iso.rb, line 9 def detach_iso(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'detachIso') else options.merge!('command' => 'detachIso', 'virtualmachineid' => args[0]) end request(options) end
Detaches a disk volume from a virtual machine.
# File lib/fog/cosmic/requests/compute/detach_volume.rb, line 9 def detach_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'detachVolume') else options.merge!('command' => 'detachVolume') end request(options) end
Disables an account
# File lib/fog/cosmic/requests/compute/disable_account.rb, line 9 def disable_account(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'disableAccount') else options.merge!('command' => 'disableAccount', 'lock' => args[0]) end request(options) end
Disables static rule for given ip address
# File lib/fog/cosmic/requests/compute/disable_static_nat.rb, line 9 def disable_static_nat(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'disableStaticNat') else options.merge!('command' => 'disableStaticNat', 'ipaddressid' => args[0]) end request(options) end
Disables a user account
# File lib/fog/cosmic/requests/compute/disable_user.rb, line 9 def disable_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'disableUser') else options.merge!('command' => 'disableUser', 'id' => args[0]) end request(options) end
Disassociates an ip address from the account.
# File lib/fog/cosmic/requests/compute/disassociate_ip_address.rb, line 9 def disassociate_ip_address(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'disassociateIpAddress') else options.merge!('command' => 'disassociateIpAddress', 'id' => args[0]) end request(options) end
Enables an account
# File lib/fog/cosmic/requests/compute/enable_account.rb, line 9 def enable_account(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'enableAccount') else options.merge!('command' => 'enableAccount') end request(options) end
Enables static nat for given ip address
# File lib/fog/cosmic/requests/compute/enable_static_nat.rb, line 9 def enable_static_nat(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'enableStaticNat') else options.merge!('command' => 'enableStaticNat', 'ipaddressid' => args[0], 'virtualmachineid' => args[1]) end request(options) end
Puts storage pool into maintenance state
# File lib/fog/cosmic/requests/compute/enable_storage_maintenance.rb, line 9 def enable_storage_maintenance(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'enableStorageMaintenance') else options.merge!('command' => 'enableStorageMaintenance', 'id' => args[0]) end request(options) end
Enables a user account
# File lib/fog/cosmic/requests/compute/enable_user.rb, line 9 def enable_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'enableUser') else options.merge!('command' => 'enableUser', 'id' => args[0]) end request(options) end
Expunge a virtual machine. Once expunged, it cannot be recoverd.
# File lib/fog/cosmic/requests/compute/expunge_virtual_machine.rb, line 9 def expunge_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'expungeVirtualMachine') else options.merge!('command' => 'expungeVirtualMachine', 'id' => args[0]) end request(options) end
Extracts an ISO
# File lib/fog/cosmic/requests/compute/extract_iso.rb, line 9 def extract_iso(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'extractIso') else options.merge!('command' => 'extractIso', 'id' => args[0], 'mode' => args[1]) end request(options) end
Extracts a template
# File lib/fog/cosmic/requests/compute/extract_template.rb, line 9 def extract_template(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'extractTemplate') else options.merge!('command' => 'extractTemplate', 'mode' => args[0], 'id' => args[1]) end request(options) end
Extracts volume
# File lib/fog/cosmic/requests/compute/extract_volume.rb, line 9 def extract_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'extractVolume') else options.merge!('command' => 'extractVolume', 'mode' => args[0], 'id' => args[1], 'zoneid' => args[2]) end request(options) end
Find hosts suitable for migrating a virtual machine.
# File lib/fog/cosmic/requests/compute/find_hosts_for_migration.rb, line 9 def find_hosts_for_migration(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'findHostsForMigration') else options.merge!('command' => 'findHostsForMigration', 'virtualmachineid' => args[0]) end request(options) end
Lists storage pools available for migration of a volume.
# File lib/fog/cosmic/requests/compute/find_storage_pools_for_migration.rb, line 9 def find_storage_pools_for_migration(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'findStoragePoolsForMigration') else options.merge!('command' => 'findStoragePoolsForMigration', 'id' => args[0]) end request(options) end
Generates an alert
# File lib/fog/cosmic/requests/compute/generate_alert.rb, line 9 def generate_alert(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'generateAlert') else options.merge!('command' => 'generateAlert', 'description' => args[0], 'name' => args[1], 'type' => args[2]) end request(options) end
Get API limit count for the caller
# File lib/fog/cosmic/requests/compute/get_api_limit.rb, line 9 def get_api_limit(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'getApiLimit') else options.merge!('command' => 'getApiLimit') end request(options) end
Retrieves a cloud identifier.
# File lib/fog/cosmic/requests/compute/get_cloud_identifier.rb, line 9 def get_cloud_identifier(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'getCloudIdentifier') else options.merge!('command' => 'getCloudIdentifier', 'userid' => args[0]) end request(options) end
Find user account by API key
# File lib/fog/cosmic/requests/compute/get_user.rb, line 9 def get_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'getUser') else options.merge!('command' => 'getUser', 'apikey' => args[0]) end request(options) end
Returns user data associated with the VM
# File lib/fog/cosmic/requests/compute/get_virtual_machine_user_data.rb, line 9 def get_virtual_machine_user_data(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'getVirtualMachineUserData') else options.merge!('command' => 'getVirtualMachineUserData', 'virtualmachineid' => args[0]) end request(options) end
Returns an encrypted password for the VM
# File lib/fog/cosmic/requests/compute/get_vm_password.rb, line 9 def get_vm_password(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'getVMPassword') else options.merge!('command' => 'getVMPassword', 'id' => args[0]) end request(options) end
Import LDAP users
# File lib/fog/cosmic/requests/compute/import_ldap_users.rb, line 9 def import_ldap_users(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'importLdapUsers') else options.merge!('command' => 'importLdapUsers', 'accounttype' => args[0]) end request(options) end
Creates an account from an LDAP user
# File lib/fog/cosmic/requests/compute/ldap_create_account.rb, line 9 def ldap_create_account(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'ldapCreateAccount') else options.merge!('command' => 'ldapCreateAccount', 'username' => args[0], 'accounttype' => args[1]) end request(options) end
Lists accounts and provides detailed account information for listed accounts
# File lib/fog/cosmic/requests/compute/list_accounts.rb, line 9 def list_accounts(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listAccounts') else options.merge!('command' => 'listAccounts') end request(options) end
Lists affinity group types available
# File lib/fog/cosmic/requests/compute/list_affinity_group_types.rb, line 9 def list_affinity_group_types(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listAffinityGroupTypes') else options.merge!('command' => 'listAffinityGroupTypes') end request(options) end
Lists affinity groups
# File lib/fog/cosmic/requests/compute/list_affinity_groups.rb, line 9 def list_affinity_groups(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listAffinityGroups') else options.merge!('command' => 'listAffinityGroups') end request(options) end
Lists all alerts.
# File lib/fog/cosmic/requests/compute/list_alerts.rb, line 9 def list_alerts(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listAlerts') else options.merge!('command' => 'listAlerts') end request(options) end
lists all available apis on the server, provided by the Api Discovery plugin
# File lib/fog/cosmic/requests/compute/list_apis.rb, line 9 def list_apis(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listApis') else options.merge!('command' => 'listApis') end request(options) end
Lists all pending asynchronous jobs for the account.
# File lib/fog/cosmic/requests/compute/list_async_jobs.rb, line 9 def list_async_jobs(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listAsyncJobs') else options.merge!('command' => 'listAsyncJobs') end request(options) end
Lists capabilities
# File lib/fog/cosmic/requests/compute/list_capabilities.rb, line 9 def list_capabilities(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listCapabilities') else options.merge!('command' => 'listCapabilities') end request(options) end
Lists all the system wide capacities.
# File lib/fog/cosmic/requests/compute/list_capacity.rb, line 9 def list_capacity(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listCapacity') else options.merge!('command' => 'listCapacity') end request(options) end
Lists clusters.
# File lib/fog/cosmic/requests/compute/list_clusters.rb, line 9 def list_clusters(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listClusters') else options.merge!('command' => 'listClusters') end request(options) end
Lists all configurations.
# File lib/fog/cosmic/requests/compute/list_configurations.rb, line 9 def list_configurations(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listConfigurations') else options.merge!('command' => 'listConfigurations') end request(options) end
Lists dedicated clusters.
# File lib/fog/cosmic/requests/compute/list_dedicated_clusters.rb, line 9 def list_dedicated_clusters(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDedicatedClusters') else options.merge!('command' => 'listDedicatedClusters') end request(options) end
Lists dedicated guest vlan ranges
# File lib/fog/cosmic/requests/compute/list_dedicated_guest_vlan_ranges.rb, line 9 def list_dedicated_guest_vlan_ranges(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDedicatedGuestVlanRanges') else options.merge!('command' => 'listDedicatedGuestVlanRanges') end request(options) end
Lists dedicated hosts.
# File lib/fog/cosmic/requests/compute/list_dedicated_hosts.rb, line 9 def list_dedicated_hosts(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDedicatedHosts') else options.merge!('command' => 'listDedicatedHosts') end request(options) end
Lists dedicated pods.
# File lib/fog/cosmic/requests/compute/list_dedicated_pods.rb, line 9 def list_dedicated_pods(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDedicatedPods') else options.merge!('command' => 'listDedicatedPods') end request(options) end
List dedicated zones.
# File lib/fog/cosmic/requests/compute/list_dedicated_zones.rb, line 9 def list_dedicated_zones(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDedicatedZones') else options.merge!('command' => 'listDedicatedZones') end request(options) end
Lists all DeploymentPlanners available.
# File lib/fog/cosmic/requests/compute/list_deployment_planners.rb, line 9 def list_deployment_planners(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDeploymentPlanners') else options.merge!('command' => 'listDeploymentPlanners') end request(options) end
Lists all available disk offerings.
# File lib/fog/cosmic/requests/compute/list_disk_offerings.rb, line 9 def list_disk_offerings(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDiskOfferings') else options.merge!('command' => 'listDiskOfferings') end request(options) end
Lists all children domains belonging to a specified domain
# File lib/fog/cosmic/requests/compute/list_domain_children.rb, line 9 def list_domain_children(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDomainChildren') else options.merge!('command' => 'listDomainChildren') end request(options) end
Lists domains and provides detailed information for listed domains
# File lib/fog/cosmic/requests/compute/list_domains.rb, line 9 def list_domains(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listDomains') else options.merge!('command' => 'listDomains') end request(options) end
Lists all egress firewall rules for network id.
# File lib/fog/cosmic/requests/compute/list_egress_firewall_rules.rb, line 9 def list_egress_firewall_rules(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listEgressFirewallRules') else options.merge!('command' => 'listEgressFirewallRules') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
List Event Types
# File lib/fog/cosmic/requests/compute/list_event_types.rb, line 9 def list_event_types(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listEventTypes') else options.merge!('command' => 'listEventTypes') end request(options) end
A command to list events.
# File lib/fog/cosmic/requests/compute/list_events.rb, line 9 def list_events(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listEvents') else options.merge!('command' => 'listEvents') end request(options) end
Lists all firewall rules for an IP address.
# File lib/fog/cosmic/requests/compute/list_firewall_rules.rb, line 9 def list_firewall_rules(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listFirewallRules') else options.merge!('command' => 'listFirewallRules') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Lists all available OS mappings for given hypervisor
# File lib/fog/cosmic/requests/compute/list_guest_os_mapping.rb, line 9 def list_guest_os_mapping(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listGuestOsMapping') else options.merge!('command' => 'listGuestOsMapping') end request(options) end
Lists hosts.
# File lib/fog/cosmic/requests/compute/list_hosts.rb, line 9 def list_hosts(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listHosts') else options.merge!('command' => 'listHosts') end request(options) end
Lists all hypervisor capabilities.
# File lib/fog/cosmic/requests/compute/list_hypervisor_capabilities.rb, line 9 def list_hypervisor_capabilities(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listHypervisorCapabilities') else options.merge!('command' => 'listHypervisorCapabilities') end request(options) end
List hypervisors
# File lib/fog/cosmic/requests/compute/list_hypervisors.rb, line 9 def list_hypervisors(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listHypervisors') else options.merge!('command' => 'listHypervisors') end request(options) end
Lists image stores.
# File lib/fog/cosmic/requests/compute/list_image_stores.rb, line 9 def list_image_stores(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listImageStores') else options.merge!('command' => 'listImageStores') end request(options) end
Lists vm groups
# File lib/fog/cosmic/requests/compute/list_instance_groups.rb, line 9 def list_instance_groups(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listInstanceGroups') else options.merge!('command' => 'listInstanceGroups') end request(options) end
List the ip forwarding rules
# File lib/fog/cosmic/requests/compute/list_ip_forwarding_rules.rb, line 9 def list_ip_forwarding_rules(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listIpForwardingRules') else options.merge!('command' => 'listIpForwardingRules') end request(options) end
List iso visibility and all accounts that have permissions to view this iso.
# File lib/fog/cosmic/requests/compute/list_iso_permissions.rb, line 9 def list_iso_permissions(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listIsoPermissions') else options.merge!('command' => 'listIsoPermissions', 'id' => args[0]) end request(options) end
Lists all available ISO files.
# File lib/fog/cosmic/requests/compute/list_isos.rb, line 9 def list_isos(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listIsos') else options.merge!('command' => 'listIsos') end request(options) end
Lists load balancer HealthCheck policies.
# File lib/fog/cosmic/requests/compute/list_lb_health_check_policies.rb, line 9 def list_lb_health_check_policies(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listLBHealthCheckPolicies') else options.merge!('command' => 'listLBHealthCheckPolicies') end request(options) end
Lists LBStickiness policies.
# File lib/fog/cosmic/requests/compute/list_lb_stickiness_policies.rb, line 9 def list_lb_stickiness_policies(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listLBStickinessPolicies') else options.merge!('command' => 'listLBStickinessPolicies') end request(options) end
Lists all LDAP configurations
# File lib/fog/cosmic/requests/compute/list_ldap_configurations.rb, line 9 def list_ldap_configurations(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listLdapConfigurations') else options.merge!('command' => 'listLdapConfigurations') end request(options) end
Lists all LDAP Users
# File lib/fog/cosmic/requests/compute/list_ldap_users.rb, line 9 def list_ldap_users(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listLdapUsers') else options.merge!('command' => 'listLdapUsers') end request(options) end
List all virtual machine instances that are assigned to a load balancer rule.
# File lib/fog/cosmic/requests/compute/list_load_balancer_rule_instances.rb, line 9 def list_load_balancer_rule_instances(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listLoadBalancerRuleInstances') else options.merge!('command' => 'listLoadBalancerRuleInstances', 'id' => args[0]) end request(options) end
Lists load balancer rules.
# File lib/fog/cosmic/requests/compute/list_load_balancer_rules.rb, line 9 def list_load_balancer_rules(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listLoadBalancerRules') else options.merge!('command' => 'listLoadBalancerRules') end request(options) end
Lists all network ACLs
# File lib/fog/cosmic/requests/compute/list_network_acl_lists.rb, line 9 def list_network_acl_lists(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNetworkACLLists') else options.merge!('command' => 'listNetworkACLLists') end request(options) end
Lists all network ACL items
# File lib/fog/cosmic/requests/compute/list_network_acls.rb, line 9 def list_network_acls(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNetworkACLs') else options.merge!('command' => 'listNetworkACLs') end request(options) end
List network devices
# File lib/fog/cosmic/requests/compute/list_network_device.rb, line 9 def list_network_device(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNetworkDevice') else options.merge!('command' => 'listNetworkDevice') end request(options) end
Lists supported methods of network isolation
# File lib/fog/cosmic/requests/compute/list_network_isolation_methods.rb, line 9 def list_network_isolation_methods(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNetworkIsolationMethods') else options.merge!('command' => 'listNetworkIsolationMethods') end request(options) end
Lists all available network offerings.
# File lib/fog/cosmic/requests/compute/list_network_offerings.rb, line 9 def list_network_offerings(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNetworkOfferings') else options.merge!('command' => 'listNetworkOfferings') end request(options) end
Lists network serviceproviders for a given physical network.
# File lib/fog/cosmic/requests/compute/list_network_service_providers.rb, line 9 def list_network_service_providers(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNetworkServiceProviders') else options.merge!('command' => 'listNetworkServiceProviders') end request(options) end
Lists all available networks.
# File lib/fog/cosmic/requests/compute/list_networks.rb, line 9 def list_networks(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNetworks') else options.merge!('command' => 'listNetworks') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
lists network that are using a nicira nvp device
# File lib/fog/cosmic/requests/compute/list_nicira_nvp_device_networks.rb, line 9 def list_nicira_nvp_device_networks(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNiciraNvpDeviceNetworks') else options.merge!('command' => 'listNiciraNvpDeviceNetworks', 'nvpdeviceid' => args[0]) end request(options) end
Lists Nicira NVP devices
# File lib/fog/cosmic/requests/compute/list_nicira_nvp_devices.rb, line 9 def list_nicira_nvp_devices(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNiciraNvpDevices') else options.merge!('command' => 'listNiciraNvpDevices') end request(options) end
list the vm nics IP to NIC
# File lib/fog/cosmic/requests/compute/list_nics.rb, line 9 def list_nics(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listNics') else options.merge!('command' => 'listNics', 'virtualmachineid' => args[0]) end request(options) end
Lists all supported OS categories for this cloud.
# File lib/fog/cosmic/requests/compute/list_os_categories.rb, line 9 def list_os_categories(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listOsCategories') else options.merge!('command' => 'listOsCategories') end request(options) end
Lists all supported OS types for this cloud.
# File lib/fog/cosmic/requests/compute/list_os_types.rb, line 9 def list_os_types(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listOsTypes') else options.merge!('command' => 'listOsTypes') end request(options) end
Lists physical networks
# File lib/fog/cosmic/requests/compute/list_physical_networks.rb, line 9 def list_physical_networks(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listPhysicalNetworks') else options.merge!('command' => 'listPhysicalNetworks') end request(options) end
Lists all Pods.
# File lib/fog/cosmic/requests/compute/list_pods.rb, line 9 def list_pods(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listPods') else options.merge!('command' => 'listPods') end request(options) end
Lists all port forwarding rules for an IP address.
# File lib/fog/cosmic/requests/compute/list_port_forwarding_rules.rb, line 9 def list_port_forwarding_rules(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listPortForwardingRules') else options.merge!('command' => 'listPortForwardingRules') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
List private gateways
# File lib/fog/cosmic/requests/compute/list_private_gateways.rb, line 9 def list_private_gateways(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listPrivateGateways') else options.merge!('command' => 'listPrivateGateways') end request(options) end
Lists project's accounts
# File lib/fog/cosmic/requests/compute/list_project_accounts.rb, line 9 def list_project_accounts(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listProjectAccounts') else options.merge!('command' => 'listProjectAccounts', 'projectid' => args[0]) end request(options) end
Lists projects and provides detailed information for listed projects
# File lib/fog/cosmic/requests/compute/list_project_invitations.rb, line 9 def list_project_invitations(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listProjectInvitations') else options.merge!('command' => 'listProjectInvitations') end request(options) end
Lists projects and provides detailed information for listed projects
# File lib/fog/cosmic/requests/compute/list_projects.rb, line 9 def list_projects(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listProjects') else options.merge!('command' => 'listProjects') end request(options) end
Lists all public ip addresses
# File lib/fog/cosmic/requests/compute/list_public_ip_addresses.rb, line 9 def list_public_ip_addresses(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listPublicIpAddresses') else options.merge!('command' => 'listPublicIpAddresses') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Lists Regions
# File lib/fog/cosmic/requests/compute/list_regions.rb, line 9 def list_regions(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listRegions') else options.merge!('command' => 'listRegions') end request(options) end
Lists remote access vpns
# File lib/fog/cosmic/requests/compute/list_remote_access_vpns.rb, line 9 def list_remote_access_vpns(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listRemoteAccessVpns') else options.merge!('command' => 'listRemoteAccessVpns') end request(options) end
List resource detail(s)
# File lib/fog/cosmic/requests/compute/list_resource_details.rb, line 9 def list_resource_details(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listResourceDetails') else options.merge!('command' => 'listResourceDetails', 'resourcetype' => args[0]) end request(options) end
Lists resource limits.
# File lib/fog/cosmic/requests/compute/list_resource_limits.rb, line 9 def list_resource_limits(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listResourceLimits') else options.merge!('command' => 'listResourceLimits') end request(options) end
List routers.
# File lib/fog/cosmic/requests/compute/list_routers.rb, line 9 def list_routers(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listRouters') else options.merge!('command' => 'listRouters') end request(options) end
Lists secondary staging stores.
# File lib/fog/cosmic/requests/compute/list_secondary_staging_stores.rb, line 9 def list_secondary_staging_stores(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listSecondaryStagingStores') else options.merge!('command' => 'listSecondaryStagingStores') end request(options) end
Lists all available service offerings.
# File lib/fog/cosmic/requests/compute/list_service_offerings.rb, line 9 def list_service_offerings(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listServiceOfferings') else options.merge!('command' => 'listServiceOfferings') end request(options) end
Lists all available snapshots for the account.
# File lib/fog/cosmic/requests/compute/list_snapshots.rb, line 9 def list_snapshots(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listSnapshots') else options.merge!('command' => 'listSnapshots') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
List registered keypairs
# File lib/fog/cosmic/requests/compute/list_ssh_key_pairs.rb, line 9 def list_ssh_key_pairs(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listSSHKeyPairs') else options.merge!('command' => 'listSSHKeyPairs') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Lists SSL certificates
# File lib/fog/cosmic/requests/compute/list_ssl_certs.rb, line 9 def list_ssl_certs(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listSslCerts') else options.merge!('command' => 'listSslCerts') end request(options) end
Lists all static routes
# File lib/fog/cosmic/requests/compute/list_static_routes.rb, line 9 def list_static_routes(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listStaticRoutes') else options.merge!('command' => 'listStaticRoutes') end request(options) end
List a storage network IP range.
# File lib/fog/cosmic/requests/compute/list_storage_network_ip_range.rb, line 9 def list_storage_network_ip_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listStorageNetworkIpRange') else options.merge!('command' => 'listStorageNetworkIpRange') end request(options) end
Lists storage pools.
# File lib/fog/cosmic/requests/compute/list_storage_pools.rb, line 9 def list_storage_pools(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listStoragePools') else options.merge!('command' => 'listStoragePools') end request(options) end
Lists storage providers.
# File lib/fog/cosmic/requests/compute/list_storage_providers.rb, line 9 def list_storage_providers(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listStorageProviders') else options.merge!('command' => 'listStorageProviders', 'type' => args[0]) end request(options) end
Lists all network services provided by Cosmic
or for the given provider.
# File lib/fog/cosmic/requests/compute/list_supported_network_services.rb, line 9 def list_supported_network_services(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listSupportedNetworkServices') else options.merge!('command' => 'listSupportedNetworkServices') end request(options) end
List system virtual machines.
# File lib/fog/cosmic/requests/compute/list_system_vms.rb, line 9 def list_system_vms(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listSystemVms') else options.merge!('command' => 'listSystemVms') end request(options) end
List template visibility and all accounts that have permissions to view this template.
# File lib/fog/cosmic/requests/compute/list_template_permissions.rb, line 9 def list_template_permissions(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listTemplatePermissions') else options.merge!('command' => 'listTemplatePermissions', 'id' => args[0]) end request(options) end
List all public, private, and privileged templates.
# File lib/fog/cosmic/requests/compute/list_templates.rb, line 9 def list_templates(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listTemplates') else options.merge!('command' => 'listTemplates', 'templatefilter' => args[0]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Lists traffic types of a given physical network.
# File lib/fog/cosmic/requests/compute/list_traffic_types.rb, line 9 def list_traffic_types(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listTrafficTypes') else options.merge!('command' => 'listTrafficTypes', 'physicalnetworkid' => args[0]) end request(options) end
Lists user accounts
# File lib/fog/cosmic/requests/compute/list_users.rb, line 9 def list_users(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listUsers') else options.merge!('command' => 'listUsers') end request(options) end
List the virtual machines owned by the account.
# File lib/fog/cosmic/requests/compute/list_virtual_machines.rb, line 9 def list_virtual_machines(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVirtualMachines') else options.merge!('command' => 'listVirtualMachines') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Lists all available virtual router elements.
# File lib/fog/cosmic/requests/compute/list_virtual_router_elements.rb, line 9 def list_virtual_router_elements(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVirtualRouterElements') else options.merge!('command' => 'listVirtualRouterElements') end request(options) end
Lists all VLAN IP ranges.
# File lib/fog/cosmic/requests/compute/list_vlan_ip_ranges.rb, line 9 def list_vlan_ip_ranges(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVlanIpRanges') else options.merge!('command' => 'listVlanIpRanges') end request(options) end
List virtual machine snapshot by conditions
# File lib/fog/cosmic/requests/compute/list_vm_snapshot.rb, line 9 def list_vm_snapshot(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVMSnapshot') else options.merge!('command' => 'listVMSnapshot') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Lists all volumes.
# File lib/fog/cosmic/requests/compute/list_volumes.rb, line 9 def list_volumes(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVolumes') else options.merge!('command' => 'listVolumes') end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Lists VPC offerings
# File lib/fog/cosmic/requests/compute/list_vpc_offerings.rb, line 9 def list_vpc_offerings(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVPCOfferings') else options.merge!('command' => 'listVPCOfferings') end request(options) end
Lists VPCs
# File lib/fog/cosmic/requests/compute/list_vpcs.rb, line 9 def list_vpcs(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVPCs') else options.merge!('command' => 'listVPCs') end request(options) end
Lists site to site vpn connection gateways
# File lib/fog/cosmic/requests/compute/list_vpn_connections.rb, line 9 def list_vpn_connections(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVpnConnections') else options.merge!('command' => 'listVpnConnections') end request(options) end
Lists site to site vpn customer gateways
# File lib/fog/cosmic/requests/compute/list_vpn_customer_gateways.rb, line 9 def list_vpn_customer_gateways(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVpnCustomerGateways') else options.merge!('command' => 'listVpnCustomerGateways') end request(options) end
Lists site 2 site vpn gateways
# File lib/fog/cosmic/requests/compute/list_vpn_gateways.rb, line 9 def list_vpn_gateways(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVpnGateways') else options.merge!('command' => 'listVpnGateways') end request(options) end
Lists vpn users
# File lib/fog/cosmic/requests/compute/list_vpn_users.rb, line 9 def list_vpn_users(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listVpnUsers') else options.merge!('command' => 'listVpnUsers') end request(options) end
Lists zones
# File lib/fog/cosmic/requests/compute/list_zones.rb, line 9 def list_zones(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'listZones') else options.merge!('command' => 'listZones') end request(options) end
Locks an account
# File lib/fog/cosmic/requests/compute/lock_account.rb, line 9 def lock_account(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'lockAccount') else options.merge!('command' => 'lockAccount', 'account' => args[0], 'domainid' => args[1]) end request(options) end
Locks a user account
# File lib/fog/cosmic/requests/compute/lock_user.rb, line 9 def lock_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'lockUser') else options.merge!('command' => 'lockUser', 'id' => args[0]) end request(options) end
# File lib/fog/cosmic/compute.rb, line 428 def login(username,password,domain) response = issue_request({ 'response' => 'json', 'command' => 'login', 'username' => username, 'password' => Digest::MD5.hexdigest(password), 'domain' => domain }) # Parse response cookies to retrive JSESSIONID token cookies = CGI::Cookie.parse(response.headers['Set-Cookie']) sessionid = cookies['JSESSIONID'].first # Decode the login response response = Fog::JSON.decode(response.body) user = response['loginresponse'] user.merge!('sessionid' => sessionid) @cosmic_session_id = user['sessionid'] @cosmic_session_key = user['sessionkey'] user end
Marks a default zone for this account
# File lib/fog/cosmic/requests/compute/mark_default_zone_for_account.rb, line 9 def mark_default_zone_for_account(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'markDefaultZoneForAccount') else options.merge!('command' => 'markDefaultZoneForAccount', 'zoneid' => args[0], 'account' => args[1], 'domainid' => args[2]) end request(options) end
Attempts Migration of a system virtual machine to the host specified.
# File lib/fog/cosmic/requests/compute/migrate_system_vm.rb, line 9 def migrate_system_vm(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'migrateSystemVm') else options.merge!('command' => 'migrateSystemVm', 'virtualmachineid' => args[0], 'hostid' => args[1]) end request(options) end
Attempts Migration of a VM to a different host or Root volume of the vm to a different storage pool
# File lib/fog/cosmic/requests/compute/migrate_virtual_machine.rb, line 9 def migrate_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'migrateVirtualMachine') else options.merge!('command' => 'migrateVirtualMachine', 'virtualmachineid' => args[0]) end request(options) end
Attempts Migration of a VM with its volumes to a different host
# File lib/fog/cosmic/requests/compute/migrate_virtual_machine_with_volume.rb, line 9 def migrate_virtual_machine_with_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'migrateVirtualMachineWithVolume') else options.merge!('command' => 'migrateVirtualMachineWithVolume', 'hostid' => args[0], 'virtualmachineid' => args[1]) end request(options) end
Migrate volume
# File lib/fog/cosmic/requests/compute/migrate_volume.rb, line 9 def migrate_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'migrateVolume') else options.merge!('command' => 'migrateVolume', 'storageid' => args[0], 'volumeid' => args[1]) end request(options) end
Prepares a host for maintenance.
# File lib/fog/cosmic/requests/compute/prepare_host_for_maintenance.rb, line 9 def prepare_host_for_maintenance(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'prepareHostForMaintenance') else options.merge!('command' => 'prepareHostForMaintenance', 'id' => args[0]) end request(options) end
load template into primary storage
# File lib/fog/cosmic/requests/compute/prepare_template.rb, line 9 def prepare_template(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'prepareTemplate') else options.merge!('command' => 'prepareTemplate', 'templateid' => args[0], 'zoneid' => args[1]) end request(options) end
Retrieves the current status of asynchronous job.
# File lib/fog/cosmic/requests/compute/query_async_job_result.rb, line 9 def query_async_job_result(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'queryAsyncJobResult') else options.merge!('command' => 'queryAsyncJobResult', 'jobid' => args[0]) end request(options) end
Starts a router.
# File lib/fog/cosmic/requests/compute/reboot_router.rb, line 9 def reboot_router(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'rebootRouter') else options.merge!('command' => 'rebootRouter', 'id' => args[0]) end request(options) end
Reboots a system VM.
# File lib/fog/cosmic/requests/compute/reboot_system_vm.rb, line 9 def reboot_system_vm(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'rebootSystemVm') else options.merge!('command' => 'rebootSystemVm', 'id' => args[0]) end request(options) end
Reboots a virtual machine.
# File lib/fog/cosmic/requests/compute/reboot_virtual_machine.rb, line 9 def reboot_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'rebootVirtualMachine') else options.merge!('command' => 'rebootVirtualMachine', 'id' => args[0]) end request(options) end
Reconnects a host.
# File lib/fog/cosmic/requests/compute/reconnect_host.rb, line 9 def reconnect_host(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'reconnectHost') else options.merge!('command' => 'reconnectHost', 'id' => args[0]) end request(options) end
Recovers a virtual machine.
# File lib/fog/cosmic/requests/compute/recover_virtual_machine.rb, line 9 def recover_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'recoverVirtualMachine') else options.merge!('command' => 'recoverVirtualMachine', 'id' => args[0]) end request(options) end
Registers an existing ISO into the Cosmic
cloud.
# File lib/fog/cosmic/requests/compute/register_iso.rb, line 9 def register_iso(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'registerIso') else options.merge!('command' => 'registerIso', 'name' => args[0], 'displaytext' => args[1], 'url' => args[2], 'zoneid' => args[3]) end request(options) end
Register a public key in a keypair under a certain name
# File lib/fog/cosmic/requests/compute/register_ssh_key_pair.rb, line 9 def register_ssh_key_pair(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'registerSSHKeyPair') else options.merge!('command' => 'registerSSHKeyPair', 'name' => args[0], 'publickey' => args[1]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Registers an existing template into the Cosmic
cloud.
# File lib/fog/cosmic/requests/compute/register_template.rb, line 9 def register_template(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'registerTemplate') else options.merge!('command' => 'registerTemplate', 'zoneid' => args[0], 'format' => args[1], 'hypervisor' => args[2], 'url' => args[3], 'name' => args[4], 'ostypeid' => args[5], 'displaytext' => args[6]) end request(options) end
This command allows a user to register for the developer API, returning a secret key and an API key. This request is made through the integration API port, so it is a privileged command and must be made on behalf of a user. It is up to the implementer just how the username and password are entered, and then how that translates to an integration API request. Both secret key and API key should be returned to the user
# File lib/fog/cosmic/requests/compute/register_user_keys.rb, line 9 def register_user_keys(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'registerUserKeys') else options.merge!('command' => 'registerUserKeys', 'id' => args[0]) end request(options) end
Release the dedication for cluster
# File lib/fog/cosmic/requests/compute/release_dedicated_cluster.rb, line 9 def release_dedicated_cluster(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'releaseDedicatedCluster') else options.merge!('command' => 'releaseDedicatedCluster', 'clusterid' => args[0]) end request(options) end
Releases a dedicated guest vlan range to the system
# File lib/fog/cosmic/requests/compute/release_dedicated_guest_vlan_range.rb, line 9 def release_dedicated_guest_vlan_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'releaseDedicatedGuestVlanRange') else options.merge!('command' => 'releaseDedicatedGuestVlanRange', 'id' => args[0]) end request(options) end
Release the dedication for host
# File lib/fog/cosmic/requests/compute/release_dedicated_host.rb, line 9 def release_dedicated_host(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'releaseDedicatedHost') else options.merge!('command' => 'releaseDedicatedHost', 'hostid' => args[0]) end request(options) end
Release the dedication for the pod
# File lib/fog/cosmic/requests/compute/release_dedicated_pod.rb, line 9 def release_dedicated_pod(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'releaseDedicatedPod') else options.merge!('command' => 'releaseDedicatedPod', 'podid' => args[0]) end request(options) end
Release dedication of zone
# File lib/fog/cosmic/requests/compute/release_dedicated_zone.rb, line 9 def release_dedicated_zone(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'releaseDedicatedZone') else options.merge!('command' => 'releaseDedicatedZone', 'zoneid' => args[0]) end request(options) end
Releases host reservation.
# File lib/fog/cosmic/requests/compute/release_host_reservation.rb, line 9 def release_host_reservation(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'releaseHostReservation') else options.merge!('command' => 'releaseHostReservation', 'id' => args[0]) end request(options) end
Releases a Public IP range back to the system pool
# File lib/fog/cosmic/requests/compute/release_public_ip_range.rb, line 9 def release_public_ip_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'releasePublicIpRange') else options.merge!('command' => 'releasePublicIpRange', 'id' => args[0]) end request(options) end
# File lib/fog/cosmic/compute.rb, line 424 def reload @connection.reset end
Removes a certificate from a Load Balancer Rule
# File lib/fog/cosmic/requests/compute/remove_cert_from_load_balancer.rb, line 9 def remove_cert_from_load_balancer(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeCertFromLoadBalancer') else options.merge!('command' => 'removeCertFromLoadBalancer', 'lbruleid' => args[0]) end request(options) end
Removes a virtual machine or a list of virtual machines from a load balancer rule.
# File lib/fog/cosmic/requests/compute/remove_from_load_balancer_rule.rb, line 9 def remove_from_load_balancer_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeFromLoadBalancerRule') else options.merge!('command' => 'removeFromLoadBalancerRule', 'id' => args[0]) end request(options) end
Removes a Guest OS from listing.
# File lib/fog/cosmic/requests/compute/remove_guest_os.rb, line 9 def remove_guest_os(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeGuestOs') else options.merge!('command' => 'removeGuestOs', 'id' => args[0]) end request(options) end
Removes a Guest OS Mapping.
# File lib/fog/cosmic/requests/compute/remove_guest_os_mapping.rb, line 9 def remove_guest_os_mapping(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeGuestOsMapping') else options.merge!('command' => 'removeGuestOsMapping', 'id' => args[0]) end request(options) end
Removes secondary IP from the NIC.
# File lib/fog/cosmic/requests/compute/remove_ip_from_nic.rb, line 9 def remove_ip_from_nic(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeIpFromNic') else options.merge!('command' => 'removeIpFromNic', 'id' => args[0]) end request(options) end
Removes VM from specified network by deleting a NIC
# File lib/fog/cosmic/requests/compute/remove_nic_from_virtual_machine.rb, line 9 def remove_nic_from_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeNicFromVirtualMachine') else options.merge!('command' => 'removeNicFromVirtualMachine', 'virtualmachineid' => args[0], 'nicid' => args[1]) end request(options) end
Removes specified region
# File lib/fog/cosmic/requests/compute/remove_region.rb, line 9 def remove_region(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeRegion') else options.merge!('command' => 'removeRegion', 'id' => args[0]) end request(options) end
Removes detail for the Resource.
# File lib/fog/cosmic/requests/compute/remove_resource_detail.rb, line 9 def remove_resource_detail(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeResourceDetail') else options.merge!('command' => 'removeResourceDetail', 'resourcetype' => args[0], 'resourceid' => args[1]) end request(options) end
Removes vpn user
# File lib/fog/cosmic/requests/compute/remove_vpn_user.rb, line 9 def remove_vpn_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'removeVpnUser') else options.merge!('command' => 'removeVpnUser', 'username' => args[0]) end request(options) end
Replaces ACL associated with a Network
or private gateway
# File lib/fog/cosmic/requests/compute/replace_network_acl_list.rb, line 9 def replace_network_acl_list(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'replaceNetworkACLList') else options.merge!('command' => 'replaceNetworkACLList', 'aclid' => args[0]) end request(options) end
# File lib/fog/cosmic/compute.rb, line 453 def request(params) params.reject!{|k,v| v.nil?} params.merge!('response' => 'json') if has_session? params, headers = authorize_session(params) elsif has_keys? params, headers = authorize_api_keys(params) end response = issue_request(params,headers) response = Fog::JSON.decode(response.body) unless response.body.empty? response end
Reset api count
# File lib/fog/cosmic/requests/compute/reset_api_limit.rb, line 9 def reset_api_limit(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'resetApiLimit') else options.merge!('command' => 'resetApiLimit') end request(options) end
Resets the password for virtual machine. The virtual machine must be in a “Stopped” state and the template must already support this feature for this command to take effect. [async]
# File lib/fog/cosmic/requests/compute/reset_password_for_virtual_machine.rb, line 9 def reset_password_for_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'resetPasswordForVirtualMachine') else options.merge!('command' => 'resetPasswordForVirtualMachine', 'id' => args[0]) end request(options) end
Resets the SSH Key for virtual machine. The virtual machine must be in a “Stopped” state. [async]
# File lib/fog/cosmic/requests/compute/reset_ssh_key_for_virtual_machine.rb, line 9 def reset_ssh_key_for_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'resetSSHKeyForVirtualMachine') else options.merge!('command' => 'resetSSHKeyForVirtualMachine', 'id' => args[0], 'keypair' => args[1]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Reset site to site vpn connection
# File lib/fog/cosmic/requests/compute/reset_vpn_connection.rb, line 9 def reset_vpn_connection(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'resetVpnConnection') else options.merge!('command' => 'resetVpnConnection', 'id' => args[0]) end request(options) end
Resizes a volume
# File lib/fog/cosmic/requests/compute/resize_volume.rb, line 9 def resize_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'resizeVolume') else options.merge!('command' => 'resizeVolume', 'id' => args[0]) end request(options) end
Restarts the network; includes 1) restarting network elements - virtual routers, dhcp servers 2) reapplying all public ips 3) reapplying loadBalancing/portForwarding rules
# File lib/fog/cosmic/requests/compute/restart_network.rb, line 9 def restart_network(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'restartNetwork') else options.merge!('command' => 'restartNetwork', 'id' => args[0]) end request(options) end
Restarts a VPC
# File lib/fog/cosmic/requests/compute/restart_vpc.rb, line 9 def restart_vpc(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'restartVPC') else options.merge!('command' => 'restartVPC', 'id' => args[0]) end request(options) end
Restore a VM to original template/ISO or new template/ISO
# File lib/fog/cosmic/requests/compute/restore_virtual_machine.rb, line 9 def restore_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'restoreVirtualMachine') else options.merge!('command' => 'restoreVirtualMachine', 'virtualmachineid' => args[0]) end request(options) end
revert a volume snapshot.
# File lib/fog/cosmic/requests/compute/revert_snapshot.rb, line 9 def revert_snapshot(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'revertSnapshot') else options.merge!('command' => 'revertSnapshot', 'id' => args[0]) end request(options) end
Revert VM from a vmsnapshot.
# File lib/fog/cosmic/requests/compute/revert_to_vm_snapshot.rb, line 9 def revert_to_vm_snapshot(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'revertToVMSnapshot') else options.merge!('command' => 'revertToVMSnapshot', 'vmsnapshotid' => args[0]) end request(options) end
Scale the service offering for a system vm (console proxy or secondary storage). The system vm must be in a “Stopped” state for this command to take effect.
# File lib/fog/cosmic/requests/compute/scale_system_vm.rb, line 9 def scale_system_vm(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'scaleSystemVm') else options.merge!('command' => 'scaleSystemVm', 'serviceofferingid' => args[0], 'id' => args[1]) end request(options) end
Scales the virtual machine to a new service offering.
# File lib/fog/cosmic/requests/compute/scale_virtual_machine.rb, line 9 def scale_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'scaleVirtualMachine') else options.merge!('command' => 'scaleVirtualMachine', 'serviceofferingid' => args[0], 'id' => args[1]) end request(options) end
Starts a router.
# File lib/fog/cosmic/requests/compute/start_router.rb, line 9 def start_router(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'startRouter') else options.merge!('command' => 'startRouter', 'id' => args[0]) end request(options) end
Starts a system virtual machine.
# File lib/fog/cosmic/requests/compute/start_system_vm.rb, line 9 def start_system_vm(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'startSystemVm') else options.merge!('command' => 'startSystemVm', 'id' => args[0]) end request(options) end
Starts a virtual machine.
# File lib/fog/cosmic/requests/compute/start_virtual_machine.rb, line 9 def start_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'startVirtualMachine') else options.merge!('command' => 'startVirtualMachine', 'id' => args[0]) end request(options) end
Stops a router.
# File lib/fog/cosmic/requests/compute/stop_router.rb, line 9 def stop_router(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'stopRouter') else options.merge!('command' => 'stopRouter', 'id' => args[0]) end request(options) end
Stops a system VM.
# File lib/fog/cosmic/requests/compute/stop_system_vm.rb, line 9 def stop_system_vm(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'stopSystemVm') else options.merge!('command' => 'stopSystemVm', 'id' => args[0]) end request(options) end
Stops a virtual machine.
# File lib/fog/cosmic/requests/compute/stop_virtual_machine.rb, line 9 def stop_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'stopVirtualMachine') else options.merge!('command' => 'stopVirtualMachine', 'id' => args[0]) end request(options) end
Suspends a project
# File lib/fog/cosmic/requests/compute/suspend_project.rb, line 9 def suspend_project(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'suspendProject') else options.merge!('command' => 'suspendProject', 'id' => args[0]) end request(options) end
Updates account information for the authenticated user
# File lib/fog/cosmic/requests/compute/update_account.rb, line 9 def update_account(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateAccount') else options.merge!('command' => 'updateAccount', 'newname' => args[0]) end request(options) end
Updates an existing cluster
# File lib/fog/cosmic/requests/compute/update_cluster.rb, line 9 def update_cluster(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateCluster') else options.merge!('command' => 'updateCluster', 'id' => args[0]) end request(options) end
Updates a configuration.
# File lib/fog/cosmic/requests/compute/update_configuration.rb, line 9 def update_configuration(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateConfiguration') else options.merge!('command' => 'updateConfiguration', 'name' => args[0]) end request(options) end
Changes the default NIC on a VM
# File lib/fog/cosmic/requests/compute/update_default_nic_for_virtual_machine.rb, line 9 def update_default_nic_for_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateDefaultNicForVirtualMachine') else options.merge!('command' => 'updateDefaultNicForVirtualMachine', 'nicid' => args[0], 'virtualmachineid' => args[1]) end request(options) end
Updates a disk offering.
# File lib/fog/cosmic/requests/compute/update_disk_offering.rb, line 9 def update_disk_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateDiskOffering') else options.merge!('command' => 'updateDiskOffering', 'id' => args[0]) end request(options) end
Updates a domain with a new name
# File lib/fog/cosmic/requests/compute/update_domain.rb, line 9 def update_domain(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateDomain') else options.merge!('command' => 'updateDomain', 'id' => args[0]) end request(options) end
Updates egress firewall rule
# File lib/fog/cosmic/requests/compute/update_egress_firewall_rule.rb, line 9 def update_egress_firewall_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateEgressFirewallRule') else options.merge!('command' => 'updateEgressFirewallRule', 'id' => args[0]) end request(options) end
Updates firewall rule
# File lib/fog/cosmic/requests/compute/update_firewall_rule.rb, line 9 def update_firewall_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateFirewallRule') else options.merge!('command' => 'updateFirewallRule', 'id' => args[0]) end request(options) end
Updates the information about Guest OS
# File lib/fog/cosmic/requests/compute/update_guest_os.rb, line 9 def update_guest_os(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateGuestOs') else options.merge!('command' => 'updateGuestOs', 'id' => args[0], 'osdisplayname' => args[1]) end request(options) end
Updates the information about Guest OS to Hypervisor specific name mapping
# File lib/fog/cosmic/requests/compute/update_guest_os_mapping.rb, line 9 def update_guest_os_mapping(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateGuestOsMapping') else options.merge!('command' => 'updateGuestOsMapping', 'osnameforhypervisor' => args[0], 'id' => args[1]) end request(options) end
Updates a host.
# File lib/fog/cosmic/requests/compute/update_host.rb, line 9 def update_host(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateHost') else options.merge!('command' => 'updateHost', 'id' => args[0]) end request(options) end
Update password of a host/pool on management server.
# File lib/fog/cosmic/requests/compute/update_host_password.rb, line 9 def update_host_password(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateHostPassword') else options.merge!('command' => 'updateHostPassword', 'username' => args[0], 'password' => args[1]) end request(options) end
Updates a hypervisor capabilities.
# File lib/fog/cosmic/requests/compute/update_hypervisor_capabilities.rb, line 9 def update_hypervisor_capabilities(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateHypervisorCapabilities') else options.merge!('command' => 'updateHypervisorCapabilities') end request(options) end
Updates a vm group
# File lib/fog/cosmic/requests/compute/update_instance_group.rb, line 9 def update_instance_group(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateInstanceGroup') else options.merge!('command' => 'updateInstanceGroup', 'id' => args[0]) end request(options) end
Updates an ip address
# File lib/fog/cosmic/requests/compute/update_ip_address.rb, line 9 def update_ip_address(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateIpAddress') else options.merge!('command' => 'updateIpAddress', 'id' => args[0]) end request(options) end
Updates an ISO file.
# File lib/fog/cosmic/requests/compute/update_iso.rb, line 9 def update_iso(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateIso') else options.merge!('command' => 'updateIso', 'id' => args[0]) end request(options) end
Updates iso permissions
# File lib/fog/cosmic/requests/compute/update_iso_permissions.rb, line 9 def update_iso_permissions(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateIsoPermissions') else options.merge!('command' => 'updateIsoPermissions', 'id' => args[0]) end request(options) end
Updates LB HealthCheck policy
# File lib/fog/cosmic/requests/compute/update_lb_health_check_policy.rb, line 9 def update_lb_health_check_policy(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateLBHealthCheckPolicy') else options.merge!('command' => 'updateLBHealthCheckPolicy', 'id' => args[0]) end request(options) end
Updates LB Stickiness policy
# File lib/fog/cosmic/requests/compute/update_lb_stickiness_policy.rb, line 9 def update_lb_stickiness_policy(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateLBStickinessPolicy') else options.merge!('command' => 'updateLBStickinessPolicy', 'id' => args[0]) end request(options) end
Updates load balancer
# File lib/fog/cosmic/requests/compute/update_load_balancer_rule.rb, line 9 def update_load_balancer_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateLoadBalancerRule') else options.merge!('command' => 'updateLoadBalancerRule', 'id' => args[0]) end request(options) end
Updates a network
# File lib/fog/cosmic/requests/compute/update_network.rb, line 9 def update_network(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateNetwork') else options.merge!('command' => 'updateNetwork', 'id' => args[0]) end request(options) end
Updates ACL Item with specified Id
# File lib/fog/cosmic/requests/compute/update_network_acl_item.rb, line 9 def update_network_acl_item(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateNetworkACLItem') else options.merge!('command' => 'updateNetworkACLItem', 'id' => args[0]) end request(options) end
Updates Network
ACL list
# File lib/fog/cosmic/requests/compute/update_network_acl_list.rb, line 9 def update_network_acl_list(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateNetworkACLList') else options.merge!('command' => 'updateNetworkACLList', 'id' => args[0]) end request(options) end
Updates a network offering.
# File lib/fog/cosmic/requests/compute/update_network_offering.rb, line 9 def update_network_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateNetworkOffering') else options.merge!('command' => 'updateNetworkOffering') end request(options) end
Updates a network serviceProvider of a physical network
# File lib/fog/cosmic/requests/compute/update_network_service_provider.rb, line 9 def update_network_service_provider(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateNetworkServiceProvider') else options.merge!('command' => 'updateNetworkServiceProvider', 'id' => args[0]) end request(options) end
Updates a physical network
# File lib/fog/cosmic/requests/compute/update_physical_network.rb, line 9 def update_physical_network(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updatePhysicalNetwork') else options.merge!('command' => 'updatePhysicalNetwork', 'id' => args[0]) end request(options) end
Updates a Pod.
# File lib/fog/cosmic/requests/compute/update_pod.rb, line 9 def update_pod(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updatePod') else options.merge!('command' => 'updatePod', 'id' => args[0]) end request(options) end
Updates a port forwarding rule. Only the private port and the virtual machine can be updated.
# File lib/fog/cosmic/requests/compute/update_port_forwarding_rule.rb, line 9 def update_port_forwarding_rule(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updatePortForwardingRule') else options.merge!('command' => 'updatePortForwardingRule', 'id' => args[0]) end request(options) end
Updates a project
# File lib/fog/cosmic/requests/compute/update_project.rb, line 9 def update_project(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateProject') else options.merge!('command' => 'updateProject', 'id' => args[0]) end request(options) end
Accepts or declines project invitation
# File lib/fog/cosmic/requests/compute/update_project_invitation.rb, line 9 def update_project_invitation(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateProjectInvitation') else options.merge!('command' => 'updateProjectInvitation', 'projectid' => args[0]) end request(options) end
Updates a region
# File lib/fog/cosmic/requests/compute/update_region.rb, line 9 def update_region(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateRegion') else options.merge!('command' => 'updateRegion', 'id' => args[0]) end request(options) end
Updates remote access vpn
# File lib/fog/cosmic/requests/compute/update_remote_access_vpn.rb, line 9 def update_remote_access_vpn(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateRemoteAccessVpn') else options.merge!('command' => 'updateRemoteAccessVpn', 'id' => args[0]) end request(options) end
Recalculate and update resource count for an account or domain.
# File lib/fog/cosmic/requests/compute/update_resource_count.rb, line 9 def update_resource_count(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateResourceCount') else options.merge!('command' => 'updateResourceCount', 'domainid' => args[0]) end request(options) end
Updates resource limits for an account or domain.
# File lib/fog/cosmic/requests/compute/update_resource_limit.rb, line 9 def update_resource_limit(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateResourceLimit') else options.merge!('command' => 'updateResourceLimit', 'resourcetype' => args[0]) end request(options) end
Updates a service offering.
# File lib/fog/cosmic/requests/compute/update_service_offering.rb, line 9 def update_service_offering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateServiceOffering') else options.merge!('command' => 'updateServiceOffering', 'id' => args[0]) end request(options) end
Update a Storage network IP range, only allowed when no IPs in this range have been allocated.
# File lib/fog/cosmic/requests/compute/update_storage_network_ip_range.rb, line 9 def update_storage_network_ip_range(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateStorageNetworkIpRange') else options.merge!('command' => 'updateStorageNetworkIpRange', 'id' => args[0]) end request(options) end
Updates a storage pool.
# File lib/fog/cosmic/requests/compute/update_storage_pool.rb, line 9 def update_storage_pool(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateStoragePool') else options.merge!('command' => 'updateStoragePool', 'id' => args[0]) end request(options) end
Updates attributes of a template.
# File lib/fog/cosmic/requests/compute/update_template.rb, line 9 def update_template(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateTemplate') else options.merge!('command' => 'updateTemplate', 'id' => args[0]) end request(options) end
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.
# File lib/fog/cosmic/requests/compute/update_template_permissions.rb, line 9 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
Updates a user account
# File lib/fog/cosmic/requests/compute/update_user.rb, line 9 def update_user(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateUser') else options.merge!('command' => 'updateUser', 'id' => args[0]) end request(options) end
Updates properties of a virtual machine. The VM has to be stopped and restarted for the new properties to take effect. UpdateVirtualMachine does not first check whether the VM is stopped. Therefore, stop the VM manually before issuing this call.
# File lib/fog/cosmic/requests/compute/update_virtual_machine.rb, line 9 def update_virtual_machine(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateVirtualMachine') else options.merge!('command' => 'updateVirtualMachine', 'id' => args[0]) end request(options) end
Updates the affinity/anti-affinity group associations of a virtual machine. The VM has to be stopped and restarted for the new properties to take effect.
# File lib/fog/cosmic/requests/compute/update_vm_affinity_group.rb, line 9 def update_vm_affinity_group(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateVMAffinityGroup') else options.merge!('command' => 'updateVMAffinityGroup', 'id' => args[0]) end request(options) end
Updates the volume.
# File lib/fog/cosmic/requests/compute/update_volume.rb, line 9 def update_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateVolume') else options.merge!('command' => 'updateVolume') end request(options) end
Updates a VPC
# File lib/fog/cosmic/requests/compute/update_vpc.rb, line 9 def update_vpc(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateVPC') else options.merge!('command' => 'updateVPC', 'id' => args[0]) end request(options) end
Updates VPC offering
# File lib/fog/cosmic/requests/compute/update_vpcoffering.rb, line 9 def update_vpcoffering(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateVPCOffering') else options.merge!('command' => 'updateVPCOffering', 'id' => args[0]) end request(options) end
Updates site to site vpn connection
# File lib/fog/cosmic/requests/compute/update_vpn_connection.rb, line 9 def update_vpn_connection(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateVpnConnection') else options.merge!('command' => 'updateVpnConnection', 'id' => args[0]) end request(options) end
Update site to site vpn customer gateway
# File lib/fog/cosmic/requests/compute/update_vpn_customer_gateway.rb, line 9 def update_vpn_customer_gateway(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateVpnCustomerGateway') else options.merge!('command' => 'updateVpnCustomerGateway', 'id' => args[0], 'gateway' => args[1], 'cidrlist' => args[2], 'ipsecpsk' => args[3], 'esppolicy' => args[4], 'ikepolicy' => args[5]) end request(options) end
Updates site to site vpn local gateway
# File lib/fog/cosmic/requests/compute/update_vpn_gateway.rb, line 9 def update_vpn_gateway(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateVpnGateway') else options.merge!('command' => 'updateVpnGateway', 'id' => args[0]) end request(options) end
Updates a Zone
.
# File lib/fog/cosmic/requests/compute/update_zone.rb, line 9 def update_zone(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'updateZone') else options.merge!('command' => 'updateZone', 'id' => args[0]) end request(options) end
Upgrades router to use newer template
# File lib/fog/cosmic/requests/compute/upgrade_router_template.rb, line 9 def upgrade_router_template(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'upgradeRouterTemplate') else options.merge!('command' => 'upgradeRouterTemplate') end request(options) end
Uploads a custom certificate for the console proxy VMs to use for SSL. Can be used to upload a single certificate signed by a known CA. Can also be used, through multiple calls, to upload a chain of certificates from CA to the custom certificate itself.
# File lib/fog/cosmic/requests/compute/upload_custom_certificate.rb, line 9 def upload_custom_certificate(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'uploadCustomCertificate') else options.merge!('command' => 'uploadCustomCertificate', 'domainsuffix' => args[0], 'certificate' => args[1]) end request(options) end
Upload a certificate to Cosmic
# File lib/fog/cosmic/requests/compute/upload_ssl_cert.rb, line 9 def upload_ssl_cert(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'uploadSslCert') else options.merge!('command' => 'uploadSslCert', 'certificate' => args[0], 'privatekey' => args[1]) end request(options) end
Uploads a data disk.
# File lib/fog/cosmic/requests/compute/upload_volume.rb, line 9 def upload_volume(*args) options = {} if args[0].is_a? Hash options = args[0] options.merge!('command' => 'uploadVolume') else options.merge!('command' => 'uploadVolume', 'url' => args[0], 'format' => args[1], 'zoneid' => args[2], 'name' => args[3]) end # add project id if we have one @cosmic_project_id ? options.merge!('projectid' => @cosmic_project_id) : nil request(options) end
Private Instance Methods
# File lib/fog/cosmic/compute.rb, line 474 def has_keys? @cosmic_api_key && @cosmic_secret_access_key end
# File lib/fog/cosmic/compute.rb, line 470 def has_session? @cosmic_session_id && @cosmic_session_key end
# File lib/fog/cosmic/compute.rb, line 499 def issue_request(params={},headers={},method='GET',expects=200) begin @connection.request({ :query => params, :headers => headers, :method => method, :expects => expects }) rescue Excon::Errors::HTTPStatusError => error error_response = Fog::JSON.decode(error.response.body) error_code = error_response.values.first['errorcode'] error_text = error_response.values.first['errortext'] case error_code when 401 raise Fog::Cosmic::Compute::Unauthorized, error_text when 431 raise Fog::Cosmic::Compute::BadRequest, error_text else raise Fog::Cosmic::Compute::Error, error_text end end end