From 8483a599f26389ba2415c124c352781bc5d61472 Mon Sep 17 00:00:00 2001 From: Paul Thornthwaite Date: Wed, 19 Feb 2014 12:30:59 +0000 Subject: [PATCH] Remove trailing whitespace --- .../dns/change_resource_record_sets.rb | 6 +- lib/fog/aws/parsers/dns/get_change.rb | 2 +- .../describe_reserved_cache_nodes.rb | 4 +- .../elb/describe_load_balancer_attributes.rb | 2 +- lib/fog/aws/parsers/emr/describe_job_flows.rb | 26 +++---- .../aws/parsers/iam/base_instance_profile.rb | 4 +- lib/fog/aws/parsers/iam/create_access_key.rb | 2 +- lib/fog/aws/parsers/iam/get_group.rb | 4 +- lib/fog/aws/parsers/iam/instance_profile.rb | 4 +- .../aws/parsers/iam/list_instance_profiles.rb | 2 +- lib/fog/aws/parsers/iam/list_roles.rb | 4 +- .../parsers/iam/list_signing_certificates.rb | 2 +- lib/fog/aws/parsers/iam/role_parser.rb | 2 +- lib/fog/aws/parsers/iam/single_role.rb | 2 +- lib/fog/aws/parsers/iam/update_user.rb | 2 +- lib/fog/aws/parsers/rds/base.rb | 2 +- lib/fog/aws/parsers/rds/create_db_instance.rb | 6 +- .../rds/create_db_instance_read_replica.rb | 6 +- lib/fog/aws/parsers/rds/create_db_snapshot.rb | 4 +- .../parsers/rds/db_engine_version_parser.rb | 6 +- lib/fog/aws/parsers/rds/db_parser.rb | 20 ++--- lib/fog/aws/parsers/rds/delete_db_instance.rb | 6 +- lib/fog/aws/parsers/rds/delete_db_snapshot.rb | 2 +- .../rds/describe_db_engine_versions.rb | 4 +- .../aws/parsers/rds/describe_db_instances.rb | 2 +- .../rds/describe_db_parameter_groups.rb | 4 +- .../aws/parsers/rds/describe_db_parameters.rb | 4 +- .../rds/describe_db_reserved_instances.rb | 2 +- .../aws/parsers/rds/describe_db_snapshots.rb | 4 +- lib/fog/aws/parsers/rds/event_list.rb | 2 +- lib/fog/aws/parsers/rds/modify_db_instance.rb | 4 +- lib/fog/aws/parsers/rds/reboot_db_instance.rb | 6 +- lib/fog/aws/parsers/rds/snapshot_parser.rb | 4 +- .../aws/parsers/redshift/cluster_parser.rb | 10 +-- .../redshift/cluster_security_group_parser.rb | 8 +- .../aws/parsers/redshift/cluster_snapshot.rb | 6 +- .../redshift/cluster_snapshot_parser.rb | 6 +- .../redshift/cluster_subnet_group_parser.rb | 6 +- .../create_cluster_parameter_group.rb | 6 +- .../redshift/create_cluster_security_group.rb | 6 +- .../describe_cluster_parameter_groups.rb | 6 +- .../redshift/describe_cluster_parameters.rb | 8 +- .../describe_cluster_security_groups.rb | 6 +- .../redshift/describe_cluster_snapshots.rb | 6 +- .../describe_cluster_subnet_groups.rb | 6 +- .../redshift/describe_cluster_versions.rb | 10 +-- .../describe_default_cluster_parameters.rb | 8 +- .../aws/parsers/redshift/describe_events.rb | 6 +- .../describe_orderable_cluster_options.rb | 8 +- .../describe_reserved_node_offerings.rb | 4 +- .../redshift/describe_reserved_nodes.rb | 28 +++---- .../aws/parsers/redshift/describe_resize.rb | 6 +- .../purchase_reserved_node_offering.rb | 8 +- .../revoke_cluster_security_group_ingress.rb | 6 +- .../update_cluster_parameter_group_parser.rb | 6 +- lib/fog/aws/parsers/simpledb/basic.rb | 2 +- .../aws/parsers/simpledb/domain_metadata.rb | 4 +- lib/fog/aws/parsers/simpledb/list_domains.rb | 2 +- lib/fog/aws/parsers/simpledb/select.rb | 2 +- .../parsers/storage/get_bucket_lifecycle.rb | 4 +- lib/fog/aws/redshift.rb | 22 +++--- lib/fog/aws/region_methods.rb | 2 +- .../auto_scaling/create_auto_scaling_group.rb | 4 +- .../describe_launch_configurations.rb | 2 +- .../describe_scheduled_actions.rb | 4 +- .../aws/requests/cdn/delete_distribution.rb | 2 +- .../cdn/delete_streaming_distribution.rb | 2 +- lib/fog/aws/requests/cdn/get_distribution.rb | 2 +- .../aws/requests/cdn/get_distribution_list.rb | 2 +- lib/fog/aws/requests/cdn/get_invalidation.rb | 8 +- .../aws/requests/cdn/get_invalidation_list.rb | 4 +- .../cdn/get_streaming_distribution.rb | 2 +- .../cdn/get_streaming_distribution_list.rb | 4 +- lib/fog/aws/requests/cdn/post_distribution.rb | 6 +- lib/fog/aws/requests/cdn/post_invalidation.rb | 2 +- .../cdn/post_streaming_distribution.rb | 4 +- .../requests/cdn/put_distribution_config.rb | 2 +- .../cdn/put_streaming_distribution_config.rb | 4 +- .../requests/cloud_formation/create_stack.rb | 6 +- .../requests/cloud_formation/delete_stack.rb | 2 +- .../cloud_formation/describe_stack_events.rb | 2 +- .../describe_stack_resources.rb | 2 +- .../cloud_formation/describe_stacks.rb | 2 +- .../requests/cloud_formation/get_template.rb | 2 +- .../cloud_formation/list_stack_resources.rb | 4 +- .../requests/cloud_formation/list_stacks.rb | 4 +- .../aws/requests/cloud_watch/delete_alarms.rb | 2 +- .../cloud_watch/describe_alarm_history.rb | 4 +- .../requests/cloud_watch/describe_alarms.rb | 4 +- .../cloud_watch/describe_alarms_for_metric.rb | 4 +- .../cloud_watch/disable_alarm_actions.rb | 4 +- .../cloud_watch/enable_alarm_actions.rb | 4 +- .../requests/cloud_watch/set_alarm_state.rb | 2 +- .../compute/assign_private_ip_addresses.rb | 6 +- .../aws/requests/compute/associate_address.rb | 2 +- .../compute/associate_dhcp_options.rb | 4 +- .../requests/compute/associate_route_table.rb | 6 +- .../compute/attach_network_interface.rb | 2 +- lib/fog/aws/requests/compute/create_image.rb | 10 +-- .../compute/create_internet_gateway.rb | 4 +- .../compute/create_network_interface.rb | 6 +- lib/fog/aws/requests/compute/create_route.rb | 14 ++-- .../requests/compute/create_route_table.rb | 10 +-- lib/fog/aws/requests/compute/create_vpc.rb | 10 +-- .../requests/compute/delete_dhcp_options.rb | 8 +- .../compute/delete_internet_gateway.rb | 4 +- .../requests/compute/delete_network_acl.rb | 2 +- .../compute/delete_network_acl_entry.rb | 2 +- .../compute/delete_network_interface.rb | 2 +- lib/fog/aws/requests/compute/delete_route.rb | 10 +-- lib/fog/aws/requests/compute/delete_subnet.rb | 6 +- lib/fog/aws/requests/compute/delete_vpc.rb | 2 +- .../aws/requests/compute/deregister_image.rb | 4 +- .../compute/describe_availability_zones.rb | 2 +- .../requests/compute/describe_dhcp_options.rb | 2 +- .../compute/describe_internet_gateways.rb | 2 +- .../describe_network_interface_attribute.rb | 2 +- .../compute/describe_network_interfaces.rb | 6 +- .../describe_reserved_instances_offerings.rb | 4 +- .../aws/requests/compute/describe_subnets.rb | 2 +- lib/fog/aws/requests/compute/describe_tags.rb | 14 ++-- .../compute/detach_network_interface.rb | 2 +- .../compute/disassociate_route_table.rb | 4 +- .../compute/modify_instance_attribute.rb | 2 +- .../modify_network_interface_attribute.rb | 4 +- .../compute/modify_snapshot_attribute.rb | 2 +- .../requests/compute/modify_vpc_attribute.rb | 4 +- .../replace_network_acl_association.rb | 2 +- .../reset_network_interface_attribute.rb | 4 +- .../requests/compute/unmonitor_instances.rb | 2 +- .../requests/data_pipeline/list_pipelines.rb | 2 +- .../dns/change_resource_record_sets.rb | 2 +- .../elasticache/create_cache_subnet_group.rb | 4 +- .../describe_reserved_cache_nodes.rb | 4 +- .../elb/describe_load_balancer_attributes.rb | 2 +- .../elb/modify_load_balancer_attributes.rb | 2 +- .../aws/requests/emr/add_instance_groups.rb | 6 +- .../aws/requests/emr/add_job_flow_steps.rb | 6 +- .../aws/requests/emr/describe_job_flows.rb | 8 +- .../requests/emr/modify_instance_groups.rb | 6 +- lib/fog/aws/requests/emr/run_job_flow.rb | 18 ++--- .../emr/set_termination_protection.rb | 4 +- .../aws/requests/emr/terminate_job_flows.rb | 4 +- .../iam/add_role_to_instance_profile.rb | 2 +- lib/fog/aws/requests/iam/add_user_to_group.rb | 2 +- lib/fog/aws/requests/iam/create_access_key.rb | 2 +- lib/fog/aws/requests/iam/create_group.rb | 2 +- .../requests/iam/create_instance_profile.rb | 4 +- .../aws/requests/iam/create_login_profile.rb | 2 +- lib/fog/aws/requests/iam/create_role.rb | 6 +- lib/fog/aws/requests/iam/create_user.rb | 2 +- lib/fog/aws/requests/iam/delete_access_key.rb | 2 +- lib/fog/aws/requests/iam/delete_group.rb | 2 +- .../aws/requests/iam/delete_group_policy.rb | 2 +- .../requests/iam/delete_instance_profile.rb | 2 +- .../aws/requests/iam/delete_login_profile.rb | 2 +- lib/fog/aws/requests/iam/delete_role.rb | 2 +- .../aws/requests/iam/delete_role_policy.rb | 2 +- lib/fog/aws/requests/iam/delete_user.rb | 2 +- .../aws/requests/iam/delete_user_policy.rb | 2 +- lib/fog/aws/requests/iam/get_group.rb | 8 +- .../aws/requests/iam/get_instance_profile.rb | 4 +- lib/fog/aws/requests/iam/get_login_profile.rb | 2 +- lib/fog/aws/requests/iam/get_role.rb | 6 +- lib/fog/aws/requests/iam/get_role_policy.rb | 2 +- lib/fog/aws/requests/iam/get_user.rb | 6 +- lib/fog/aws/requests/iam/list_access_keys.rb | 2 +- .../aws/requests/iam/list_account_aliases.rb | 2 +- .../aws/requests/iam/list_group_policies.rb | 2 +- lib/fog/aws/requests/iam/list_groups.rb | 2 +- .../aws/requests/iam/list_groups_for_user.rb | 2 +- .../requests/iam/list_instance_profiles.rb | 6 +- .../iam/list_instance_profiles_for_role.rb | 4 +- .../aws/requests/iam/list_role_policies.rb | 4 +- lib/fog/aws/requests/iam/list_roles.rb | 6 +- .../aws/requests/iam/list_user_policies.rb | 2 +- lib/fog/aws/requests/iam/list_users.rb | 2 +- lib/fog/aws/requests/iam/put_role_policy.rb | 2 +- .../iam/remove_role_from_instance_profile.rb | 2 +- .../requests/iam/remove_user_from_group.rb | 2 +- lib/fog/aws/requests/iam/update_access_key.rb | 2 +- .../aws/requests/iam/update_login_profile.rb | 2 +- lib/fog/aws/requests/iam/update_user.rb | 2 +- .../authorize_db_security_group_ingress.rb | 8 +- .../aws/requests/rds/create_db_instance.rb | 8 +- .../rds/create_db_instance_read_replica.rb | 6 +- .../requests/rds/create_db_parameter_group.rb | 12 +-- .../requests/rds/create_db_security_group.rb | 4 +- .../aws/requests/rds/create_db_snapshot.rb | 2 +- .../aws/requests/rds/delete_db_instance.rb | 8 +- .../requests/rds/delete_db_parameter_group.rb | 6 +- .../requests/rds/delete_db_security_group.rb | 2 +- .../aws/requests/rds/delete_db_snapshot.rb | 4 +- .../rds/describe_db_engine_versions.rb | 4 +- .../rds/describe_db_parameter_groups.rb | 4 +- .../requests/rds/describe_db_parameters.rb | 2 +- .../rds/describe_db_reserved_instances.rb | 2 +- .../aws/requests/rds/describe_db_snapshots.rb | 2 +- lib/fog/aws/requests/rds/describe_events.rb | 2 +- .../aws/requests/rds/modify_db_instance.rb | 10 +-- .../requests/rds/modify_db_parameter_group.rb | 10 +-- .../requests/rds/remove_tags_from_resource.rb | 2 +- .../rds/revoke_db_security_group_ingress.rb | 6 +- ...uthorize_cluster_security_group_ingress.rb | 28 +++---- .../redshift/authorize_snapshot_access.rb | 10 +-- .../redshift/copy_cluster_snapshot.rb | 12 +-- .../aws/requests/redshift/create_cluster.rb | 78 +++++++++---------- .../create_cluster_parameter_group.rb | 26 +++---- .../redshift/create_cluster_security_group.rb | 10 +-- .../redshift/create_cluster_snapshot.rb | 12 +-- .../redshift/create_cluster_subnet_group.rb | 12 +-- .../aws/requests/redshift/delete_cluster.rb | 22 +++--- .../delete_cluster_parameter_group.rb | 6 +- .../redshift/delete_cluster_security_group.rb | 6 +- .../redshift/delete_cluster_snapshot.rb | 12 +-- .../redshift/delete_cluster_subnet_group.rb | 8 +- .../describe_cluster_parameter_groups.rb | 18 ++--- .../redshift/describe_cluster_parameters.rb | 26 +++---- .../describe_cluster_security_groups.rb | 16 ++-- .../redshift/describe_cluster_snapshots.rb | 32 ++++---- .../describe_cluster_subnet_groups.rb | 16 ++-- .../redshift/describe_cluster_versions.rb | 20 ++--- .../requests/redshift/describe_clusters.rb | 18 ++--- .../describe_default_cluster_parameters.rb | 16 ++-- .../aws/requests/redshift/describe_events.rb | 56 ++++++------- .../describe_orderable_cluster_options.rb | 22 +++--- .../describe_reserved_node_offerings.rb | 16 ++-- .../redshift/describe_reserved_nodes.rb | 16 ++-- .../aws/requests/redshift/describe_resize.rb | 10 +-- .../aws/requests/redshift/modify_cluster.rb | 50 ++++++------ .../modify_cluster_parameter_group.rb | 6 +- .../redshift/modify_cluster_subnet_group.rb | 12 +-- .../purchase_reserved_node_offering.rb | 6 +- .../aws/requests/redshift/reboot_cluster.rb | 12 +-- .../redshift/reset_cluster_parameter_group.rb | 2 +- .../redshift/restore_from_cluster_snapshot.rb | 34 ++++---- .../revoke_cluster_security_group_ingress.rb | 28 +++---- .../redshift/revoke_snapshot_access.rb | 8 +- .../aws/requests/simpledb/create_domain.rb | 2 +- .../aws/requests/simpledb/delete_domain.rb | 2 +- .../aws/requests/simpledb/domain_metadata.rb | 4 +- lib/fog/aws/requests/simpledb/select.rb | 2 +- .../requests/sqs/change_message_visibility.rb | 8 +- lib/fog/aws/requests/sqs/create_queue.rb | 8 +- lib/fog/aws/requests/sqs/delete_message.rb | 2 +- lib/fog/aws/requests/sqs/delete_queue.rb | 12 +-- .../aws/requests/sqs/get_queue_attributes.rb | 8 +- lib/fog/aws/requests/sqs/list_queues.rb | 4 +- lib/fog/aws/requests/sqs/receive_message.rb | 8 +- lib/fog/aws/requests/sqs/send_message.rb | 14 ++-- .../aws/requests/sqs/set_queue_attributes.rb | 2 +- .../storage/abort_multipart_upload.rb | 2 +- lib/fog/aws/requests/storage/copy_object.rb | 6 +- .../requests/storage/delete_bucket_policy.rb | 2 +- .../storage/delete_multiple_objects.rb | 2 +- .../requests/storage/get_bucket_website.rb | 2 +- lib/fog/aws/requests/storage/head_object.rb | 10 +-- .../storage/initiate_multipart_upload.rb | 6 +- .../storage/post_object_hidden_fields.rb | 2 +- lib/fog/aws/requests/storage/put_bucket.rb | 2 +- .../aws/requests/storage/put_bucket_acl.rb | 8 +- .../requests/storage/put_bucket_lifecycle.rb | 16 ++-- lib/fog/aws/requests/storage/put_object.rb | 2 +- .../aws/requests/storage/put_object_acl.rb | 10 +-- lib/fog/aws/requests/storage/sync_clock.rb | 2 +- lib/fog/aws/requests/sts/assume_role.rb | 4 +- lib/fog/aws/simpledb.rb | 2 +- lib/fog/aws/sqs.rb | 4 +- .../requests/compute/list_images.rb | 2 +- lib/fog/bin/aws.rb | 2 +- lib/fog/bin/bare_metal_cloud.rb | 2 +- lib/fog/bin/brightbox.rb | 2 +- lib/fog/bin/clodo.rb | 2 +- lib/fog/bin/cloudsigma.rb | 2 +- lib/fog/bin/ecloud.rb | 2 +- lib/fog/bin/go_grid.rb | 2 +- lib/fog/bin/google.rb | 2 +- lib/fog/bin/local.rb | 2 +- lib/fog/bin/rackspace.rb | 2 +- lib/fog/bin/stormondemand.rb | 4 +- lib/fog/bin/zerigo.rb | 2 +- lib/fog/bluebox/models/blb/lb_application.rb | 2 +- lib/fog/bluebox/models/blb/lb_backend.rb | 2 +- lib/fog/bluebox/models/blb/lb_service.rb | 2 +- lib/fog/bluebox/models/compute/location.rb | 2 +- .../bluebox/requests/blb/get_lb_machine.rb | 2 +- .../bluebox/requests/blb/get_lb_machines.rb | 2 +- .../blb/remove_machine_from_lb_backend.rb | 2 +- .../clodo/requests/compute/create_server.rb | 2 +- .../requests/compute/delete_ip_address.rb | 2 +- lib/fog/cloudsigma/connection.rb | 2 +- lib/fog/cloudsigma/error.rb | 2 +- lib/fog/cloudsigma/mock_data.rb | 2 +- lib/fog/cloudsigma/models/lib_volume.rb | 2 +- lib/fog/cloudsigma/models/price_record.rb | 2 +- lib/fog/cloudsigma/models/pricing.rb | 2 +- lib/fog/cloudsigma/models/profile.rb | 2 +- lib/fog/cloudsigma/models/volume.rb | 2 +- lib/fog/cloudsigma/nested_model.rb | 2 +- lib/fog/cloudstack/compute.rb | 4 +- .../compute/assign_to_load_balancer_rule.rb | 2 +- .../requests/compute/delete_snapshot.rb | 2 +- .../compute/generate_usage_records.rb | 6 +- .../requests/compute/get_vm_password.rb | 2 +- .../requests/compute/list_accounts.rb | 2 +- .../requests/compute/list_alerts.rb | 2 +- .../requests/compute/list_capacity.rb | 2 +- .../requests/compute/list_clusters.rb | 2 +- .../requests/compute/list_configurations.rb | 2 +- .../requests/compute/list_disk_offerings.rb | 2 +- .../requests/compute/list_domain_children.rb | 2 +- .../requests/compute/list_domains.rb | 2 +- .../requests/compute/list_events.rb | 2 +- .../compute/list_external_firewalls.rb | 2 +- .../compute/list_external_load_balancers.rb | 2 +- .../cloudstack/requests/compute/list_hosts.rb | 2 +- .../requests/compute/list_hypervisors.rb | 2 +- .../requests/compute/list_instance_groups.rb | 2 +- .../cloudstack/requests/compute/list_isos.rb | 2 +- .../list_load_balancer_rule_instances.rb | 2 +- .../compute/list_load_balancer_rules.rb | 2 +- .../compute/list_network_offerings.rb | 2 +- .../requests/compute/list_networks.rb | 2 +- .../requests/compute/list_os_categories.rb | 2 +- .../requests/compute/list_os_types.rb | 2 +- .../cloudstack/requests/compute/list_pods.rb | 2 +- .../compute/list_port_forwarding_rules.rb | 2 +- .../compute/list_public_ip_addresses.rb | 2 +- .../requests/compute/list_resource_limits.rb | 2 +- .../compute/list_snapshot_policies.rb | 2 +- .../requests/compute/list_snapshots.rb | 2 +- .../requests/compute/list_ssh_key_pairs.rb | 2 +- .../requests/compute/list_storage_pools.rb | 2 +- .../requests/compute/list_usage_records.rb | 6 +- .../cloudstack/requests/compute/list_users.rb | 2 +- .../compute/remove_from_load_balancer_rule.rb | 2 +- .../reset_password_for_virtual_machine.rb | 2 +- lib/fog/digitalocean/compute.rb | 4 +- .../digitalocean/examples/getting_started.md | 6 +- lib/fog/digitalocean/models/compute/flavor.rb | 2 +- lib/fog/digitalocean/models/compute/image.rb | 2 +- lib/fog/digitalocean/models/compute/region.rb | 2 +- .../digitalocean/models/compute/ssh_key.rb | 2 +- .../digitalocean/models/compute/ssh_keys.rb | 2 +- .../requests/compute/destroy_ssh_key.rb | 2 +- .../requests/compute/get_ssh_key.rb | 2 +- .../requests/compute/list_flavors.rb | 2 +- .../requests/compute/list_regions.rb | 2 +- .../requests/compute/list_servers.rb | 2 +- .../requests/compute/list_ssh_keys.rb | 2 +- lib/fog/dnsimple/requests/dns/get_domain.rb | 2 +- .../requests/dns/create_secondary.rb | 4 +- .../dreamhost/examples/dns/getting_started.md | 6 +- lib/fog/dreamhost/models/dns/record.rb | 2 +- lib/fog/dreamhost/models/dns/zone.rb | 6 +- lib/fog/dreamhost/models/dns/zones.rb | 2 +- .../dreamhost/requests/dns/create_record.rb | 2 +- .../dreamhost/requests/dns/delete_record.rb | 4 +- .../dreamhost/requests/dns/list_records.rb | 2 +- lib/fog/ecloud/mock_data_classes.rb | 2 +- lib/fog/ecloud/models/compute/api_key.rb | 2 +- .../models/compute/authentication_level.rb | 4 +- .../models/compute/catalog_configuration.rb | 2 +- .../ecloud/models/compute/cpu_usage_detail.rb | 2 +- .../ecloud/models/compute/guest_process.rb | 2 +- lib/fog/ecloud/models/compute/login_banner.rb | 2 +- .../models/compute/memory_usage_detail.rb | 2 +- .../ecloud/models/compute/operating_system.rb | 2 +- .../compute/password_complexity_rule.rb | 2 +- .../ecloud/models/compute/physical_device.rb | 2 +- lib/fog/ecloud/models/compute/role.rb | 2 +- .../compute/server_configuration_option.rb | 2 +- .../models/compute/storage_usage_detail.rb | 2 +- .../ecloud/models/compute/support_ticket.rb | 2 +- .../compute/admin_edit_login_banner.rb | 4 +- .../admin_edit_password_complexity_rules.rb | 4 +- .../compute/backup_internet_service_create.rb | 4 +- .../compute/backup_internet_service_edit.rb | 4 +- .../requests/compute/compute_pool_edit.rb | 2 +- .../requests/compute/firewall_acls_create.rb | 4 +- .../requests/compute/internet_service_edit.rb | 2 +- .../requests/compute/monitors_create_ecv.rb | 2 +- .../requests/compute/monitors_create_http.rb | 2 +- .../requests/compute/monitors_create_ping.rb | 2 +- .../requests/compute/monitors_edit_ecv.rb | 2 +- .../requests/compute/monitors_edit_http.rb | 2 +- .../requests/compute/monitors_edit_ping.rb | 2 +- .../requests/compute/node_service_edit.rb | 2 +- .../rnat_associations_create_device.rb | 2 +- .../compute/rnat_associations_edit_network.rb | 2 +- .../compute/trusted_network_groups_create.rb | 4 +- .../compute/trusted_network_groups_edit.rb | 4 +- .../requests/compute/virtual_machine_copy.rb | 6 +- .../requests/compute/virtual_machine_edit.rb | 2 +- lib/fog/google/examples/metadata.rb | 2 +- lib/fog/google/models/compute/images.rb | 2 +- .../requests/compute/delete_snapshot.rb | 2 +- .../requests/storage/get_object_http_url.rb | 2 +- .../requests/storage/get_object_https_url.rb | 2 +- .../google/requests/storage/put_bucket_acl.rb | 2 +- .../google/requests/storage/put_object_acl.rb | 2 +- lib/fog/hp/README.md | 4 +- lib/fog/hp/compute.rb | 2 +- lib/fog/hp/compute_v2.rb | 2 +- lib/fog/hp/docs/connect.md | 12 +-- lib/fog/hp/docs/install.md | 24 +++--- lib/fog/hp/examples/block_storage.md | 12 +-- lib/fog/hp/examples/block_storage_v2.md | 48 ++++++------ lib/fog/hp/examples/cdn.md | 10 +-- lib/fog/hp/examples/compute.md | 50 ++++++------ lib/fog/hp/examples/compute_v2.md | 70 ++++++++--------- lib/fog/hp/examples/networking.md | 16 ++-- lib/fog/hp/examples/object_storage.md | 48 ++++++------ lib/fog/hp/models/storage/directory.rb | 4 +- lib/fog/hp/models/storage/file.rb | 4 +- lib/fog/hp/models/storage/files.rb | 10 +-- .../requests/block_storage/create_snapshot.rb | 2 +- .../requests/block_storage/create_volume.rb | 2 +- .../requests/block_storage/delete_snapshot.rb | 2 +- .../requests/block_storage/delete_volume.rb | 2 +- .../get_bootable_volume_details.rb | 2 +- .../block_storage/get_snapshot_details.rb | 2 +- .../block_storage/get_volume_details.rb | 2 +- .../block_storage/list_bootable_volumes.rb | 2 +- .../requests/block_storage/list_snapshots.rb | 2 +- .../hp/requests/block_storage/list_volumes.rb | 2 +- .../block_storage_v2/create_snapshot.rb | 2 +- .../block_storage_v2/create_volume.rb | 2 +- .../block_storage_v2/create_volume_backup.rb | 2 +- .../block_storage_v2/delete_snapshot.rb | 2 +- .../block_storage_v2/delete_volume.rb | 2 +- .../block_storage_v2/delete_volume_backup.rb | 2 +- .../block_storage_v2/get_snapshot_details.rb | 2 +- .../get_volume_backup_details.rb | 2 +- .../block_storage_v2/get_volume_details.rb | 2 +- .../block_storage_v2/list_snapshots.rb | 2 +- .../block_storage_v2/list_snapshots_detail.rb | 2 +- .../block_storage_v2/list_volume_backups.rb | 2 +- .../list_volume_backups_detail.rb | 2 +- .../requests/block_storage_v2/list_volumes.rb | 2 +- .../block_storage_v2/list_volumes_detail.rb | 2 +- .../block_storage_v2/restore_volume_backup.rb | 2 +- .../block_storage_v2/update_snapshot.rb | 2 +- .../block_storage_v2/update_volume.rb | 2 +- lib/fog/hp/requests/cdn/delete_container.rb | 2 +- .../requests/compute/get_windows_password.rb | 2 +- .../compute_v2/get_windows_password.rb | 2 +- lib/fog/hp/requests/dns/delete_domain.rb | 2 +- lib/fog/hp/requests/dns/delete_record.rb | 2 +- lib/fog/hp/requests/dns/update_domain.rb | 2 +- lib/fog/hp/requests/dns/update_record.rb | 2 +- .../hp/requests/lb/delete_load_balancer.rb | 2 +- lib/fog/hp/requests/lb/get_load_balancer.rb | 2 +- .../hp/requests/lb/get_load_balancer_node.rb | 2 +- lib/fog/hp/requests/lb/list_algorithms.rb | 2 +- lib/fog/hp/requests/lb/list_limits.rb | 2 +- .../lb/list_load_balancer_virtual_ips.rb | 2 +- lib/fog/hp/requests/lb/list_load_balancers.rb | 2 +- lib/fog/hp/requests/lb/list_protocols.rb | 2 +- .../requests/network/add_router_interface.rb | 2 +- lib/fog/hp/requests/network/create_network.rb | 2 +- lib/fog/hp/requests/network/create_port.rb | 2 +- lib/fog/hp/requests/network/create_router.rb | 2 +- lib/fog/hp/requests/network/create_subnet.rb | 2 +- lib/fog/hp/requests/network/delete_network.rb | 2 +- lib/fog/hp/requests/network/delete_port.rb | 2 +- lib/fog/hp/requests/network/delete_router.rb | 2 +- lib/fog/hp/requests/network/delete_subnet.rb | 2 +- lib/fog/hp/requests/network/get_network.rb | 2 +- lib/fog/hp/requests/network/get_port.rb | 2 +- lib/fog/hp/requests/network/get_router.rb | 2 +- lib/fog/hp/requests/network/get_subnet.rb | 2 +- lib/fog/hp/requests/network/list_networks.rb | 2 +- lib/fog/hp/requests/network/list_ports.rb | 2 +- lib/fog/hp/requests/network/list_routers.rb | 2 +- lib/fog/hp/requests/network/list_subnets.rb | 2 +- .../network/remove_router_interface.rb | 2 +- lib/fog/hp/requests/network/update_port.rb | 2 +- lib/fog/hp/requests/network/update_router.rb | 2 +- lib/fog/hp/requests/network/update_subnet.rb | 2 +- .../requests/storage/get_object_temp_url.rb | 2 +- lib/fog/hp/simple_http_instrumentor.rb | 2 +- lib/fog/hp/storage.rb | 24 +++--- .../ibm/requests/compute/create_instance.rb | 2 +- .../internet_archive/models/storage/file.rb | 52 ++++++------- .../models/storage/ia_attributes.rb | 2 +- .../parsers/storage/get_bucket_lifecycle.rb | 4 +- .../storage/abort_multipart_upload.rb | 4 +- .../requests/storage/copy_object.rb | 6 +- .../requests/storage/delete_bucket_policy.rb | 2 +- .../storage/delete_multiple_objects.rb | 2 +- .../requests/storage/get_bucket_website.rb | 2 +- .../requests/storage/head_object.rb | 10 +-- .../storage/initiate_multipart_upload.rb | 6 +- .../storage/post_object_hidden_fields.rb | 2 +- .../requests/storage/put_bucket.rb | 2 +- .../requests/storage/put_bucket_acl.rb | 8 +- .../requests/storage/put_bucket_lifecycle.rb | 16 ++-- .../requests/storage/put_object.rb | 2 +- .../requests/storage/put_object_acl.rb | 8 +- .../requests/storage/sync_clock.rb | 2 +- lib/fog/libvirt/models/compute/README.md | 2 +- .../models/compute/templates/network.xml.erb | 2 +- .../models/compute/templates/pool.xml.erb | 2 +- .../requests/compute/mock_files/domain.xml | 2 +- lib/fog/linode/compute.rb | 4 +- lib/fog/linode/models/compute/flavor.rb | 4 +- .../requests/compute/stackscript_list.rb | 4 +- lib/fog/openstack/CHANGELOG.md | 2 +- lib/fog/openstack/docs/getting_started.md | 8 +- lib/fog/openstack/docs/storage.md | 2 +- lib/fog/openstack/examples/identity/basics.rb | 2 +- .../network/network_subnets_routers.rb | 4 +- .../examples/storage/set-account-quota.rb | 12 +-- .../models/network/lb_health_monitor.rb | 2 +- .../models/network/lb_health_monitors.rb | 2 +- lib/fog/openstack/models/network/lb_member.rb | 2 +- .../openstack/models/network/lb_members.rb | 2 +- lib/fog/openstack/models/network/lb_pools.rb | 2 +- lib/fog/openstack/models/network/lb_vips.rb | 2 +- lib/fog/openstack/models/network/router.rb | 4 +- lib/fog/openstack/models/storage/file.rb | 6 +- .../requests/compute/add_security_group.rb | 2 +- .../requests/compute/get_host_details.rb | 6 +- .../requests/compute/list_address_pools.rb | 2 +- .../openstack/requests/compute/list_usages.rb | 4 +- .../requests/compute/remove_security_group.rb | 2 +- .../requests/compute/set_metadata.rb | 4 +- .../requests/compute/update_metadata.rb | 4 +- .../openstack/requests/identity/list_users.rb | 4 +- .../network/associate_lb_health_monitor.rb | 2 +- .../network/create_lb_health_monitor.rb | 2 +- .../requests/network/create_lb_member.rb | 2 +- .../requests/network/create_lb_pool.rb | 2 +- .../requests/network/create_lb_vip.rb | 2 +- .../requests/network/create_network.rb | 10 +-- .../openstack/requests/network/create_port.rb | 2 +- .../requests/network/create_router.rb | 2 +- .../requests/network/create_subnet.rb | 2 +- .../network/delete_lb_health_monitor.rb | 2 +- .../requests/network/delete_lb_member.rb | 2 +- .../requests/network/delete_lb_pool.rb | 2 +- .../requests/network/delete_lb_vip.rb | 2 +- .../requests/network/delete_network.rb | 2 +- .../openstack/requests/network/delete_port.rb | 2 +- .../requests/network/delete_subnet.rb | 2 +- .../network/disassociate_lb_health_monitor.rb | 2 +- .../requests/network/get_lb_health_monitor.rb | 2 +- .../requests/network/get_lb_member.rb | 2 +- .../openstack/requests/network/get_lb_pool.rb | 2 +- .../requests/network/get_lb_pool_stats.rb | 2 +- .../openstack/requests/network/get_lb_vip.rb | 2 +- .../openstack/requests/network/get_port.rb | 2 +- .../openstack/requests/network/get_subnet.rb | 2 +- .../network/list_lb_health_monitors.rb | 2 +- .../requests/network/list_lb_members.rb | 2 +- .../requests/network/list_lb_pools.rb | 2 +- .../requests/network/list_lb_vips.rb | 2 +- .../requests/network/list_networks.rb | 2 +- .../openstack/requests/network/list_ports.rb | 2 +- .../requests/network/list_subnets.rb | 2 +- .../openstack/requests/network/set_tenant.rb | 2 +- .../network/update_lb_health_monitor.rb | 2 +- .../requests/network/update_lb_member.rb | 2 +- .../requests/network/update_lb_pool.rb | 2 +- .../requests/network/update_lb_vip.rb | 2 +- .../openstack/requests/network/update_port.rb | 2 +- .../requests/network/update_router.rb | 8 +- .../requests/network/update_subnet.rb | 2 +- .../requests/storage/get_object_http_url.rb | 2 +- .../requests/storage/get_object_https_url.rb | 12 +-- .../requests/volume/delete_volume.rb | 2 +- .../requests/volume/get_snapshot_details.rb | 2 +- lib/fog/openvz/README.md | 2 +- lib/fog/ovirt/models/compute/server.rb | 2 +- .../ovirt/requests/compute/add_interface.rb | 2 +- lib/fog/ovirt/requests/compute/add_volume.rb | 2 +- .../ovirt/requests/compute/get_api_version.rb | 2 +- .../ovirt/requests/compute/get_template.rb | 2 +- .../requests/compute/mock_files/cluster.xml | 2 +- .../requests/compute/mock_files/clusters.xml | 2 +- .../compute/mock_files/data_centers.xml | 2 +- .../requests/compute/mock_files/nics.xml | 2 +- .../requests/compute/mock_files/quotas.xml | 2 +- .../compute/mock_files/storage_domains.xml | 2 +- .../requests/compute/mock_files/template.xml | 2 +- .../requests/compute/mock_files/templates.xml | 2 +- .../ovirt/requests/compute/mock_files/vms.xml | 2 +- .../requests/compute/mock_files/volumes.xml | 2 +- lib/fog/rackspace/docs/compute_v2.md | 34 ++++---- lib/fog/rackspace/docs/getting_started.md | 8 +- lib/fog/rackspace/docs/storage.md | 16 ++-- lib/fog/rackspace/examples/README.md | 4 +- .../examples/auto_scale/add_policy.rb | 2 +- .../examples/auto_scale/delete_webhook.rb | 2 +- .../examples/block_storage/create_snapshot.rb | 6 +- .../examples/block_storage/delete_volume.rb | 2 +- .../examples/compute_v2/bootstrap_server.rb | 14 ++-- .../examples/compute_v2/create_image.rb | 6 +- .../examples/compute_v2/create_server.rb | 18 ++--- .../examples/compute_v2/delete_image.rb | 8 +- .../examples/compute_v2/delete_network.rb | 2 +- .../examples/compute_v2/delete_server.rb | 2 +- .../examples/compute_v2/detach_volume.rb | 8 +- .../examples/compute_v2/resize_server.rb | 16 ++-- .../examples/compute_v2/server_attachments.rb | 2 +- .../examples/compute_v2/server_metadata.rb | 8 +- .../examples/queues/list_messages.rb | 2 +- .../examples/storage/create_cdn_directory.rb | 6 +- .../storage/create_private_directory.rb | 10 +-- .../examples/storage/delete_directory.rb | 12 +-- .../rackspace/examples/storage/delete_file.rb | 6 +- .../examples/storage/download_file.rb | 6 +- lib/fog/rackspace/examples/storage/lorem.txt | 2 +- .../examples/storage/storage_metadata.rb | 8 +- .../rackspace/examples/storage/upload_file.rb | 6 +- .../examples/storage/upload_large_files.rb | 2 +- lib/fog/rackspace/identity.rb | 2 +- lib/fog/rackspace/mock_data.rb | 6 +- lib/fog/rackspace/models/auto_scale/group.rb | 26 +++---- .../models/auto_scale/group_builder.rb | 2 +- .../models/auto_scale/group_config.rb | 6 +- lib/fog/rackspace/models/auto_scale/groups.rb | 6 +- .../models/auto_scale/launch_config.rb | 4 +- .../rackspace/models/auto_scale/policies.rb | 8 +- lib/fog/rackspace/models/auto_scale/policy.rb | 6 +- .../rackspace/models/auto_scale/webhook.rb | 12 +-- .../rackspace/models/auto_scale/webhooks.rb | 4 +- .../rackspace/models/compute_v2/attachment.rb | 18 ++--- lib/fog/rackspace/models/compute_v2/flavor.rb | 18 ++--- .../rackspace/models/compute_v2/flavors.rb | 2 +- lib/fog/rackspace/models/compute_v2/image.rb | 50 ++++++------ lib/fog/rackspace/models/compute_v2/images.rb | 14 ++-- .../models/compute_v2/meta_parent.rb | 2 +- .../rackspace/models/compute_v2/metadata.rb | 18 ++--- lib/fog/rackspace/models/compute_v2/server.rb | 78 +++++++++---------- .../rackspace/models/compute_v2/servers.rb | 2 +- lib/fog/rackspace/models/dns/zones.rb | 4 +- .../models/identity/service_catalog.rb | 18 ++--- lib/fog/rackspace/models/queues/claims.rb | 2 +- lib/fog/rackspace/models/queues/messages.rb | 2 +- lib/fog/rackspace/models/queues/queues.rb | 2 +- lib/fog/rackspace/models/storage/account.rb | 8 +- .../rackspace/models/storage/directories.rb | 4 +- lib/fog/rackspace/models/storage/directory.rb | 26 +++---- lib/fog/rackspace/models/storage/file.rb | 18 ++--- lib/fog/rackspace/models/storage/files.rb | 6 +- lib/fog/rackspace/models/storage/metadata.rb | 50 ++++++------ .../requests/auto_scale/create_group.rb | 4 +- .../requests/auto_scale/create_policy.rb | 8 +- .../requests/auto_scale/create_webhook.rb | 2 +- .../requests/auto_scale/delete_policy.rb | 2 +- .../requests/auto_scale/delete_webhook.rb | 2 +- .../auto_scale/execute_anonymous_webhook.rb | 2 +- .../requests/auto_scale/execute_policy.rb | 2 +- .../requests/auto_scale/get_group.rb | 2 +- .../requests/auto_scale/get_group_config.rb | 2 +- .../requests/auto_scale/get_group_state.rb | 6 +- .../requests/auto_scale/get_launch_config.rb | 2 +- .../requests/auto_scale/get_policy.rb | 2 +- .../requests/auto_scale/get_webhook.rb | 2 +- .../requests/auto_scale/list_webhooks.rb | 2 +- .../requests/auto_scale/pause_group_state.rb | 2 +- .../requests/auto_scale/resume_group_state.rb | 2 +- .../auto_scale/update_group_config.rb | 6 +- .../auto_scale/update_launch_config.rb | 6 +- .../requests/auto_scale/update_policy.rb | 4 +- .../requests/auto_scale/update_webhook.rb | 4 +- .../rackspace/requests/cdn/delete_object.rb | 14 ++-- .../rackspace/requests/cdn/get_containers.rb | 44 +++++------ .../rackspace/requests/cdn/head_container.rb | 32 ++++---- .../rackspace/requests/cdn/post_container.rb | 26 +++---- .../rackspace/requests/cdn/put_container.rb | 28 +++---- .../requests/compute_v2/attach_volume.rb | 4 +- .../compute_v2/change_server_password.rb | 6 +- .../compute_v2/confirm_resize_server.rb | 4 +- .../requests/compute_v2/create_image.rb | 2 +- .../requests/compute_v2/create_server.rb | 8 +- .../requests/compute_v2/delete_attachment.rb | 2 +- .../requests/compute_v2/delete_image.rb | 8 +- .../compute_v2/delete_metadata_item.rb | 10 +-- .../requests/compute_v2/delete_server.rb | 2 +- .../requests/compute_v2/get_attachment.rb | 2 +- .../requests/compute_v2/get_flavor.rb | 4 +- .../requests/compute_v2/get_image.rb | 2 +- .../requests/compute_v2/get_metadata_item.rb | 8 +- .../requests/compute_v2/get_server.rb | 8 +- .../requests/compute_v2/list_addresses.rb | 4 +- .../compute_v2/list_addresses_by_network.rb | 10 +-- .../requests/compute_v2/list_attachments.rb | 2 +- .../requests/compute_v2/list_flavors.rb | 2 +- .../requests/compute_v2/list_images.rb | 2 +- .../requests/compute_v2/list_images_detail.rb | 2 +- .../requests/compute_v2/list_metadata.rb | 4 +- .../requests/compute_v2/list_servers.rb | 8 +- .../requests/compute_v2/reboot_server.rb | 2 +- .../requests/compute_v2/rebuild_server.rb | 10 +-- .../requests/compute_v2/rescue_server.rb | 2 +- .../requests/compute_v2/resize_server.rb | 2 +- .../compute_v2/revert_resize_server.rb | 2 +- .../requests/compute_v2/set_metadata.rb | 10 +-- .../requests/compute_v2/set_metadata_item.rb | 12 +-- .../requests/compute_v2/update_metadata.rb | 10 +-- .../requests/compute_v2/update_server.rb | 6 +- lib/fog/rackspace/requests/dns/add_records.rb | 4 +- .../requests/load_balancers/get_stats.rb | 2 +- .../requests/monitoring/create_agent_token.rb | 2 +- .../requests/monitoring/create_alarm.rb | 2 +- .../requests/monitoring/create_check.rb | 2 +- .../requests/monitoring/create_entity.rb | 2 +- .../requests/monitoring/delete_alarm.rb | 2 +- .../requests/monitoring/delete_check.rb | 2 +- .../requests/monitoring/get_agent.rb | 2 +- .../requests/monitoring/get_check.rb | 38 ++++----- .../requests/monitoring/get_cpus_info.rb | 2 +- .../monitoring/get_logged_in_user_info.rb | 4 +- .../requests/monitoring/get_memory_info.rb | 2 +- .../monitoring/get_network_interfaces_info.rb | 4 +- .../requests/monitoring/get_notification.rb | 2 +- .../requests/monitoring/get_processes_info.rb | 2 +- .../requests/monitoring/list_agents.rb | 6 +- .../requests/monitoring/list_check_types.rb | 6 +- .../requests/monitoring/list_entities.rb | 2 +- .../requests/monitoring/list_metrics.rb | 2 +- .../requests/monitoring/list_notifications.rb | 6 +- .../requests/monitoring/list_overview.rb | 6 +- .../requests/monitoring/update_entity.rb | 2 +- .../requests/storage/extract_archive.rb | 2 +- .../requests/storage/get_object_http_url.rb | 2 +- lib/fog/riakcs/requests/usage/get_usage.rb | 12 +-- .../requests/compute/create_image.rb | 2 +- .../requests/compute/create_server.rb | 2 +- .../requests/compute/destroy_image.rb | 2 +- .../requests/compute/destroy_server.rb | 2 +- .../serverlove/requests/compute/get_image.rb | 2 +- .../serverlove/requests/compute/get_images.rb | 2 +- .../serverlove/requests/compute/get_server.rb | 2 +- .../requests/compute/get_servers.rb | 2 +- .../requests/compute/load_standard_image.rb | 2 +- .../requests/compute/reset_server.rb | 2 +- .../requests/compute/shutdown_server.rb | 2 +- .../requests/compute/start_server.rb | 2 +- .../requests/compute/stop_server.rb | 2 +- .../requests/compute/update_image.rb | 2 +- .../requests/compute/update_server.rb | 2 +- .../util/compute/password_generator.rb | 2 +- lib/fog/storm_on_demand/README.md | 4 +- lib/fog/storm_on_demand/compute.rb | 2 +- lib/fog/storm_on_demand/core.rb | 2 +- lib/fog/storm_on_demand/dns.rb | 2 +- .../storm_on_demand/models/account/token.rb | 2 +- .../storm_on_demand/models/billing/payment.rb | 4 +- .../storm_on_demand/models/compute/image.rb | 2 +- .../models/compute/notification.rb | 2 +- .../models/compute/notifications.rb | 2 +- .../models/compute/templates.rb | 2 +- lib/fog/storm_on_demand/models/dns/zone.rb | 2 +- .../models/network/firewalls.rb | 4 +- .../models/network/network_ips.rb | 2 +- .../storm_on_demand/models/network/pool.rb | 2 +- .../storm_on_demand/models/network/pools.rb | 2 +- .../models/network/private_ips.rb | 2 +- .../storm_on_demand/models/network/ruleset.rb | 2 +- .../models/network/rulesets.rb | 2 +- .../storm_on_demand/models/network/zones.rb | 2 +- .../storm_on_demand/models/storage/cluster.rb | 2 +- .../storm_on_demand/models/storage/volume.rb | 2 +- .../storm_on_demand/models/storage/volumes.rb | 2 +- .../storm_on_demand/models/support/ticket.rb | 2 +- lib/fog/storm_on_demand/monitoring.rb | 2 +- .../requests/compute/clone_server.rb | 2 +- .../requests/compute/create_image.rb | 2 +- .../requests/compute/create_server.rb | 2 +- .../requests/compute/delete_server.rb | 2 +- .../requests/compute/get_config_details.rb | 2 +- .../requests/compute/get_server.rb | 2 +- .../requests/compute/list_configs.rb | 2 +- .../requests/compute/list_images.rb | 2 +- .../requests/compute/list_servers.rb | 2 +- .../requests/compute/list_templates.rb | 2 +- .../requests/compute/reboot_server.rb | 2 +- .../requests/compute/resize_server.rb | 2 +- .../requests/dns/delete_reverse.rb | 2 +- .../requests/dns/update_reverse.rb | 2 +- .../requests/network/add_balancer_node.rb | 2 +- .../requests/network/add_ip_to_server.rb | 2 +- .../requests/network/list_balancers.rb | 2 +- .../requests/network/list_private_ips.rb | 2 +- .../requests/network/remove_balancer_node.rb | 2 +- .../requests/network/update_firewall.rb | 2 +- lib/fog/storm_on_demand/shared.rb | 2 +- lib/fog/storm_on_demand/support.rb | 2 +- .../requests/shared/add_internet_service.rb | 2 +- .../requests/shared/configure_vapp.rb | 6 +- .../shared/create_internet_service.rb | 2 +- .../requests/shared/get_keys_list.rb | 4 +- .../terremark/requests/shared/get_network.rb | 2 +- .../requests/shared/get_node_services.rb | 4 +- lib/fog/vcloud/models/compute/server.rb | 8 +- lib/fog/vcloud/models/compute/tag.rb | 2 +- lib/fog/vcloud/models/compute/tags.rb | 4 +- .../requests/compute/configure_metadata.rb | 2 +- .../requests/compute/configure_org_network.rb | 8 +- .../vcloud/requests/compute/configure_vm.rb | 2 +- lib/fog/vcloud/requests/compute/undeploy.rb | 4 +- .../vcloud_director/models/compute/tags.rb | 4 +- .../requests/compute/get_execute_query.rb | 2 +- .../compute/get_vapps_in_lease_from_query.rb | 2 +- .../requests/compute/get_vdcs_from_query.rb | 2 +- .../compute/instantiate_vapp_template.rb | 8 +- lib/fog/voxel/parsers/compute/images_list.rb | 2 +- .../vsphere/models/compute/customfields.rb | 2 +- lib/fog/vsphere/models/compute/datacenter.rb | 2 +- lib/fog/vsphere/models/compute/interfaces.rb | 4 +- lib/fog/vsphere/models/compute/server.rb | 6 +- lib/fog/vsphere/requests/compute/create_vm.rb | 10 +-- .../requests/compute/get_server_type.rb | 16 ++-- .../compute/get_vm_first_scsi_controller.rb | 2 +- .../requests/compute/list_datacenters.rb | 8 +- .../requests/compute/list_interface_types.rb | 2 +- .../vsphere/requests/compute/list_networks.rb | 2 +- .../requests/compute/list_server_types.rb | 28 +++---- .../requests/compute/list_vm_interfaces.rb | 2 +- .../requests/compute/modify_vm_interface.rb | 4 +- .../requests/compute/modify_vm_volume.rb | 2 +- lib/fog/xenserver/CHANGELOG.md | 8 +- lib/fog/xenserver/core.rb | 26 +++---- .../chage_default_storage_repository.md | 10 +-- .../xenserver/examples/creating_servers.md | 38 ++++----- lib/fog/xenserver/examples/getting_started.md | 14 ++-- .../xenserver/examples/networks-and-vlans.rb | 4 +- .../examples/storage_repositories.md | 6 +- .../xenserver/models/compute/guest_metrics.rb | 10 +-- lib/fog/xenserver/models/compute/host.rb | 24 +++--- lib/fog/xenserver/models/compute/host_cpu.rb | 10 +-- .../xenserver/models/compute/host_metrics.rb | 12 +-- lib/fog/xenserver/models/compute/pbd.rb | 2 +- lib/fog/xenserver/models/compute/pool.rb | 2 +- .../models/compute/storage_repository.rb | 10 +-- .../xenserver/models/compute/vbd_metrics.rb | 10 +-- lib/fog/xenserver/models/compute/vlan.rb | 6 +- lib/fog/xenserver/parser.rb | 12 +-- lib/fog/xenserver/parsers/get_hosts.rb | 8 +- lib/fog/xenserver/parsers/get_networks.rb | 8 +- lib/fog/xenserver/parsers/get_pools.rb | 8 +- lib/fog/xenserver/parsers/get_records.rb | 8 +- .../parsers/get_storage_repositories.rb | 8 +- lib/fog/xenserver/parsers/get_vbds.rb | 8 +- lib/fog/xenserver/parsers/get_vifs.rb | 8 +- lib/fog/xenserver/parsers/get_vms.rb | 8 +- .../requests/compute/clone_server.rb | 4 +- .../requests/compute/create_network.rb | 14 ++-- .../requests/compute/create_server.rb | 28 +++---- .../xenserver/requests/compute/create_sr.rb | 40 +++++----- .../xenserver/requests/compute/create_vbd.rb | 6 +- .../xenserver/requests/compute/create_vdi.rb | 6 +- .../xenserver/requests/compute/create_vif.rb | 8 +- .../xenserver/requests/compute/create_vlan.rb | 14 ++-- .../requests/compute/destroy_network.rb | 6 +- .../xenserver/requests/compute/destroy_sr.rb | 4 +- .../requests/compute/destroy_vlan.rb | 6 +- .../requests/compute/disable_host.rb | 14 ++-- .../xenserver/requests/compute/enable_host.rb | 14 ++-- .../xenserver/requests/compute/get_record.rb | 10 +-- .../xenserver/requests/compute/get_records.rb | 14 ++-- .../requests/compute/provision_server.rb | 2 +- .../xenserver/requests/compute/reboot_host.rb | 10 +-- .../requests/compute/reboot_server.rb | 10 +-- .../requests/compute/set_affinity.rb | 12 +-- .../requests/compute/set_attribute.rb | 12 +-- .../requests/compute/shutdown_host.rb | 10 +-- .../requests/compute/shutdown_server.rb | 10 +-- .../requests/compute/start_server.rb | 10 +-- .../xenserver/requests/compute/start_vm.rb | 10 +-- .../xenserver/requests/compute/unplug_pbd.rb | 2 +- lib/fog/xenserver/utilities.rb | 2 +- lib/fog/zerigo/models/dns/records.rb | 4 +- lib/fog/zerigo/parsers/dns/get_zone.rb | 4 +- lib/fog/zerigo/parsers/dns/get_zone_stats.rb | 2 +- lib/fog/zerigo/requests/dns/count_hosts.rb | 6 +- lib/fog/zerigo/requests/dns/count_zones.rb | 6 +- lib/fog/zerigo/requests/dns/create_host.rb | 8 +- lib/fog/zerigo/requests/dns/create_zone.rb | 8 +- lib/fog/zerigo/requests/dns/delete_host.rb | 4 +- lib/fog/zerigo/requests/dns/delete_zone.rb | 2 +- lib/fog/zerigo/requests/dns/get_host.rb | 2 +- lib/fog/zerigo/requests/dns/get_zone.rb | 8 +- lib/fog/zerigo/requests/dns/get_zone_stats.rb | 6 +- lib/fog/zerigo/requests/dns/list_zones.rb | 2 +- lib/fog/zerigo/requests/dns/update_host.rb | 2 +- lib/fog/zerigo/requests/dns/update_zone.rb | 2 +- 891 files changed, 2480 insertions(+), 2480 deletions(-) diff --git a/lib/fog/aws/parsers/dns/change_resource_record_sets.rb b/lib/fog/aws/parsers/dns/change_resource_record_sets.rb index b1ccff006..c02a862a3 100644 --- a/lib/fog/aws/parsers/dns/change_resource_record_sets.rb +++ b/lib/fog/aws/parsers/dns/change_resource_record_sets.rb @@ -8,10 +8,10 @@ module Fog def reset @response = {} end - + def end_element(name) case name - when 'Id' + when 'Id' @response[name] = value.sub('/change/', '') when 'Status', 'SubmittedAt' @response[name] = value @@ -23,4 +23,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/dns/get_change.rb b/lib/fog/aws/parsers/dns/get_change.rb index e861b43a0..7de06f33f 100644 --- a/lib/fog/aws/parsers/dns/get_change.rb +++ b/lib/fog/aws/parsers/dns/get_change.rb @@ -8,7 +8,7 @@ module Fog def reset @response = {} end - + def end_element(name) case name when 'Id' diff --git a/lib/fog/aws/parsers/elasticache/describe_reserved_cache_nodes.rb b/lib/fog/aws/parsers/elasticache/describe_reserved_cache_nodes.rb index d7c64fc4f..3de15b7d3 100644 --- a/lib/fog/aws/parsers/elasticache/describe_reserved_cache_nodes.rb +++ b/lib/fog/aws/parsers/elasticache/describe_reserved_cache_nodes.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module Elasticache + module Elasticache class DescribeReservedCacheNodes < Fog::Parsers::Base @@ -34,4 +34,4 @@ module Fog end end end - + diff --git a/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb b/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb index f5e15d5b6..05b4d91a2 100644 --- a/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb +++ b/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb @@ -12,7 +12,7 @@ module Fog def start_element(name, attrs = []) super - case name + case name when 'CrossZoneLoadBalancing' @cross_zone_load_balancing = {} end diff --git a/lib/fog/aws/parsers/emr/describe_job_flows.rb b/lib/fog/aws/parsers/emr/describe_job_flows.rb index 748df584c..e2df70713 100644 --- a/lib/fog/aws/parsers/emr/describe_job_flows.rb +++ b/lib/fog/aws/parsers/emr/describe_job_flows.rb @@ -8,12 +8,12 @@ module Fog def reset @context = [] @contexts = ['BootstrapActions', 'ExecutionStatusDetail', 'Instances', 'Steps', 'InstanceGroups', 'Args'] - + @response = { 'JobFlows' => [] } @bootstrap_actions = {'ScriptBootstrapActionConfig' => {'Args' => []}} @instance = { 'InstanceGroups' => [], 'Placement' => {}} @step = { - 'ExecutionStatusDetail' => {}, + 'ExecutionStatusDetail' => {}, 'StepConfig' => { 'HadoopJarStepConfig' => { 'Args' => [], @@ -45,12 +45,12 @@ module Fog @bootstrap_actions = {'ScriptBootstrapActionConfig' => {'Args' => []}} end end - + if @context.last == 'ExecutionStatusDetail' case name - when 'CreationDateTime', 'EndDateTime', 'LastStateChangeReason', + when 'CreationDateTime', 'EndDateTime', 'LastStateChangeReason', 'ReadyDateTime', 'StartDateTime', 'State' - @execution_status_detail[name] = value + @execution_status_detail[name] = value when 'ExecutionStatusDetail' if @context.include?('Steps') @step['ExecutionStatusDetail'] = @execution_status_detail @@ -60,7 +60,7 @@ module Fog @execution_status_detail = {} end end - + if @context.last == 'Instances' case name when 'AvailabilityZone' @@ -71,13 +71,13 @@ module Fog @instance[name] = value when 'member' @instance['InstanceGroups'] << @instance_group_detail - @instance_group_detail = {} + @instance_group_detail = {} when 'Instances' @flow['Instances'] = @instance @instance = { 'InstanceGroups' => [], 'Placement' => {}} end end - + if @context.last == 'InstanceGroups' case name when 'member' @@ -87,7 +87,7 @@ module Fog @instance_group_detail[name] = value end end - + if @context.last == 'Args' if name == 'member' if @context.include?('Steps') @@ -97,7 +97,7 @@ module Fog end end end - + if @context.last == 'Steps' case name when 'ActionOnFailure', 'Name' @@ -107,7 +107,7 @@ module Fog when 'member' @flow['Steps'] << @step @step = { - 'ExecutionStatusDetail' => {}, + 'ExecutionStatusDetail' => {}, 'StepConfig' => { 'HadoopJarStepConfig' => { 'Args' => [], @@ -117,7 +117,7 @@ module Fog } end end - + if @context.empty? case name when 'AmiVersion', 'JobFlowId', 'LogUri', 'Name' @@ -127,7 +127,7 @@ module Fog @flow = {'Instances' => [], 'ExecutionStatusDetail' => {}, 'BootstrapActions' => [], 'Steps' => []} end end - + if @context.last == name @context.pop end diff --git a/lib/fog/aws/parsers/iam/base_instance_profile.rb b/lib/fog/aws/parsers/iam/base_instance_profile.rb index f49c5e8e7..94b981eda 100644 --- a/lib/fog/aws/parsers/iam/base_instance_profile.rb +++ b/lib/fog/aws/parsers/iam/base_instance_profile.rb @@ -29,7 +29,7 @@ module Fog @role = {} end end - end + end end def end_element(name) @@ -76,4 +76,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/iam/create_access_key.rb b/lib/fog/aws/parsers/iam/create_access_key.rb index bcf277b1d..d23ac1ecf 100644 --- a/lib/fog/aws/parsers/iam/create_access_key.rb +++ b/lib/fog/aws/parsers/iam/create_access_key.rb @@ -23,4 +23,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/iam/get_group.rb b/lib/fog/aws/parsers/iam/get_group.rb index 1fc31d3d3..d35960267 100644 --- a/lib/fog/aws/parsers/iam/get_group.rb +++ b/lib/fog/aws/parsers/iam/get_group.rb @@ -38,11 +38,11 @@ module Fog when 'UserId', 'UserName' @user[name] = value when 'member' - @response['Users'] << @user + @response['Users'] << @user @user = {} when 'IsTruncated' response[name] = (value == 'true') - when 'Marker', 'RequestId' + when 'Marker', 'RequestId' @response[name] = value end end diff --git a/lib/fog/aws/parsers/iam/instance_profile.rb b/lib/fog/aws/parsers/iam/instance_profile.rb index 00c844229..1bbdb94e0 100644 --- a/lib/fog/aws/parsers/iam/instance_profile.rb +++ b/lib/fog/aws/parsers/iam/instance_profile.rb @@ -18,7 +18,7 @@ module Fog end def end_element(name) - + case name when 'RequestId' @response[name] = value @@ -31,4 +31,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/iam/list_instance_profiles.rb b/lib/fog/aws/parsers/iam/list_instance_profiles.rb index 12fd33e65..feaeb4897 100644 --- a/lib/fog/aws/parsers/iam/list_instance_profiles.rb +++ b/lib/fog/aws/parsers/iam/list_instance_profiles.rb @@ -31,4 +31,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/iam/list_roles.rb b/lib/fog/aws/parsers/iam/list_roles.rb index 1ed25c8b6..1093e175f 100644 --- a/lib/fog/aws/parsers/iam/list_roles.rb +++ b/lib/fog/aws/parsers/iam/list_roles.rb @@ -14,7 +14,7 @@ module Fog def finished_role(role) @response['Roles'] << role end - + def end_element(name) case name when 'RequestId', 'Marker' @@ -28,4 +28,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/iam/list_signing_certificates.rb b/lib/fog/aws/parsers/iam/list_signing_certificates.rb index e5c693962..3c0d376dc 100644 --- a/lib/fog/aws/parsers/iam/list_signing_certificates.rb +++ b/lib/fog/aws/parsers/iam/list_signing_certificates.rb @@ -4,7 +4,7 @@ module Fog module IAM class ListSigningCertificates < Fog::Parsers::Base - + def reset @signing_certificate = {} @response = { 'SigningCertificates' => [] } diff --git a/lib/fog/aws/parsers/iam/role_parser.rb b/lib/fog/aws/parsers/iam/role_parser.rb index f4905ec53..610030959 100644 --- a/lib/fog/aws/parsers/iam/role_parser.rb +++ b/lib/fog/aws/parsers/iam/role_parser.rb @@ -50,4 +50,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/iam/single_role.rb b/lib/fog/aws/parsers/iam/single_role.rb index d710801b8..a686f7482 100644 --- a/lib/fog/aws/parsers/iam/single_role.rb +++ b/lib/fog/aws/parsers/iam/single_role.rb @@ -26,4 +26,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/iam/update_user.rb b/lib/fog/aws/parsers/iam/update_user.rb index a4e4c6de0..35a169fad 100644 --- a/lib/fog/aws/parsers/iam/update_user.rb +++ b/lib/fog/aws/parsers/iam/update_user.rb @@ -5,7 +5,7 @@ module Fog class UpdateUser < Fog::Parsers::Base # http://docs.amazonwebservices.com/IAM/latest/APIReference/index.html?API_UpdateUser.html - + def reset @response = { 'User' => {} } end diff --git a/lib/fog/aws/parsers/rds/base.rb b/lib/fog/aws/parsers/rds/base.rb index 6e2edafa5..cc3cad5ca 100644 --- a/lib/fog/aws/parsers/rds/base.rb +++ b/lib/fog/aws/parsers/rds/base.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module RDS + module RDS # Base parser for ResponseMetadata, RequestId class Base < Fog::Parsers::Base diff --git a/lib/fog/aws/parsers/rds/create_db_instance.rb b/lib/fog/aws/parsers/rds/create_db_instance.rb index ab2440772..6a8d0d6ba 100644 --- a/lib/fog/aws/parsers/rds/create_db_instance.rb +++ b/lib/fog/aws/parsers/rds/create_db_instance.rb @@ -2,9 +2,9 @@ module Fog module Parsers module AWS module RDS - + require 'fog/aws/parsers/rds/db_parser' - + class CreateDBInstance < Fog::Parsers::AWS::RDS::DbParser def reset @@ -13,7 +13,7 @@ module Fog end def start_element(name, attrs = []) - super + super end def end_element(name) diff --git a/lib/fog/aws/parsers/rds/create_db_instance_read_replica.rb b/lib/fog/aws/parsers/rds/create_db_instance_read_replica.rb index 95c959307..a7ee488dc 100644 --- a/lib/fog/aws/parsers/rds/create_db_instance_read_replica.rb +++ b/lib/fog/aws/parsers/rds/create_db_instance_read_replica.rb @@ -2,9 +2,9 @@ module Fog module Parsers module AWS module RDS - + require 'fog/aws/parsers/rds/db_parser' - + class CreateDBInstanceReadReplica < Fog::Parsers::AWS::RDS::DbParser def reset @@ -13,7 +13,7 @@ module Fog end def start_element(name, attrs = []) - super + super end def end_element(name) diff --git a/lib/fog/aws/parsers/rds/create_db_snapshot.rb b/lib/fog/aws/parsers/rds/create_db_snapshot.rb index 416cc4b00..a89b9f05e 100644 --- a/lib/fog/aws/parsers/rds/create_db_snapshot.rb +++ b/lib/fog/aws/parsers/rds/create_db_snapshot.rb @@ -3,7 +3,7 @@ module Fog module AWS module RDS require 'fog/aws/parsers/rds/snapshot_parser' - + class CreateDBSnapshot < Fog::Parsers::AWS::RDS::SnapshotParser def reset @@ -17,7 +17,7 @@ module Fog def end_element(name) case name - when 'DBSnapshot' then + when 'DBSnapshot' then @response['CreateDBSnapshotResult']['DBSnapshot'] = @db_snapshot @db_snapshot = fresh_snapshot when 'RequestId' diff --git a/lib/fog/aws/parsers/rds/db_engine_version_parser.rb b/lib/fog/aws/parsers/rds/db_engine_version_parser.rb index 5bcb3793a..f26dc166f 100644 --- a/lib/fog/aws/parsers/rds/db_engine_version_parser.rb +++ b/lib/fog/aws/parsers/rds/db_engine_version_parser.rb @@ -8,14 +8,14 @@ module Fog def reset @db_engine_version = fresh_engine_version end - + def fresh_engine_version {} end def start_element(name, attrs = []) super - + end def end_element(name) @@ -25,7 +25,7 @@ module Fog when 'DBParameterGroupFamily' then @db_engine_version['DBParameterGroupFamily'] = @value when 'DBEngineVersionIdentifier' then @db_engine_version['DBEngineVersionIdentifier'] = @value when 'Engine' then @db_engine_version['Engine'] = @value - when 'EngineVersion' then @db_engine_version['EngineVersion'] = @value + when 'EngineVersion' then @db_engine_version['EngineVersion'] = @value end end end diff --git a/lib/fog/aws/parsers/rds/db_parser.rb b/lib/fog/aws/parsers/rds/db_parser.rb index b9d6c2051..23d91c93b 100644 --- a/lib/fog/aws/parsers/rds/db_parser.rb +++ b/lib/fog/aws/parsers/rds/db_parser.rb @@ -7,9 +7,9 @@ module Fog def reset @db_instance = fresh_instance - + end - + def fresh_instance {'PendingModifiedValues' => [], 'DBSecurityGroups' => [], 'ReadReplicaDBInstanceIdentifiers' => [], 'Endpoint' => {}} end @@ -39,18 +39,18 @@ module Fog @in_vpc_security_groups = true @vpc_security_groups = [] end - + end def end_element(name) case name - + when 'LatestRestorableTime', 'InstanceCreateTime' @db_instance[name] = Time.parse value - when 'Engine', - 'DBInstanceStatus', 'DBInstanceIdentifier', 'EngineVersion', - 'PreferredBackupWindow', 'PreferredMaintenanceWindow', + when 'Engine', + 'DBInstanceStatus', 'DBInstanceIdentifier', 'EngineVersion', + 'PreferredBackupWindow', 'PreferredMaintenanceWindow', 'AvailabilityZone', 'MasterUsername', 'DBName', 'LicenseModel', 'DBSubnetGroupName' @db_instance[name] = value @@ -70,7 +70,7 @@ module Fog if @in_db_parameter_groups @db_parameter_group[name] = value end - + when 'BackupRetentionPeriod' if @in_pending_modified_values @pending_modified_values[name] = value.to_i @@ -91,7 +91,7 @@ module Fog when 'DBSecurityGroup' @db_security_groups << @db_security_group @db_security_group = {} - + when 'VpcSecurityGroups' @in_vpc_security_groups = false @db_instance['VpcSecurityGroups'] = @vpc_security_groups @@ -131,7 +131,7 @@ module Fog elsif @in_endpoint @endpoint[name] = value.to_i end - + when 'PendingModifiedValues' @in_pending_modified_values = false @db_instance['PendingModifiedValues'] = @pending_modified_values diff --git a/lib/fog/aws/parsers/rds/delete_db_instance.rb b/lib/fog/aws/parsers/rds/delete_db_instance.rb index 64910f447..738d7146f 100644 --- a/lib/fog/aws/parsers/rds/delete_db_instance.rb +++ b/lib/fog/aws/parsers/rds/delete_db_instance.rb @@ -4,7 +4,7 @@ module Fog module RDS require 'fog/aws/parsers/rds/db_parser' - + class DeleteDBInstance < Fog::Parsers::AWS::RDS::DbParser def reset @@ -13,12 +13,12 @@ module Fog end def start_element(name, attrs = []) - super + super end def end_element(name) case name - + when 'DBInstance' @response['DeleteDBInstanceResult']['DBInstance'] = @db_instance @db_instance = fresh_instance diff --git a/lib/fog/aws/parsers/rds/delete_db_snapshot.rb b/lib/fog/aws/parsers/rds/delete_db_snapshot.rb index 3d12c38e1..4d733de7a 100644 --- a/lib/fog/aws/parsers/rds/delete_db_snapshot.rb +++ b/lib/fog/aws/parsers/rds/delete_db_snapshot.rb @@ -4,7 +4,7 @@ module Fog module RDS require 'fog/aws/parsers/rds/snapshot_parser' - + class DeleteDBSnapshot < Fog::Parsers::AWS::RDS::SnapshotParser def reset diff --git a/lib/fog/aws/parsers/rds/describe_db_engine_versions.rb b/lib/fog/aws/parsers/rds/describe_db_engine_versions.rb index 927b3667f..a8d88535f 100644 --- a/lib/fog/aws/parsers/rds/describe_db_engine_versions.rb +++ b/lib/fog/aws/parsers/rds/describe_db_engine_versions.rb @@ -4,7 +4,7 @@ module Fog module RDS require 'fog/aws/parsers/rds/db_engine_version_parser' - + class DescribeDBEngineVersions < Fog::Parsers::AWS::RDS::DBEngineVersionParser def reset @@ -18,7 +18,7 @@ module Fog def end_element(name) case name - when 'DBEngineVersion' then + when 'DBEngineVersion' then @response['DescribeDBEngineVersionsResult']['DBEngineVersions'] << @db_engine_version @db_engine_version = fresh_engine_version when 'Marker' diff --git a/lib/fog/aws/parsers/rds/describe_db_instances.rb b/lib/fog/aws/parsers/rds/describe_db_instances.rb index 6ec17e1e7..9bd8d8bd1 100644 --- a/lib/fog/aws/parsers/rds/describe_db_instances.rb +++ b/lib/fog/aws/parsers/rds/describe_db_instances.rb @@ -4,7 +4,7 @@ module Fog module RDS require 'fog/aws/parsers/rds/db_parser' - + class DescribeDBInstances < Fog::Parsers::AWS::RDS::DbParser def reset diff --git a/lib/fog/aws/parsers/rds/describe_db_parameter_groups.rb b/lib/fog/aws/parsers/rds/describe_db_parameter_groups.rb index 6dcc387d2..576fb1313 100644 --- a/lib/fog/aws/parsers/rds/describe_db_parameter_groups.rb +++ b/lib/fog/aws/parsers/rds/describe_db_parameter_groups.rb @@ -19,9 +19,9 @@ module Fog when 'DBParameterGroupFamily' then @db_parameter_group['DBParameterGroupFamily'] = value when 'Description' then @db_parameter_group['Description'] = value when 'DBParameterGroupName' then @db_parameter_group['DBParameterGroupName'] = value - when 'DBParameterGroup' then + when 'DBParameterGroup' then @response['DescribeDBParameterGroupsResult']['DBParameterGroups'] << @db_parameter_group - @db_parameter_group = {} + @db_parameter_group = {} when 'Marker' @response['DescribeDBParameterGroupsResult']['Marker'] = value when 'RequestId' diff --git a/lib/fog/aws/parsers/rds/describe_db_parameters.rb b/lib/fog/aws/parsers/rds/describe_db_parameters.rb index 370d04630..60e32ae10 100644 --- a/lib/fog/aws/parsers/rds/describe_db_parameters.rb +++ b/lib/fog/aws/parsers/rds/describe_db_parameters.rb @@ -21,12 +21,12 @@ module Fog when 'DataType' then @parameter['DataType'] = value when 'AllowedValues' then @parameter['AllowedValues'] = value when 'Source' then @parameter['Source'] = value - when 'IsModifiable' then + when 'IsModifiable' then @parameter['IsModifiable'] = value == 'true' ? true : false when 'Description' then @parameter['Description'] = value when 'ApplyType' then @parameter['ApplyType'] = value when 'ParameterName' then @parameter['ParameterName'] = value - when 'Parameter' + when 'Parameter' @parameters << @parameter @parameter = {} when 'Marker' diff --git a/lib/fog/aws/parsers/rds/describe_db_reserved_instances.rb b/lib/fog/aws/parsers/rds/describe_db_reserved_instances.rb index ca51aaefc..fad7954e9 100644 --- a/lib/fog/aws/parsers/rds/describe_db_reserved_instances.rb +++ b/lib/fog/aws/parsers/rds/describe_db_reserved_instances.rb @@ -40,4 +40,4 @@ module Fog end end end - + diff --git a/lib/fog/aws/parsers/rds/describe_db_snapshots.rb b/lib/fog/aws/parsers/rds/describe_db_snapshots.rb index 3f68deecd..45f62fa26 100644 --- a/lib/fog/aws/parsers/rds/describe_db_snapshots.rb +++ b/lib/fog/aws/parsers/rds/describe_db_snapshots.rb @@ -4,7 +4,7 @@ module Fog module RDS require 'fog/aws/parsers/rds/snapshot_parser' - + class DescribeDBSnapshots < Fog::Parsers::AWS::RDS::SnapshotParser def reset @@ -18,7 +18,7 @@ module Fog def end_element(name) case name - when 'DBSnapshot' then + when 'DBSnapshot' then @response['DescribeDBSnapshotsResult']['DBSnapshots'] << @db_snapshot @db_snapshot = fresh_snapshot when 'Marker' diff --git a/lib/fog/aws/parsers/rds/event_list.rb b/lib/fog/aws/parsers/rds/event_list.rb index 90e0917c8..77a887455 100644 --- a/lib/fog/aws/parsers/rds/event_list.rb +++ b/lib/fog/aws/parsers/rds/event_list.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module RDS + module RDS require 'fog/aws/parsers/rds/base' class EventListParser < Base diff --git a/lib/fog/aws/parsers/rds/modify_db_instance.rb b/lib/fog/aws/parsers/rds/modify_db_instance.rb index 90b9d34de..6dea9ddbd 100644 --- a/lib/fog/aws/parsers/rds/modify_db_instance.rb +++ b/lib/fog/aws/parsers/rds/modify_db_instance.rb @@ -4,7 +4,7 @@ module Fog module RDS require 'fog/aws/parsers/rds/db_parser' - + class ModifyDBInstance < Fog::Parsers::AWS::RDS::DbParser def reset @@ -13,7 +13,7 @@ module Fog end def start_element(name, attrs = []) - super + super end def end_element(name) diff --git a/lib/fog/aws/parsers/rds/reboot_db_instance.rb b/lib/fog/aws/parsers/rds/reboot_db_instance.rb index c4bbb5a81..4cc32fbd9 100644 --- a/lib/fog/aws/parsers/rds/reboot_db_instance.rb +++ b/lib/fog/aws/parsers/rds/reboot_db_instance.rb @@ -4,7 +4,7 @@ module Fog module RDS require 'fog/aws/parsers/rds/db_parser' - + class RebootDBInstance < Fog::Parsers::AWS::RDS::DbParser def reset @@ -13,12 +13,12 @@ module Fog end def start_element(name, attrs = []) - super + super end def end_element(name) case name - + when 'DBInstance' @response['RebootDBInstanceResult']['DBInstance'] = @db_instance @db_instance = fresh_instance diff --git a/lib/fog/aws/parsers/rds/snapshot_parser.rb b/lib/fog/aws/parsers/rds/snapshot_parser.rb index 8e5dcf6e0..16c2df179 100644 --- a/lib/fog/aws/parsers/rds/snapshot_parser.rb +++ b/lib/fog/aws/parsers/rds/snapshot_parser.rb @@ -8,14 +8,14 @@ module Fog def reset @db_snapshot = fresh_snapshot end - + def fresh_snapshot {} end def start_element(name, attrs = []) super - + end def end_element(name) diff --git a/lib/fog/aws/parsers/redshift/cluster_parser.rb b/lib/fog/aws/parsers/redshift/cluster_parser.rb index 14b00092b..5d5d6b0b9 100644 --- a/lib/fog/aws/parsers/redshift/cluster_parser.rb +++ b/lib/fog/aws/parsers/redshift/cluster_parser.rb @@ -53,7 +53,7 @@ module Fog end def fresh_cluster - { 'ClusterParameterGroups' => [], 'ClusterSecurityGroups' => [], 'VpcSecurityGroups' => [], + { 'ClusterParameterGroups' => [], 'ClusterSecurityGroups' => [], 'VpcSecurityGroups' => [], 'EndPoint' => {}, 'PendingModifiedValues'=> {}, 'RestoreStatus' => {}} end @@ -73,9 +73,9 @@ module Fog end end - def end_element(name) + def end_element(name) case name - when 'AvailabilityZone', 'ClusterIdentifier', 'ClusterStatus', 'ClusterSubnetGroupName', 'DBName', + when 'AvailabilityZone', 'ClusterIdentifier', 'ClusterStatus', 'ClusterSubnetGroupName', 'DBName', 'MasterUsername', 'ModifyStatus', 'PreferredMaintenanceWindow', 'VpcId' @cluster[name] = value when 'ClusterCreateTime' @@ -83,7 +83,7 @@ module Fog when 'AllowVersionUpgrade', 'Encrypted', 'PubliclyAccessible' @cluster[name] = (value == "true") when 'Address' - @cluster['EndPoint'][name] = value + @cluster['EndPoint'][name] = value when 'Port' @cluster['EndPoint'][name] = value.to_i when 'NodeType', 'ClusterVersion' @@ -141,4 +141,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/cluster_security_group_parser.rb b/lib/fog/aws/parsers/redshift/cluster_security_group_parser.rb index 6225c4e33..7c659ad0a 100644 --- a/lib/fog/aws/parsers/redshift/cluster_security_group_parser.rb +++ b/lib/fog/aws/parsers/redshift/cluster_security_group_parser.rb @@ -13,7 +13,7 @@ module Fog # :ip_ranges - (Array) # :status - (String) # :cidrip - (String) - + def reset @cluster_security_group = fresh_cluster_security_group end @@ -31,8 +31,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'ClusterSecurityGroupName', 'Description' @cluster_security_group[name] = value @@ -47,4 +47,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/cluster_snapshot.rb b/lib/fog/aws/parsers/redshift/cluster_snapshot.rb index 18f4a5fe8..6d4dd5a30 100644 --- a/lib/fog/aws/parsers/redshift/cluster_snapshot.rb +++ b/lib/fog/aws/parsers/redshift/cluster_snapshot.rb @@ -8,7 +8,7 @@ module Fog class ClusterSnapshot < ClusterSnapshotParser # :parameter_group_name - (String) # :parameter_group_status - (String) - + def reset super @response = {} @@ -18,7 +18,7 @@ module Fog super end - def end_element(name) + def end_element(name) super case name when 'Snapshot' @@ -29,4 +29,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/cluster_snapshot_parser.rb b/lib/fog/aws/parsers/redshift/cluster_snapshot_parser.rb index 5c1781d16..4c7c2d9dc 100644 --- a/lib/fog/aws/parsers/redshift/cluster_snapshot_parser.rb +++ b/lib/fog/aws/parsers/redshift/cluster_snapshot_parser.rb @@ -41,8 +41,8 @@ module Fog super end - def end_element(name) - super + def end_element(name) + super case name when 'SnapshotIdentifier', 'ClusterIdentifier', 'Status', 'AvailabilityZone', 'MasterUsername', 'ClusterVersion', 'SnapshotType', 'NodeType', 'DBName', 'VpcId', 'OwnerAccount' @@ -63,4 +63,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb b/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb index 992b3d640..cf6678c22 100644 --- a/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb +++ b/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb @@ -12,8 +12,8 @@ module Fog # :subnet_identifier - (String) # :subnet_availability_zone - (Hash) # :name - (String) - # :subnet_status - (String) - + # :subnet_status - (String) + def reset @response = { 'Subnets' => [] } end @@ -30,7 +30,7 @@ module Fog end end - def end_element(name) + def end_element(name) super case name when 'ClusterSubnetGroupName', 'Desciption', 'VpcId', 'SubnetGroupStatus' diff --git a/lib/fog/aws/parsers/redshift/create_cluster_parameter_group.rb b/lib/fog/aws/parsers/redshift/create_cluster_parameter_group.rb index e7dd8a39c..ad7d70b70 100644 --- a/lib/fog/aws/parsers/redshift/create_cluster_parameter_group.rb +++ b/lib/fog/aws/parsers/redshift/create_cluster_parameter_group.rb @@ -7,7 +7,7 @@ module Fog # :parameter_group_name - (String) # :parameter_group_family - (String) # :description - (String) - + def reset @response = {'ClusterParameterGroup'=>{}} end @@ -16,7 +16,7 @@ module Fog super end - def end_element(name) + def end_element(name) super case name when 'ParameterGroupName', 'ParameterGroupFamily', 'Description' @@ -27,4 +27,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/create_cluster_security_group.rb b/lib/fog/aws/parsers/redshift/create_cluster_security_group.rb index 313275913..59a936ec7 100644 --- a/lib/fog/aws/parsers/redshift/create_cluster_security_group.rb +++ b/lib/fog/aws/parsers/redshift/create_cluster_security_group.rb @@ -7,7 +7,7 @@ module Fog class CreateClusterSecurityGroup < ClusterSecurityGroupParser # :cluster_security_group - + def reset super @response = {} @@ -17,7 +17,7 @@ module Fog super end - def end_element(name) + def end_element(name) super case name when 'ClusterSecurityGroup' @@ -28,4 +28,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_cluster_parameter_groups.rb b/lib/fog/aws/parsers/redshift/describe_cluster_parameter_groups.rb index f81805acf..ad6c36690 100644 --- a/lib/fog/aws/parsers/redshift/describe_cluster_parameter_groups.rb +++ b/lib/fog/aws/parsers/redshift/describe_cluster_parameter_groups.rb @@ -9,7 +9,7 @@ module Fog # :parameter_group_name - (String) # :parameter_group_family - (String) # :description - (String) - + def reset @response = { 'ParameterGroups' => [] } end @@ -22,7 +22,7 @@ module Fog end end - def end_element(name) + def end_element(name) super case name when 'Marker' @@ -38,4 +38,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_cluster_parameters.rb b/lib/fog/aws/parsers/redshift/describe_cluster_parameters.rb index 8dc48bd5a..f9a578086 100644 --- a/lib/fog/aws/parsers/redshift/describe_cluster_parameters.rb +++ b/lib/fog/aws/parsers/redshift/describe_cluster_parameters.rb @@ -14,7 +14,7 @@ module Fog # :allowed_values - (String) # :is_modifiable - (Boolean) # :minimum_engine_version - (String) - + def reset @response = { 'Parameters' => [] } end @@ -27,8 +27,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'Marker' @response[name] = value @@ -45,4 +45,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_cluster_security_groups.rb b/lib/fog/aws/parsers/redshift/describe_cluster_security_groups.rb index 8850928ea..f3508a96a 100644 --- a/lib/fog/aws/parsers/redshift/describe_cluster_security_groups.rb +++ b/lib/fog/aws/parsers/redshift/describe_cluster_security_groups.rb @@ -8,7 +8,7 @@ module Fog class DescribeClusterSecurityGroups < ClusterSecurityGroupParser # :marker - (String) # :cluster_security_groups - (Array) - + def reset @response = { 'ClusterSecurityGroups' => [] } end @@ -21,7 +21,7 @@ module Fog end end - def end_element(name) + def end_element(name) super case name when 'Marker' @@ -35,4 +35,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_cluster_snapshots.rb b/lib/fog/aws/parsers/redshift/describe_cluster_snapshots.rb index c7be65bdc..5f4652644 100644 --- a/lib/fog/aws/parsers/redshift/describe_cluster_snapshots.rb +++ b/lib/fog/aws/parsers/redshift/describe_cluster_snapshots.rb @@ -21,8 +21,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'Marker' @response[name] = value @@ -35,4 +35,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb b/lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb index e0523fb53..2a5c8f4ed 100644 --- a/lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb +++ b/lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb @@ -28,8 +28,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'Marker' @response[name] = value @@ -44,7 +44,7 @@ module Fog when 'SubnetAvailabilityZone' @subnet['SubnetAvailabilityZone'] = {} when 'Name' - @subnet['SubnetAvailabilityZone']['Name'] = value + @subnet['SubnetAvailabilityZone']['Name'] = value when 'SubnetIdentifier', 'SubnetStatus' @subnet[name] = value end diff --git a/lib/fog/aws/parsers/redshift/describe_cluster_versions.rb b/lib/fog/aws/parsers/redshift/describe_cluster_versions.rb index 09d8ce2e2..2feb4b269 100644 --- a/lib/fog/aws/parsers/redshift/describe_cluster_versions.rb +++ b/lib/fog/aws/parsers/redshift/describe_cluster_versions.rb @@ -19,16 +19,16 @@ module Fog super case name when 'ClusterVersions' - @cluster_version = {} + @cluster_version = {} when 'ClusterVersion' - # Sadly, there are two nodes of different type named cluster_version + # Sadly, there are two nodes of different type named cluster_version # that are nested, so we keep track of which one we're in @cluster_version_depth += 1 end end - def end_element(name) - super + def end_element(name) + super case name when 'Marker' @response[name] = value @@ -39,7 +39,7 @@ module Fog @cluster_version = {} else @cluster_version[name] = value - end + end when 'ClusterParameterGroupFamily', 'Description' @cluster_version[name] = value end diff --git a/lib/fog/aws/parsers/redshift/describe_default_cluster_parameters.rb b/lib/fog/aws/parsers/redshift/describe_default_cluster_parameters.rb index ef3f8e50f..7f935f311 100644 --- a/lib/fog/aws/parsers/redshift/describe_default_cluster_parameters.rb +++ b/lib/fog/aws/parsers/redshift/describe_default_cluster_parameters.rb @@ -15,7 +15,7 @@ module Fog # :allowed_values - (String) # :is_modifiable - (Boolean) # :minimum_engine_version - (String) - + def reset @response = { 'Parameters' => [] } end @@ -28,8 +28,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'Marker', 'ParameterGroupFamily' @response[name] = value @@ -46,4 +46,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_events.rb b/lib/fog/aws/parsers/redshift/describe_events.rb index bdaf55009..d0d8cffc5 100644 --- a/lib/fog/aws/parsers/redshift/describe_events.rb +++ b/lib/fog/aws/parsers/redshift/describe_events.rb @@ -10,7 +10,7 @@ module Fog # :source_type - (String) # :message - (String) # :date - (Time) - + def reset @response = { 'Events' => [] } end @@ -23,7 +23,7 @@ module Fog end end - def end_element(name) + def end_element(name) super case name when 'Marker' @@ -41,4 +41,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb b/lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb index a1533c25a..206810a3b 100644 --- a/lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb +++ b/lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb @@ -10,7 +10,7 @@ module Fog # :cluster_type - (String) # :node_type - (String) # :availability_zones - (Array) - # :name - (String) + # :name - (String) def reset @response = { 'OrderableClusterOptions' => [] } @@ -30,8 +30,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'Marker' @response[name] = value @@ -51,4 +51,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb b/lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb index 410a6873f..4fbaede35 100644 --- a/lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb +++ b/lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb @@ -34,7 +34,7 @@ module Fog end end - def end_element(name) + def end_element(name) super case name when 'Marker' @@ -61,4 +61,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_reserved_nodes.rb b/lib/fog/aws/parsers/redshift/describe_reserved_nodes.rb index ca35801b8..2a8694204 100644 --- a/lib/fog/aws/parsers/redshift/describe_reserved_nodes.rb +++ b/lib/fog/aws/parsers/redshift/describe_reserved_nodes.rb @@ -6,19 +6,19 @@ module Fog class DescribeReservedNodes < Fog::Parsers::Base # :marker - (String) # :reserved_nodes - (Array) - # :reserved_node_id - (String) - # :reserved_node_offering_id - (String) - # :node_type - (String) + # :reserved_node_id - (String) + # :reserved_node_offering_id - (String) + # :node_type - (String) # :start_time - (Time) - # :duration - (Integer) - # :fixed_price - (Numeric) - # :usage_price - (Numeric) + # :duration - (Integer) + # :fixed_price - (Numeric) + # :usage_price - (Numeric) # :currency_code - (String) - # :node_count - (Integer) - # :state - (String) - # :offering_type - (String) - # :recurring_charges - (Array) - # :recurring_charge_amount - (Numeric) + # :node_count - (Integer) + # :state - (String) + # :offering_type - (String) + # :recurring_charges - (Array) + # :recurring_charge_amount - (Numeric) # :recurring_charge_frequency - (String) def reset @@ -39,8 +39,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'Marker' @response[name] = value @@ -68,4 +68,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/describe_resize.rb b/lib/fog/aws/parsers/redshift/describe_resize.rb index 29d60ba52..8e47fece5 100644 --- a/lib/fog/aws/parsers/redshift/describe_resize.rb +++ b/lib/fog/aws/parsers/redshift/describe_resize.rb @@ -28,8 +28,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'TargetNodeType', 'TargetClusterType', 'Status' @response[name] = value @@ -57,4 +57,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/purchase_reserved_node_offering.rb b/lib/fog/aws/parsers/redshift/purchase_reserved_node_offering.rb index 0542b58fc..b787436c9 100644 --- a/lib/fog/aws/parsers/redshift/purchase_reserved_node_offering.rb +++ b/lib/fog/aws/parsers/redshift/purchase_reserved_node_offering.rb @@ -4,7 +4,7 @@ module Fog module AWS class PurchaseReservedNodeOffering < Fog::Parsers::Base - + # :reserved_node_id - (String) # :reserved_node_offering_id - (String) # :node_type - (String) @@ -31,8 +31,8 @@ module Fog end end - def end_element(name) - super + def end_element(name) + super case name when 'ReservedNodeId', 'ReservedNodeOfferingId', 'NodeType', 'CurrencyCode', 'State', 'OfferingType' @response[name] = value @@ -55,4 +55,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/revoke_cluster_security_group_ingress.rb b/lib/fog/aws/parsers/redshift/revoke_cluster_security_group_ingress.rb index 429c3afa7..129d53660 100644 --- a/lib/fog/aws/parsers/redshift/revoke_cluster_security_group_ingress.rb +++ b/lib/fog/aws/parsers/redshift/revoke_cluster_security_group_ingress.rb @@ -7,7 +7,7 @@ module Fog class RevokeClusterSecurityGroupIngress < ClusterSecurityGroupParser # :cluster_security_group - + def reset super @response = {} @@ -17,7 +17,7 @@ module Fog super end - def end_element(name) + def end_element(name) super case name when 'ClusterSecurityGroup' @@ -28,4 +28,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/redshift/update_cluster_parameter_group_parser.rb b/lib/fog/aws/parsers/redshift/update_cluster_parameter_group_parser.rb index 75bc29a1d..d477c40e0 100644 --- a/lib/fog/aws/parsers/redshift/update_cluster_parameter_group_parser.rb +++ b/lib/fog/aws/parsers/redshift/update_cluster_parameter_group_parser.rb @@ -6,7 +6,7 @@ module Fog class UpdateClusterParameterGroupParser < Fog::Parsers::Base # :parameter_group_name - (String) # :parameter_group_status - (String) - + def reset @response = {} end @@ -15,7 +15,7 @@ module Fog super end - def end_element(name) + def end_element(name) super case name when 'ParameterGroupName', 'ParameterGroupStatus' @@ -26,4 +26,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/simpledb/basic.rb b/lib/fog/aws/parsers/simpledb/basic.rb index b97f24720..95601483d 100644 --- a/lib/fog/aws/parsers/simpledb/basic.rb +++ b/lib/fog/aws/parsers/simpledb/basic.rb @@ -28,4 +28,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/simpledb/domain_metadata.rb b/lib/fog/aws/parsers/simpledb/domain_metadata.rb index 5171f0c05..aed3ff1ee 100644 --- a/lib/fog/aws/parsers/simpledb/domain_metadata.rb +++ b/lib/fog/aws/parsers/simpledb/domain_metadata.rb @@ -25,8 +25,8 @@ module Fog end end - + end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/simpledb/list_domains.rb b/lib/fog/aws/parsers/simpledb/list_domains.rb index f29412696..12a70db1f 100644 --- a/lib/fog/aws/parsers/simpledb/list_domains.rb +++ b/lib/fog/aws/parsers/simpledb/list_domains.rb @@ -27,4 +27,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/parsers/simpledb/select.rb b/lib/fog/aws/parsers/simpledb/select.rb index 29ad57954..ce39786af 100644 --- a/lib/fog/aws/parsers/simpledb/select.rb +++ b/lib/fog/aws/parsers/simpledb/select.rb @@ -19,7 +19,7 @@ module Fog when 'Item' @item_name = @attribute_name = nil when 'Name' - if @item_name.nil? + if @item_name.nil? @item_name = value response['Items'][@item_name] = {} else diff --git a/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb b/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb index 350ac4a21..54f898351 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb @@ -36,7 +36,7 @@ module Fog end elsif @in_transition case name - when 'StorageClass', + when 'StorageClass', @transition['StorageClass'] = value when 'Date' @transition[name] = value @@ -56,7 +56,7 @@ module Fog when 'Rule' @response['Rules'] << @rule @rule = {} - end + end end end end diff --git a/lib/fog/aws/redshift.rb b/lib/fog/aws/redshift.rb index 6b2258a56..09e74b16e 100644 --- a/lib/fog/aws/redshift.rb +++ b/lib/fog/aws/redshift.rb @@ -4,7 +4,7 @@ module Fog module AWS class Redshift < Fog::Service extend Fog::AWS::CredentialFetcher::ServiceMethods - + requires :aws_access_key_id, :aws_secret_access_key recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at @@ -30,21 +30,21 @@ module Fog request :create_cluster_subnet_group request :modify_cluster request :modify_cluster_parameter_group - request :modify_cluster_subnet_group - request :delete_cluster + request :modify_cluster_subnet_group + request :delete_cluster request :delete_cluster_parameter_group request :delete_cluster_security_group request :delete_cluster_snapshot request :delete_cluster_subnet_group - request :authorize_cluster_security_group_ingress - request :authorize_snapshot_access - request :copy_cluster_snapshot - request :purchase_reserved_node_offering + request :authorize_cluster_security_group_ingress + request :authorize_snapshot_access + request :copy_cluster_snapshot + request :purchase_reserved_node_offering request :reboot_cluster - request :reset_cluster_parameter_group - request :restore_from_cluster_snapshot - request :revoke_cluster_security_group_ingress - request :revoke_snapshot_access + request :reset_cluster_parameter_group + request :restore_from_cluster_snapshot + request :revoke_cluster_security_group_ingress + request :revoke_snapshot_access class Mock diff --git a/lib/fog/aws/region_methods.rb b/lib/fog/aws/region_methods.rb index 1e21460d0..80f56d64f 100644 --- a/lib/fog/aws/region_methods.rb +++ b/lib/fog/aws/region_methods.rb @@ -1,7 +1,7 @@ module Fog module AWS module RegionMethods - + def validate_aws_region region unless ['ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1'].include?(region) raise ArgumentError, "Unknown region: #{region.inspect}" diff --git a/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb b/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb index 27218e8ee..9b986ab67 100644 --- a/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +++ b/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb @@ -72,7 +72,7 @@ module Fog if load_balancer_names = options.delete('LoadBalancerNames') options.merge!(AWS.indexed_param('LoadBalancerNames.member.%d', [*load_balancer_names])) end - + if tags = options.delete('Tags') tags.each_with_index do |(key, value), i| options["Tags.member.#{i+1}.Key"] = key.to_s # turns symbol into string @@ -82,7 +82,7 @@ module Fog if termination_policies = options.delete('TerminationPolicies') options.merge!(AWS.indexed_param('TerminationPolicies.member.%d', [*termination_policies])) end - + request({ 'Action' => 'CreateAutoScalingGroup', 'AutoScalingGroupName' => auto_scaling_group_name, diff --git a/lib/fog/aws/requests/auto_scaling/describe_launch_configurations.rb b/lib/fog/aws/requests/auto_scaling/describe_launch_configurations.rb index 85d852cbc..33ff84b2f 100644 --- a/lib/fog/aws/requests/auto_scaling/describe_launch_configurations.rb +++ b/lib/fog/aws/requests/auto_scaling/describe_launch_configurations.rb @@ -90,7 +90,7 @@ module Fog # even a nil object will turn into an empty array lc = [*launch_configuration_names] - launch_configurations = + launch_configurations = if lc.any? lc.map do |lc_name| l_conf = self.data[:launch_configurations].find { |name, data| name == lc_name } diff --git a/lib/fog/aws/requests/auto_scaling/describe_scheduled_actions.rb b/lib/fog/aws/requests/auto_scaling/describe_scheduled_actions.rb index f536fbcb5..ed6d3d488 100644 --- a/lib/fog/aws/requests/auto_scaling/describe_scheduled_actions.rb +++ b/lib/fog/aws/requests/auto_scaling/describe_scheduled_actions.rb @@ -47,8 +47,8 @@ module Fog # group. # * 'MinSize'<~Integer> - The minimum size of the Auto Scaling # group. - # * 'Recurrence'<~String> - The time when recurring future - # actions will start. Start time is specified by the user + # * 'Recurrence'<~String> - The time when recurring future + # actions will start. Start time is specified by the user # following the Unix cron syntax format. # * 'ScheduledActionARN'<~String> - The Amazon Resource Name # (ARN) of this scheduled action. diff --git a/lib/fog/aws/requests/cdn/delete_distribution.rb b/lib/fog/aws/requests/cdn/delete_distribution.rb index 43f7501db..8b9d77971 100644 --- a/lib/fog/aws/requests/cdn/delete_distribution.rb +++ b/lib/fog/aws/requests/cdn/delete_distribution.rb @@ -9,7 +9,7 @@ module Fog # @param etag [String] etag of that distribution from earlier get or put # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteDistribution.html - + def delete_distribution(distribution_id, etag) request({ :expects => 204, diff --git a/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb b/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb index be51da072..2473dffc6 100644 --- a/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb +++ b/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb @@ -9,7 +9,7 @@ module Fog # @param [String] etag Etag of that distribution from earlier get or put # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteStreamingDistribution.html - + def delete_streaming_distribution(distribution_id, etag) request({ :expects => 204, diff --git a/lib/fog/aws/requests/cdn/get_distribution.rb b/lib/fog/aws/requests/cdn/get_distribution.rb index 61f423659..ea01f315e 100644 --- a/lib/fog/aws/requests/cdn/get_distribution.rb +++ b/lib/fog/aws/requests/cdn/get_distribution.rb @@ -37,7 +37,7 @@ module Fog # * TrustedSigners [Array] - Trusted signers. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetDistribution.html - + def get_distribution(distribution_id) request({ :expects => 200, diff --git a/lib/fog/aws/requests/cdn/get_distribution_list.rb b/lib/fog/aws/requests/cdn/get_distribution_list.rb index 570008f03..bbd09c638 100644 --- a/lib/fog/aws/requests/cdn/get_distribution_list.rb +++ b/lib/fog/aws/requests/cdn/get_distribution_list.rb @@ -37,7 +37,7 @@ module Fog # * TrustedSigners [Array] - Trusted signers. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListDistributions.html - # + # def get_distribution_list(options = {}) request({ :expects => 200, diff --git a/lib/fog/aws/requests/cdn/get_invalidation.rb b/lib/fog/aws/requests/cdn/get_invalidation.rb index 57e242ff5..1fc5f1079 100644 --- a/lib/fog/aws/requests/cdn/get_invalidation.rb +++ b/lib/fog/aws/requests/cdn/get_invalidation.rb @@ -6,10 +6,10 @@ module Fog require 'fog/aws/parsers/cdn/get_invalidation' # Get invalidation. - # + # # @param distribution_id [String] Distribution id. # @param invalidation_id [String] Invalidation id. - # + # # @return [Excon::Response] # * body [Hash]: # * Id [String] - Invalidation id. @@ -17,9 +17,9 @@ module Fog # * CreateTime [String] # * InvalidationBatch [Array]: # * Path [String] - # + # # @see http://docs.amazonwebservices.com/AmazonCloudFront/2010-11-01/APIReference/GetInvalidation.html - + def get_invalidation(distribution_id, invalidation_id) request({ :expects => 200, diff --git a/lib/fog/aws/requests/cdn/get_invalidation_list.rb b/lib/fog/aws/requests/cdn/get_invalidation_list.rb index 52ce4adde..6ef2d05d8 100644 --- a/lib/fog/aws/requests/cdn/get_invalidation_list.rb +++ b/lib/fog/aws/requests/cdn/get_invalidation_list.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/cdn/get_invalidation_list' # Get invalidation list. - # + # # @param options [Hash] Config arguments for list. # @option options Marker [String] Limits object keys to only those that appear lexicographically after its value. # @option options MaxItems [Integer] Limits number of object keys returned. @@ -22,7 +22,7 @@ module Fog # * Status [String] # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListInvalidation.html - + def get_invalidation_list(distribution_id, options = {}) request({ :expects => 200, diff --git a/lib/fog/aws/requests/cdn/get_streaming_distribution.rb b/lib/fog/aws/requests/cdn/get_streaming_distribution.rb index d7f9ebd30..dc43cae24 100644 --- a/lib/fog/aws/requests/cdn/get_streaming_distribution.rb +++ b/lib/fog/aws/requests/cdn/get_streaming_distribution.rb @@ -30,7 +30,7 @@ module Fog # * TrustedSigners [Array] - Trusted signers. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetStreamingDistribution.html - + def get_streaming_distribution(distribution_id) request({ :expects => 200, diff --git a/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb b/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb index dd9aa0e35..b7be3eba6 100644 --- a/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb +++ b/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb @@ -7,7 +7,7 @@ module Fog # List information about distributions in CloudFront. # - # @param options [Hash] Config arguments for list. + # @param options [Hash] Config arguments for list. # @option options Marker [String] Limits object keys to only those that appear lexicographically after its value. # @option options MaxItems [Integer] Limits number of object keys returned. # @@ -37,7 +37,7 @@ module Fog # * TrustedSigners [Array] - Trusted signers. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListStreamingDistributions.html - + def get_streaming_distribution_list(options = {}) request({ :expects => 200, diff --git a/lib/fog/aws/requests/cdn/post_distribution.rb b/lib/fog/aws/requests/cdn/post_distribution.rb index a995addfc..09a364069 100644 --- a/lib/fog/aws/requests/cdn/post_distribution.rb +++ b/lib/fog/aws/requests/cdn/post_distribution.rb @@ -8,7 +8,7 @@ module Fog # Create a new distribution in CloudFront. # # @param options [Hash] Config for distribution. - # + # # REQUIRED: # * S3Origin [Hash]: # * DNSName [String] Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'. @@ -50,7 +50,7 @@ module Fog # * TrustedSigners [Array] - Trusted signers. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html - + def post_distribution(options = {}) options['CallerReference'] = Time.now.to_i.to_s data = '' @@ -130,4 +130,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/cdn/post_invalidation.rb b/lib/fog/aws/requests/cdn/post_invalidation.rb index 9bcda0f86..892f5f5c7 100644 --- a/lib/fog/aws/requests/cdn/post_invalidation.rb +++ b/lib/fog/aws/requests/cdn/post_invalidation.rb @@ -21,7 +21,7 @@ module Fog # * CallerReference [String] - Used to prevent replay, defaults to Time.now.to_i.to_s. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html - + def post_invalidation(distribution_id, paths, caller_reference = Time.now.to_i.to_s) body = '' body << "" diff --git a/lib/fog/aws/requests/cdn/post_streaming_distribution.rb b/lib/fog/aws/requests/cdn/post_streaming_distribution.rb index 6b7aeca43..330cd383c 100644 --- a/lib/fog/aws/requests/cdn/post_streaming_distribution.rb +++ b/lib/fog/aws/requests/cdn/post_streaming_distribution.rb @@ -8,7 +8,7 @@ module Fog # Create a new streaming distribution in CloudFront. # # @param options [Hash] Config for distribution. - # + # # REQUIRED: # * S3Origin [Hash]: # * DNSName [String] Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'. @@ -37,7 +37,7 @@ module Fog # * Prefix [String] - Prefix logs are stored with. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateStreamingDistribution.html - + def post_streaming_distribution(options = {}) options['CallerReference'] = Time.now.to_i.to_s data = '' diff --git a/lib/fog/aws/requests/cdn/put_distribution_config.rb b/lib/fog/aws/requests/cdn/put_distribution_config.rb index 806d8c1fa..81d9769e7 100644 --- a/lib/fog/aws/requests/cdn/put_distribution_config.rb +++ b/lib/fog/aws/requests/cdn/put_distribution_config.rb @@ -51,7 +51,7 @@ module Fog # * TrustedSigners [Array] - Trusted signers. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html - + def put_distribution_config(distribution_id, etag, options = {}) data = '' data << "" diff --git a/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb b/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb index 952cd502d..32d3ef2b5 100644 --- a/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb +++ b/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb @@ -9,7 +9,7 @@ module Fog # # @param distribution_id [String] - Id of distribution to update config for. # @param options [Hash] - Config for distribution. - # + # # REQUIRED: # * S3Origin [Hash]: # * DNSName [String] Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'. @@ -40,7 +40,7 @@ module Fog # * TrustedSigners [Array] - Trusted signers. # # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/PutStreamingDistribution.html - + def put_streaming_distribution_config(distribution_id, etag, options = {}) data = '' data << "" diff --git a/lib/fog/aws/requests/cloud_formation/create_stack.rb b/lib/fog/aws/requests/cloud_formation/create_stack.rb index f569e8a66..39cff787f 100644 --- a/lib/fog/aws/requests/cloud_formation/create_stack.rb +++ b/lib/fog/aws/requests/cloud_formation/create_stack.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/cloud_formation/create_stack' # Create a stack. - # + # # * stack_name [String] Name of the stack to create. # * options [Hash]: # * TemplateBody [String] Structure containing the template body. @@ -23,7 +23,7 @@ module Fog # * StackId [String] - Id of the new stack # # @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html - + def create_stack(stack_name, options = {}) params = { 'StackName' => stack_name, @@ -73,7 +73,7 @@ module Fog if options['TimeoutInMinutes'] params['TimeoutInMinutes'] = options['TimeoutInMinutes'] end - + if options['Capabilities'] params.merge!(Fog::AWS.indexed_param("Capabilities.member", [*options['Capabilities']])) end diff --git a/lib/fog/aws/requests/cloud_formation/delete_stack.rb b/lib/fog/aws/requests/cloud_formation/delete_stack.rb index 45da22bca..cab9e6b75 100644 --- a/lib/fog/aws/requests/cloud_formation/delete_stack.rb +++ b/lib/fog/aws/requests/cloud_formation/delete_stack.rb @@ -12,7 +12,7 @@ module Fog # @return [Excon::Response] # # @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DeleteStack.html - + def delete_stack(stack_name) request( 'Action' => 'DeleteStack', diff --git a/lib/fog/aws/requests/cloud_formation/describe_stack_events.rb b/lib/fog/aws/requests/cloud_formation/describe_stack_events.rb index 9331a1330..167c44475 100644 --- a/lib/fog/aws/requests/cloud_formation/describe_stack_events.rb +++ b/lib/fog/aws/requests/cloud_formation/describe_stack_events.rb @@ -26,7 +26,7 @@ module Fog # * ResourceStatusReason [String] - # # @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStackEvents.html - + def describe_stack_events(stack_name, options = {}) request({ 'Action' => 'DescribeStackEvents', diff --git a/lib/fog/aws/requests/cloud_formation/describe_stack_resources.rb b/lib/fog/aws/requests/cloud_formation/describe_stack_resources.rb index c501b919e..72e2ce6a2 100644 --- a/lib/fog/aws/requests/cloud_formation/describe_stack_resources.rb +++ b/lib/fog/aws/requests/cloud_formation/describe_stack_resources.rb @@ -26,7 +26,7 @@ module Fog # * ResourceStatus [String] - # # @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStackResources.html - + def describe_stack_resources(options = {}) request({ 'Action' => 'DescribeStackResources', diff --git a/lib/fog/aws/requests/cloud_formation/describe_stacks.rb b/lib/fog/aws/requests/cloud_formation/describe_stacks.rb index bb44a0f85..e814cb405 100644 --- a/lib/fog/aws/requests/cloud_formation/describe_stacks.rb +++ b/lib/fog/aws/requests/cloud_formation/describe_stacks.rb @@ -25,7 +25,7 @@ module Fog # * OutputValue [String] - # # @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStacks.html - + def describe_stacks(options = {}) request({ 'Action' => 'DescribeStacks', diff --git a/lib/fog/aws/requests/cloud_formation/get_template.rb b/lib/fog/aws/requests/cloud_formation/get_template.rb index 4bb074f5f..9ebf1b6f6 100644 --- a/lib/fog/aws/requests/cloud_formation/get_template.rb +++ b/lib/fog/aws/requests/cloud_formation/get_template.rb @@ -14,7 +14,7 @@ module Fog # * TemplateBody [String] - structure containing the template body (json) # # @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_GetTemplate.html - + def get_template(stack_name) request( 'Action' => 'GetTemplate', diff --git a/lib/fog/aws/requests/cloud_formation/list_stack_resources.rb b/lib/fog/aws/requests/cloud_formation/list_stack_resources.rb index 246f96b35..4425355ef 100644 --- a/lib/fog/aws/requests/cloud_formation/list_stack_resources.rb +++ b/lib/fog/aws/requests/cloud_formation/list_stack_resources.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/cloud_formation/list_stack_resources' # List stack resources. - # + # # @param options [Hash] # @option options StackName [String] Name of the stack to describe. # @@ -22,7 +22,7 @@ module Fog # # # @see http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStacks.html - + def list_stack_resources(options = {}) request({ 'Action' => 'ListStackResources', diff --git a/lib/fog/aws/requests/cloud_formation/list_stacks.rb b/lib/fog/aws/requests/cloud_formation/list_stacks.rb index 4bfbf9268..7e7d4b9b1 100644 --- a/lib/fog/aws/requests/cloud_formation/list_stacks.rb +++ b/lib/fog/aws/requests/cloud_formation/list_stacks.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/cloud_formation/list_stacks' # List stacks. - # + # # @param options [Hash] # # @return [Excon::Response] @@ -23,7 +23,7 @@ module Fog # # # @see http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListStacks.html - + def list_stacks(options = {}) request({ 'Action' => 'ListStacks', diff --git a/lib/fog/aws/requests/cloud_watch/delete_alarms.rb b/lib/fog/aws/requests/cloud_watch/delete_alarms.rb index 4fb6c373e..f0eca8331 100644 --- a/lib/fog/aws/requests/cloud_watch/delete_alarms.rb +++ b/lib/fog/aws/requests/cloud_watch/delete_alarms.rb @@ -8,7 +8,7 @@ module Fog # Delete a list of alarms # ==== Options # * AlarmNames<~Array>: A list of alarms to be deleted - # + # # ==== Returns # * response<~Excon::Response>: # diff --git a/lib/fog/aws/requests/cloud_watch/describe_alarm_history.rb b/lib/fog/aws/requests/cloud_watch/describe_alarm_history.rb index fc20f9629..ef16b654c 100644 --- a/lib/fog/aws/requests/cloud_watch/describe_alarm_history.rb +++ b/lib/fog/aws/requests/cloud_watch/describe_alarm_history.rb @@ -13,7 +13,7 @@ module Fog # * MaxRecords<~Integer>: The maximum number of alarm history records to retrieve # * NextToken<~String> The token returned by a previous call to indicate that there is more data available # * StartData<~DateTime>: The starting date to retrieve alarm history - # + # # ==== Returns # * response<~Excon::Response>: # @@ -27,7 +27,7 @@ module Fog :parser => Fog::Parsers::AWS::CloudWatch::DescribeAlarmHistory.new }.merge(options)) end - end + end end end end diff --git a/lib/fog/aws/requests/cloud_watch/describe_alarms.rb b/lib/fog/aws/requests/cloud_watch/describe_alarms.rb index 0d370d64f..7b53097a6 100644 --- a/lib/fog/aws/requests/cloud_watch/describe_alarms.rb +++ b/lib/fog/aws/requests/cloud_watch/describe_alarms.rb @@ -8,9 +8,9 @@ module Fog # Retrieves alarms with the specified names # ==== Options # * ActionPrefix<~String>: The action name prefix - # * AlarmNamePrefix<~String>: The alarm name prefix. + # * AlarmNamePrefix<~String>: The alarm name prefix. # AlarmNames cannot be specified if this parameter is specified - # * AlarmNames<~Array>: A list of alarm names to retrieve information for. + # * AlarmNames<~Array>: A list of alarm names to retrieve information for. # * MaxRecords<~Integer>: The maximum number of alarm descriptions to retrieve # * NextToken<~String>: The token returned by a previous call to indicate that there is more data available # * NextToken<~String> The token returned by a previous call to indicate that there is more data available diff --git a/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb b/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb index db85c5958..eaa1ef42e 100644 --- a/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb +++ b/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb @@ -1,7 +1,7 @@ module Fog module AWS class CloudWatch - class Real + class Real require 'fog/aws/parsers/cloud_watch/describe_alarms_for_metric' @@ -33,7 +33,7 @@ module Fog :parser => Fog::Parsers::AWS::CloudWatch::DescribeAlarmsForMetric.new }.merge(options)) end - end + end end end end diff --git a/lib/fog/aws/requests/cloud_watch/disable_alarm_actions.rb b/lib/fog/aws/requests/cloud_watch/disable_alarm_actions.rb index 453ba4997..b14f91e09 100644 --- a/lib/fog/aws/requests/cloud_watch/disable_alarm_actions.rb +++ b/lib/fog/aws/requests/cloud_watch/disable_alarm_actions.rb @@ -1,7 +1,7 @@ module Fog module AWS class CloudWatch - class Real + class Real require 'fog/aws/parsers/cloud_watch/disable_alarm_actions' @@ -24,7 +24,7 @@ module Fog :parser => Fog::Parsers::AWS::CloudWatch::DisableAlarmActions.new }.merge(options)) end - end + end end end end diff --git a/lib/fog/aws/requests/cloud_watch/enable_alarm_actions.rb b/lib/fog/aws/requests/cloud_watch/enable_alarm_actions.rb index 2c7f81529..4329610a6 100644 --- a/lib/fog/aws/requests/cloud_watch/enable_alarm_actions.rb +++ b/lib/fog/aws/requests/cloud_watch/enable_alarm_actions.rb @@ -1,7 +1,7 @@ module Fog module AWS class CloudWatch - class Real + class Real require 'fog/aws/parsers/cloud_watch/enable_alarm_actions' @@ -24,7 +24,7 @@ module Fog :parser => Fog::Parsers::AWS::CloudWatch::EnableAlarmActions.new }.merge(options)) end - end + end end end end diff --git a/lib/fog/aws/requests/cloud_watch/set_alarm_state.rb b/lib/fog/aws/requests/cloud_watch/set_alarm_state.rb index cd004b005..722af2602 100644 --- a/lib/fog/aws/requests/cloud_watch/set_alarm_state.rb +++ b/lib/fog/aws/requests/cloud_watch/set_alarm_state.rb @@ -1,7 +1,7 @@ module Fog module AWS class CloudWatch - class Real + class Real require 'fog/aws/parsers/cloud_watch/set_alarm_state' diff --git a/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb b/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb index b385f8bfd..048059b9c 100644 --- a/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb +++ b/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb @@ -24,11 +24,11 @@ module Fog if options['PrivateIpAddresses'] && options['SecondaryPrivateIpAddressCount'] raise Fog::Compute::AWS::Error.new("You may specify secondaryPrivateIpAddressCount or specific secondary private IP addresses, but not both.") end - + if private_ip_addresses = options.delete('PrivateIpAddresses') options.merge!(Fog::AWS.indexed_param('PrivateIpAddress.%d', [*private_ip_addresses])) end - + request({ 'Action' => 'AssignPrivateIpAddresses', 'NetworkInterfaceId' => network_interface_id, @@ -44,7 +44,7 @@ module Fog if options['PrivateIpAddresses'] && options['SecondaryPrivateIpAddressCount'] raise Fog::Compute::AWS::Error.new("You may specify secondaryPrivateIpAddressCount or specific secondary private IP addresses, but not both.") end - + response = Excon::Response.new response.status = 200 response.body = { diff --git a/lib/fog/aws/requests/compute/associate_address.rb b/lib/fog/aws/requests/compute/associate_address.rb index 5deee47e1..d9e366994 100644 --- a/lib/fog/aws/requests/compute/associate_address.rb +++ b/lib/fog/aws/requests/compute/associate_address.rb @@ -8,7 +8,7 @@ module Fog # Associate an elastic IP address with an instance # # ==== Parameters - # * instance_id<~String> - Id of instance to associate address with (conditional) + # * instance_id<~String> - Id of instance to associate address with (conditional) # * public_ip<~String> - Public ip to assign to instance (conditional) # * network_interface_id<~String> - Id of a nic to associate address with (required in a vpc instance with more than one nic) (conditional) # * allocation_id<~String> - Allocation Id to associate address with (vpc only) (conditional) diff --git a/lib/fog/aws/requests/compute/associate_dhcp_options.rb b/lib/fog/aws/requests/compute/associate_dhcp_options.rb index 5a996f0d6..009bee73b 100644 --- a/lib/fog/aws/requests/compute/associate_dhcp_options.rb +++ b/lib/fog/aws/requests/compute/associate_dhcp_options.rb @@ -4,10 +4,10 @@ module Fog class Real require 'fog/aws/parsers/compute/basic' - # + # # # ==== Parameters - # * dhcp_options_id<~String> - The ID of the DHCP options you want to associate with the VPC, or "default" if you want the VPC + # * dhcp_options_id<~String> - The ID of the DHCP options you want to associate with the VPC, or "default" if you want the VPC # to use no DHCP options. # * vpc_id<~String> - The ID of the VPC # diff --git a/lib/fog/aws/requests/compute/associate_route_table.rb b/lib/fog/aws/requests/compute/associate_route_table.rb index ed623c45b..39d909eb5 100755 --- a/lib/fog/aws/requests/compute/associate_route_table.rb +++ b/lib/fog/aws/requests/compute/associate_route_table.rb @@ -56,7 +56,7 @@ module Fog def add_route_association(routeTableId, subnetId, main=nil) response = { - "routeTableAssociationId" => "rtbassoc-#{Fog::Mock.random_hex(8)}", + "routeTableAssociationId" => "rtbassoc-#{Fog::Mock.random_hex(8)}", "routeTableId" => routeTableId, "subnetId" => nil, "main" => false @@ -66,9 +66,9 @@ module Fog else response['subnetId'] = subnetId end - response + response end - + end end end diff --git a/lib/fog/aws/requests/compute/attach_network_interface.rb b/lib/fog/aws/requests/compute/attach_network_interface.rb index f613b1b55..8d63014f7 100644 --- a/lib/fog/aws/requests/compute/attach_network_interface.rb +++ b/lib/fog/aws/requests/compute/attach_network_interface.rb @@ -29,7 +29,7 @@ module Fog ) end end - + class Mock diff --git a/lib/fog/aws/requests/compute/create_image.rb b/lib/fog/aws/requests/compute/create_image.rb index 6a2f5d14d..8fe44eeee 100644 --- a/lib/fog/aws/requests/compute/create_image.rb +++ b/lib/fog/aws/requests/compute/create_image.rb @@ -24,7 +24,7 @@ module Fog params = {} block_device_mappings = options[:block_device_mappings] || [] - params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']}) + params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']}) params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.NoDevice', block_device_mappings.map{|mapping| mapping['NoDevice']}) params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.VirtualName', block_device_mappings.map{|mapping| mapping['VirtualName']}) params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.Ebs.SnapshotId', block_device_mappings.map{|mapping| mapping['Ebs.SnapshotId']}) @@ -45,16 +45,16 @@ module Fog end class Mock - + # Usage - # + # # AWS[:compute].create_image("i-ac65ee8c", "test", "something") # - + def create_image(instance_id, name, description, no_reboot = false, options = {}) params = {} block_device_mappings = options[:block_device_mappings] || [] - params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']}) + params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.DeviceName', block_device_mappings.map{|mapping| mapping['DeviceName']}) params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.NoDevice', block_device_mappings.map{|mapping| mapping['NoDevice']}) params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.VirtualName', block_device_mappings.map{|mapping| mapping['VirtualName']}) params.merge!Fog::AWS.indexed_param('BlockDeviceMapping.%d.Ebs.SnapshotId', block_device_mappings.map{|mapping| mapping['Ebs.SnapshotId']}) diff --git a/lib/fog/aws/requests/compute/create_internet_gateway.rb b/lib/fog/aws/requests/compute/create_internet_gateway.rb index 503d8bd11..c71e84046 100644 --- a/lib/fog/aws/requests/compute/create_internet_gateway.rb +++ b/lib/fog/aws/requests/compute/create_internet_gateway.rb @@ -16,8 +16,8 @@ module Fog # * 'requestId'<~String> - Id of request # * 'internetGateway'<~Array>: # * 'attachmentSet'<~Array>: A list of VPCs attached to the Internet gateway - # * 'vpcId'<~String> - The ID of the VPC the Internet gateway is attached to. - # * 'state'<~String> - The current state of the attachment. + # * 'vpcId'<~String> - The ID of the VPC the Internet gateway is attached to. + # * 'state'<~String> - The current state of the attachment. # * 'tagSet'<~Array>: Tags assigned to the resource. # * 'key'<~String> - Tag's key # * 'value'<~String> - Tag's value diff --git a/lib/fog/aws/requests/compute/create_network_interface.rb b/lib/fog/aws/requests/compute/create_network_interface.rb index 0b283ec92..46261d9db 100644 --- a/lib/fog/aws/requests/compute/create_network_interface.rb +++ b/lib/fog/aws/requests/compute/create_network_interface.rb @@ -26,9 +26,9 @@ module Fog # * 'description'<~String> - The description # * 'ownerId'<~String> - The ID of the person who created the interface # * 'requesterId'<~String> - The ID ot teh entity requesting this interface - # * 'requesterManaged'<~String> - + # * 'requesterManaged'<~String> - # * 'status'<~String> - "available" or "in-use" - # * 'macAddress'<~String> - + # * 'macAddress'<~String> - # * 'privateIpAddress'<~String> - IP address of the interface within the subnet # * 'privateDnsName'<~String> - The private DNS name # * 'sourceDestCheck'<~Boolean> - Flag indicating whether traffic to or from the instance is validated @@ -60,7 +60,7 @@ module Fog end end - + class Mock def create_network_interface(subnetId, options = {}) response = Excon::Response.new diff --git a/lib/fog/aws/requests/compute/create_route.rb b/lib/fog/aws/requests/compute/create_route.rb index 29f2ffb11..edff3eab4 100755 --- a/lib/fog/aws/requests/compute/create_route.rb +++ b/lib/fog/aws/requests/compute/create_route.rb @@ -33,7 +33,7 @@ module Fog elsif instance_id request_vars['InstanceId'] = instance_id elsif network_interface_id - request_vars['NetworkInterfaceId'] = network_interface_id + request_vars['NetworkInterfaceId'] = network_interface_id end request(request_vars) end @@ -54,14 +54,14 @@ module Fog raise Fog::Compute::AWS::NotFound.new("The networkInterface ID '#{network_interface_id}' does not exist") elsif !route_table['routeSet'].find { |route| route['destinationCidrBlock'].eql? destination_cidr_block }.nil? raise Fog::Compute::AWS::Error, "RouteAlreadyExists => The route identified by #{destination_cidr_block} already exists." - else - response = Excon::Response.new + else + response = Excon::Response.new route_table['routeSet'].push({ "destinationCidrBlock" => destination_cidr_block, "gatewayId" => internet_gateway_id, - "instanceId"=>instance_id, - "instanceOwnerId"=>instance_owner_id, - "networkInterfaceId"=>network_interface_id, + "instanceId"=>instance_id, + "instanceOwnerId"=>instance_owner_id, + "networkInterfaceId"=>network_interface_id, "state" => "pending", "origin" => "CreateRoute" }) @@ -82,7 +82,7 @@ module Fog elsif destination_cidr_block.empty? raise Fog::Compute::AWS::InvalidParameterValue.new("Value () for parameter destinationCidrBlock is invalid. This is not a valid CIDR block.") end - end + end end end end diff --git a/lib/fog/aws/requests/compute/create_route_table.rb b/lib/fog/aws/requests/compute/create_route_table.rb index 89a4b633c..77ae4304b 100755 --- a/lib/fog/aws/requests/compute/create_route_table.rb +++ b/lib/fog/aws/requests/compute/create_route_table.rb @@ -32,7 +32,7 @@ module Fog }) end end - + class Mock def create_route_table(vpc_id) response = Excon::Response.new @@ -45,9 +45,9 @@ module Fog 'routeSet' => [{ "destinationCidrBlock" => vpc["cidrBlock"], "gatewayId" => "local", - "instanceId"=>nil, - "instanceOwnerId"=>nil, - "networkInterfaceId"=>nil, + "instanceId"=>nil, + "instanceOwnerId"=>nil, + "networkInterfaceId"=>nil, "state" => "pending", "origin" => "CreateRouteTable" }], @@ -62,7 +62,7 @@ module Fog response else raise Fog::Compute::AWS::NotFound.new("The vpc ID '#{vpc_id}' does not exist") - end + end end end end diff --git a/lib/fog/aws/requests/compute/create_vpc.rb b/lib/fog/aws/requests/compute/create_vpc.rb index 6e018b336..0c169316e 100644 --- a/lib/fog/aws/requests/compute/create_vpc.rb +++ b/lib/fog/aws/requests/compute/create_vpc.rb @@ -10,7 +10,7 @@ module Fog # ==== Parameters # * cidrBlock<~String> - The CIDR block you want the VPC to cover (e.g., 10.0.0.0/16). # * options<~Hash>: - # * InstanceTenancy<~String> - The allowed tenancy of instances launched into the VPC. A value of default + # * InstanceTenancy<~String> - The allowed tenancy of instances launched into the VPC. A value of default # means instances can be launched with any tenancy; a value of dedicated means instances must be launched with tenancy as dedicated. # please not that the documentation is incorrect instanceTenancy will not work while InstanceTenancy will # @@ -37,11 +37,11 @@ module Fog end end - + class Mock def create_vpc(cidrBlock) Excon::Response.new.tap do |response| - if cidrBlock + if cidrBlock response.status = 200 vpc_id = Fog::AWS::Mock.vpc_id self.data[:vpcs].push({ @@ -50,13 +50,13 @@ module Fog 'cidrBlock' => cidrBlock, 'dhcpOptionsId' => Fog::AWS::Mock.request_id, 'tagSet' => {} - + }) #Creates a default route for the subnet default_route = self.route_tables.new(:vpc_id => vpc_id) default_route.save - + # You are not able to push a main route in the normal AWS, so we are re-implementing some of the # associate_route_table here in order to accomplish this. route_table = self.data[:route_tables].find { |routetable| routetable["routeTableId"].eql? default_route.id } diff --git a/lib/fog/aws/requests/compute/delete_dhcp_options.rb b/lib/fog/aws/requests/compute/delete_dhcp_options.rb index dfe2718ed..2ef0611f5 100644 --- a/lib/fog/aws/requests/compute/delete_dhcp_options.rb +++ b/lib/fog/aws/requests/compute/delete_dhcp_options.rb @@ -4,8 +4,8 @@ module Fog class Real require 'fog/aws/parsers/compute/basic' - #Deletes a set of DHCP options that you specify. Amazon VPC returns an error if the set of options you specify is currently - #associated with a VPC. You can disassociate the set of options by associating either a new set of options or the default + #Deletes a set of DHCP options that you specify. Amazon VPC returns an error if the set of options you specify is currently + #associated with a VPC. You can disassociate the set of options by associating either a new set of options or the default #options with the VPC. # # ==== Parameters @@ -26,14 +26,14 @@ module Fog ) end end - + class Mock def delete_dhcp_options(dhcp_options_id) Excon::Response.new.tap do |response| if dhcp_options_id response.status = 200 self.data[:dhcp_options].reject! { |v| v['dhcpOptionsId'] == dhcp_options_id } - + response.body = { 'requestId' => Fog::AWS::Mock.request_id, 'return' => true diff --git a/lib/fog/aws/requests/compute/delete_internet_gateway.rb b/lib/fog/aws/requests/compute/delete_internet_gateway.rb index 271b4a4f7..68c3431d8 100644 --- a/lib/fog/aws/requests/compute/delete_internet_gateway.rb +++ b/lib/fog/aws/requests/compute/delete_internet_gateway.rb @@ -24,14 +24,14 @@ module Fog ) end end - + class Mock def delete_internet_gateway(internet_gateway_id) Excon::Response.new.tap do |response| if internet_gateway_id response.status = 200 self.data[:internet_gateways].delete(internet_gateway_id) - + response.body = { 'requestId' => Fog::AWS::Mock.request_id, 'return' => true diff --git a/lib/fog/aws/requests/compute/delete_network_acl.rb b/lib/fog/aws/requests/compute/delete_network_acl.rb index 5e53ccaff..674bcdac1 100644 --- a/lib/fog/aws/requests/compute/delete_network_acl.rb +++ b/lib/fog/aws/requests/compute/delete_network_acl.rb @@ -24,7 +24,7 @@ module Fog ) end end - + class Mock def delete_network_acl(network_acl_id) response = Excon::Response.new diff --git a/lib/fog/aws/requests/compute/delete_network_acl_entry.rb b/lib/fog/aws/requests/compute/delete_network_acl_entry.rb index 7a4cad8e2..fe7ebf6c2 100644 --- a/lib/fog/aws/requests/compute/delete_network_acl_entry.rb +++ b/lib/fog/aws/requests/compute/delete_network_acl_entry.rb @@ -28,7 +28,7 @@ module Fog ) end end - + class Mock def delete_network_acl_entry(network_acl_id, rule_number, egress) response = Excon::Response.new diff --git a/lib/fog/aws/requests/compute/delete_network_interface.rb b/lib/fog/aws/requests/compute/delete_network_interface.rb index c59f7bab0..40ed0287b 100644 --- a/lib/fog/aws/requests/compute/delete_network_interface.rb +++ b/lib/fog/aws/requests/compute/delete_network_interface.rb @@ -24,7 +24,7 @@ module Fog ) end end - + class Mock def delete_network_interface(network_interface_id) response = Excon::Response.new diff --git a/lib/fog/aws/requests/compute/delete_route.rb b/lib/fog/aws/requests/compute/delete_route.rb index 736af5c63..b7ff8d1d3 100755 --- a/lib/fog/aws/requests/compute/delete_route.rb +++ b/lib/fog/aws/requests/compute/delete_route.rb @@ -5,12 +5,12 @@ module Fog require 'fog/aws/parsers/compute/basic' - # Deletes the specified route from the specified route table. + # Deletes the specified route from the specified route table. # # ==== Parameters # * RouteTableId<~String> - The ID of the route table. # * DestinationCidrBlock<~String> - The CIDR range for the route. The value you specify must match the CIDR for the route exactly. - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: @@ -22,7 +22,7 @@ module Fog request( 'Action' => 'DeleteRoute', 'RouteTableId' => route_table_id, - 'DestinationCidrBlock' => destination_cidr_block, + 'DestinationCidrBlock' => destination_cidr_block, :parser => Fog::Parsers::Compute::AWS::Basic.new ) end @@ -30,7 +30,7 @@ module Fog end class Mock - + def delete_route(route_table_id, destination_cidr_block) route_table = self.data[:route_tables].find { |routetable| routetable["routeTableId"].eql? route_table_id } unless route_table.nil? @@ -48,7 +48,7 @@ module Fog # Cannot delete the default route raise Fog::Compute::AWS::Error, "InvalidParameterValue => cannot remove local route #{destination_cidr_block} in route table #{route_table_id}" else - raise Fog::Compute::AWS::NotFound.new("no route with destination-cidr-block #{destination_cidr_block} in route table #{route_table_id}") + raise Fog::Compute::AWS::NotFound.new("no route with destination-cidr-block #{destination_cidr_block} in route table #{route_table_id}") end else raise Fog::Compute::AWS::NotFound.new("no route with destination-cidr-block #{destination_cidr_block} in route table #{route_table_id}") diff --git a/lib/fog/aws/requests/compute/delete_subnet.rb b/lib/fog/aws/requests/compute/delete_subnet.rb index 19682b8aa..01df8a151 100644 --- a/lib/fog/aws/requests/compute/delete_subnet.rb +++ b/lib/fog/aws/requests/compute/delete_subnet.rb @@ -4,7 +4,7 @@ module Fog class Real require 'fog/aws/parsers/compute/basic' - # Deletes a subnet from a VPC. You must terminate all running instances in the subnet before deleting it, otherwise Amazon + # Deletes a subnet from a VPC. You must terminate all running instances in the subnet before deleting it, otherwise Amazon # VPC returns an error # # ==== Parameters @@ -25,14 +25,14 @@ module Fog ) end end - + class Mock def delete_subnet(subnet_id) Excon::Response.new.tap do |response| if subnet_id self.data[:subnets].reject! { |v| v['subnetId'] == subnet_id } response.status = 200 - + response.body = { 'requestId' => Fog::AWS::Mock.request_id, 'return' => true diff --git a/lib/fog/aws/requests/compute/delete_vpc.rb b/lib/fog/aws/requests/compute/delete_vpc.rb index 1d09cf32c..c547205f4 100644 --- a/lib/fog/aws/requests/compute/delete_vpc.rb +++ b/lib/fog/aws/requests/compute/delete_vpc.rb @@ -28,7 +28,7 @@ module Fog ) end end - + class Mock def delete_vpc(vpc_id) Excon::Response.new.tap do |response| diff --git a/lib/fog/aws/requests/compute/deregister_image.rb b/lib/fog/aws/requests/compute/deregister_image.rb index 8da370d50..bea353d96 100644 --- a/lib/fog/aws/requests/compute/deregister_image.rb +++ b/lib/fog/aws/requests/compute/deregister_image.rb @@ -8,7 +8,7 @@ module Fog # deregister an image # # ==== Parameters - # * image_id<~String> - Id of image to deregister + # * image_id<~String> - Id of image to deregister # # ==== Returns # * response<~Excon::Response>: @@ -31,7 +31,7 @@ module Fog def deregister_image(image_id) response = Excon::Response.new - if image_id + if image_id response.status = 200 response.body = { 'requestId' => Fog::AWS::Mock.request_id, diff --git a/lib/fog/aws/requests/compute/describe_availability_zones.rb b/lib/fog/aws/requests/compute/describe_availability_zones.rb index 4221050a0..45981bc09 100644 --- a/lib/fog/aws/requests/compute/describe_availability_zones.rb +++ b/lib/fog/aws/requests/compute/describe_availability_zones.rb @@ -58,7 +58,7 @@ module Fog {"messageSet" => [], "regionName" => "us-west-2", "zoneName" => "us-west-2a", "zoneState" => "available"}, {"messageSet" => [], "regionName" => "us-west-2", "zoneName" => "us-west-2b", "zoneState" => "available"}, - + {"messageSet" => [], "regionName" => "sa-east-1", "zoneName" => "sa-east-1a", "zoneState" => "available"}, {"messageSet" => [], "regionName" => "sa-east-1", "zoneName" => "sa-east-1b", "zoneState" => "available"}, diff --git a/lib/fog/aws/requests/compute/describe_dhcp_options.rb b/lib/fog/aws/requests/compute/describe_dhcp_options.rb index 933cce554..3e1a7448c 100644 --- a/lib/fog/aws/requests/compute/describe_dhcp_options.rb +++ b/lib/fog/aws/requests/compute/describe_dhcp_options.rb @@ -38,7 +38,7 @@ module Fog }.merge!(params)) end end - + class Mock def describe_dhcp_options(filters = {}) Excon::Response.new.tap do |response| diff --git a/lib/fog/aws/requests/compute/describe_internet_gateways.rb b/lib/fog/aws/requests/compute/describe_internet_gateways.rb index a2d7fa51f..f73f20e13 100644 --- a/lib/fog/aws/requests/compute/describe_internet_gateways.rb +++ b/lib/fog/aws/requests/compute/describe_internet_gateways.rb @@ -15,7 +15,7 @@ module Fog # * body<~Hash>: # * 'requestId'<~String> - Id of request # * 'InternetGatewaySet'<~Array>: - # * 'internetGatewayId'<~String> - The ID of the Internet gateway. + # * 'internetGatewayId'<~String> - The ID of the Internet gateway. # * 'attachmentSet'<~Array>: - A list of VPCs attached to the Internet gateway # * 'vpcId'<~String> - The ID of the VPC the Internet gateway is attached to # * 'state'<~String> - The current state of the attachment diff --git a/lib/fog/aws/requests/compute/describe_network_interface_attribute.rb b/lib/fog/aws/requests/compute/describe_network_interface_attribute.rb index 32abcb260..134451257 100644 --- a/lib/fog/aws/requests/compute/describe_network_interface_attribute.rb +++ b/lib/fog/aws/requests/compute/describe_network_interface_attribute.rb @@ -39,7 +39,7 @@ module Fog ) end end - + class Mock def describe_network_interface_attribute(network_interface_id, attribute) response = Excon::Response.new diff --git a/lib/fog/aws/requests/compute/describe_network_interfaces.rb b/lib/fog/aws/requests/compute/describe_network_interfaces.rb index b3f6bbee7..193f7e9a5 100644 --- a/lib/fog/aws/requests/compute/describe_network_interfaces.rb +++ b/lib/fog/aws/requests/compute/describe_network_interfaces.rb @@ -22,9 +22,9 @@ module Fog # * 'description'<~String> - The description # * 'ownerId'<~String> - The ID of the person who created the interface # * 'requesterId'<~String> - The ID ot teh entity requesting this interface - # * 'requesterManaged'<~String> - + # * 'requesterManaged'<~String> - # * 'status'<~String> - "available" or "in-use" - # * 'macAddress'<~String> - + # * 'macAddress'<~String> - # * 'privateIpAddress'<~String> - IP address of the interface within the subnet # * 'privateDnsName'<~String> - The private DNS name # * 'sourceDestCheck'<~Boolean> - Flag indicating whether traffic to or from the instance is validated @@ -62,7 +62,7 @@ module Fog }.merge!(params)) end end - + class Mock diff --git a/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb b/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb index 5b61a06d8..7a52f6af2 100644 --- a/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb +++ b/lib/fog/aws/requests/compute/describe_reserved_instances_offerings.rb @@ -2,7 +2,7 @@ module Fog module Compute class AWS class Real - + require 'fog/aws/parsers/compute/describe_reserved_instances_offerings' # Describe all or specified reserved instances offerings @@ -16,7 +16,7 @@ module Fog # * 'OfferingType'<~String> - type of offering, in ['Heavy Utilization', 'Medium Utilization', 'Light Utilization'] # * 'ProductDescription'<~String> - description of offering, in ['Linux/UNIX', 'Linux/UNIX (Amazon VPC)', 'Windows', 'Windows (Amazon VPC)'] # * 'MaxDuration'<~Integer> - maximum duration (in seconds) of offering - # * 'MinDuration'<~Integer> - minimum duration (in seconds) of offering + # * 'MinDuration'<~Integer> - minimum duration (in seconds) of offering # # ==== Returns # * response<~Excon::Response>: diff --git a/lib/fog/aws/requests/compute/describe_subnets.rb b/lib/fog/aws/requests/compute/describe_subnets.rb index 2204d7c4c..0af202c3f 100644 --- a/lib/fog/aws/requests/compute/describe_subnets.rb +++ b/lib/fog/aws/requests/compute/describe_subnets.rb @@ -19,7 +19,7 @@ module Fog # * 'state'<~String> - The current state of the Subnet. ['pending', 'available'] # * 'vpcId'<~String> - The ID of the VPC the subnet is in # * 'cidrBlock'<~String> - The CIDR block the Subnet covers. - # * 'availableIpAddressCount'<~Integer> - The number of unused IP addresses in the subnet (the IP addresses for any + # * 'availableIpAddressCount'<~Integer> - The number of unused IP addresses in the subnet (the IP addresses for any # stopped instances are considered unavailable) # * 'availabilityZone'<~String> - The Availability Zone the subnet is in. # * 'tagSet'<~Array>: Tags assigned to the resource. diff --git a/lib/fog/aws/requests/compute/describe_tags.rb b/lib/fog/aws/requests/compute/describe_tags.rb index f490fa87f..1c0a2b63d 100644 --- a/lib/fog/aws/requests/compute/describe_tags.rb +++ b/lib/fog/aws/requests/compute/describe_tags.rb @@ -30,14 +30,14 @@ module Fog }.merge!(params)) end end - + class Mock def describe_tags(filters = {}) response = Excon::Response.new tag_set = deep_clone(self.data[:tags]) - + aliases = { 'key' => 'key', 'resource-id' => 'resourceId', @@ -58,7 +58,7 @@ module Fog filter_resources(tag_set, 'resourceType', filter_value) end end - + tagged_resources = [] tag_set.each do |key, values| values.each do |value, resources| @@ -78,9 +78,9 @@ module Fog } response end - + private - + def filter_resources(tag_set, filter, value) value_hash_list = tag_set.values value_hash_list.each do |value_hash| @@ -89,7 +89,7 @@ module Fog end end end - + def deep_clone(obj) case obj when Hash @@ -101,7 +101,7 @@ module Fog end end end - + end end end diff --git a/lib/fog/aws/requests/compute/detach_network_interface.rb b/lib/fog/aws/requests/compute/detach_network_interface.rb index 44247e56d..c1004fa28 100644 --- a/lib/fog/aws/requests/compute/detach_network_interface.rb +++ b/lib/fog/aws/requests/compute/detach_network_interface.rb @@ -26,7 +26,7 @@ module Fog ) end end - + class Mock def detach_network_interface(attachment_id, force = false) response = Excon::Response.new diff --git a/lib/fog/aws/requests/compute/disassociate_route_table.rb b/lib/fog/aws/requests/compute/disassociate_route_table.rb index 8275f7123..67e6cd79b 100755 --- a/lib/fog/aws/requests/compute/disassociate_route_table.rb +++ b/lib/fog/aws/requests/compute/disassociate_route_table.rb @@ -9,7 +9,7 @@ module Fog # # ==== Parameters # * AssociationId<~String> - The association ID representing the current association between the route table and subnet. - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: @@ -31,7 +31,7 @@ module Fog def disassociate_route_table(association_id) assoc_array = nil - routetable = self.data[:route_tables].find { |routetable| + routetable = self.data[:route_tables].find { |routetable| assoc_array = routetable["associationSet"].find { |association| association['routeTableAssociationId'].eql? association_id } diff --git a/lib/fog/aws/requests/compute/modify_instance_attribute.rb b/lib/fog/aws/requests/compute/modify_instance_attribute.rb index e5ee0bb1e..3972b3ad0 100644 --- a/lib/fog/aws/requests/compute/modify_instance_attribute.rb +++ b/lib/fog/aws/requests/compute/modify_instance_attribute.rb @@ -20,7 +20,7 @@ module Fog # 'GroupId'<~Array> - One or more groups to add instance to (VPC only) # # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html] - # + # def modify_instance_attribute(instance_id, attributes) params = {} params.merge!(Fog::AWS.indexed_param('GroupId', attributes.delete('GroupId') || [])) diff --git a/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb b/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb index 2b2a294e2..12f6370f5 100644 --- a/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb +++ b/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb @@ -42,13 +42,13 @@ module Fog }.merge!(params)) end end - + class Mock def modify_network_interface_attribute(network_interface_id, attribute, value) response = Excon::Response.new if self.data[:network_interfaces][network_interface_id] nic = self.data[:network_interfaces][network_interface_id] - + case attribute when 'description' nic['description'] = value.clone diff --git a/lib/fog/aws/requests/compute/modify_snapshot_attribute.rb b/lib/fog/aws/requests/compute/modify_snapshot_attribute.rb index bb12e49b2..698cd9293 100644 --- a/lib/fog/aws/requests/compute/modify_snapshot_attribute.rb +++ b/lib/fog/aws/requests/compute/modify_snapshot_attribute.rb @@ -2,7 +2,7 @@ module Fog module Compute class AWS class Real - + require 'fog/aws/parsers/compute/basic' # Modify snapshot attributes diff --git a/lib/fog/aws/requests/compute/modify_vpc_attribute.rb b/lib/fog/aws/requests/compute/modify_vpc_attribute.rb index abdb5cffc..d3634c840 100644 --- a/lib/fog/aws/requests/compute/modify_vpc_attribute.rb +++ b/lib/fog/aws/requests/compute/modify_vpc_attribute.rb @@ -12,8 +12,8 @@ module Fog # * options<~Hash>: # * enableDnsSupport<~Boolean> - Indicates whether DNS resolution is supported for the VPC. If this attribute is true, the Amazon DNS # server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not. - # * enableDnsHostnames<~Boolean> - Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, - # instances in the VPC get DNS hostnames; otherwise, they do not. You can only set enableDnsHostnames to true if you also set the + # * enableDnsHostnames<~Boolean> - Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, + # instances in the VPC get DNS hostnames; otherwise, they do not. You can only set enableDnsHostnames to true if you also set the # EnableDnsSupport attribute to true. # # ==== Returns diff --git a/lib/fog/aws/requests/compute/replace_network_acl_association.rb b/lib/fog/aws/requests/compute/replace_network_acl_association.rb index 3d7f9e710..bcdb544f7 100644 --- a/lib/fog/aws/requests/compute/replace_network_acl_association.rb +++ b/lib/fog/aws/requests/compute/replace_network_acl_association.rb @@ -4,7 +4,7 @@ module Fog class Real require 'fog/aws/parsers/compute/replace_network_acl_association' - # Replace the network ACL for a subnet with a + # Replace the network ACL for a subnet with a # # ==== Parameters # * association_id<~String> - The ID of the current association between the original network ACL and the subnet diff --git a/lib/fog/aws/requests/compute/reset_network_interface_attribute.rb b/lib/fog/aws/requests/compute/reset_network_interface_attribute.rb index 5c490ac9f..79539d197 100644 --- a/lib/fog/aws/requests/compute/reset_network_interface_attribute.rb +++ b/lib/fog/aws/requests/compute/reset_network_interface_attribute.rb @@ -4,7 +4,7 @@ module Fog class Real require 'fog/aws/parsers/compute/basic' - + # Resets a network interface attribute value # # ==== Parameters @@ -30,7 +30,7 @@ module Fog ) end end - + class Mock def reset_network_interface_attribute(network_interface_id, attribute) response = Excon::Response.new diff --git a/lib/fog/aws/requests/compute/unmonitor_instances.rb b/lib/fog/aws/requests/compute/unmonitor_instances.rb index 159a99bbb..d8ab41904 100644 --- a/lib/fog/aws/requests/compute/unmonitor_instances.rb +++ b/lib/fog/aws/requests/compute/unmonitor_instances.rb @@ -46,7 +46,7 @@ module Fog response.body = {'requestId' => 'some_request_id', 'instancesSet' => instances_set} response end - + end end diff --git a/lib/fog/aws/requests/data_pipeline/list_pipelines.rb b/lib/fog/aws/requests/data_pipeline/list_pipelines.rb index 3b3e792e1..40e0574a1 100644 --- a/lib/fog/aws/requests/data_pipeline/list_pipelines.rb +++ b/lib/fog/aws/requests/data_pipeline/list_pipelines.rb @@ -7,7 +7,7 @@ module Fog # List all pipelines # http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_ListPipelines.html # ==== Parameters - # * Marker <~String> - The starting point for the results to be returned. + # * Marker <~String> - The starting point for the results to be returned. # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: diff --git a/lib/fog/aws/requests/dns/change_resource_record_sets.rb b/lib/fog/aws/requests/dns/change_resource_record_sets.rb index 8e4c2f9b7..7e7e35e00 100644 --- a/lib/fog/aws/requests/dns/change_resource_record_sets.rb +++ b/lib/fog/aws/requests/dns/change_resource_record_sets.rb @@ -151,7 +151,7 @@ module Fog if zone[:records][change[:type]][change[:name]].nil? # raise change.to_s if change[:resource_records].nil? - zone[:records][change[:type]][change[:name]] = + zone[:records][change[:type]][change[:name]] = if change[:alias_target] record = { :alias_target => change[:alias_target] diff --git a/lib/fog/aws/requests/elasticache/create_cache_subnet_group.rb b/lib/fog/aws/requests/elasticache/create_cache_subnet_group.rb index 348a2cf05..45be85e78 100644 --- a/lib/fog/aws/requests/elasticache/create_cache_subnet_group.rb +++ b/lib/fog/aws/requests/elasticache/create_cache_subnet_group.rb @@ -16,11 +16,11 @@ module Fog # * response<~Excon::Response>: # * body<~Hash>: def create_cache_subnet_group(name, subnet_ids, description = name) - params = { + params = { 'Action' => 'CreateCacheSubnetGroup', 'CacheSubnetGroupName' => name, 'CacheSubnetGroupDescription' => description, - :parser => Fog::Parsers::AWS::Elasticache::CreateCacheSubnetGroup.new + :parser => Fog::Parsers::AWS::Elasticache::CreateCacheSubnetGroup.new } params.merge!(Fog::AWS.indexed_param("SubnetIds.member", Array(subnet_ids))) request(params) diff --git a/lib/fog/aws/requests/elasticache/describe_reserved_cache_nodes.rb b/lib/fog/aws/requests/elasticache/describe_reserved_cache_nodes.rb index aa8f04b51..cd887adfa 100644 --- a/lib/fog/aws/requests/elasticache/describe_reserved_cache_nodes.rb +++ b/lib/fog/aws/requests/elasticache/describe_reserved_cache_nodes.rb @@ -1,6 +1,6 @@ module Fog module AWS - class Elasticache + class Elasticache class Real require 'fog/aws/parsers/elasticache/describe_reserved_cache_nodes' @@ -21,7 +21,7 @@ module Fog if opts[:max_records] params['MaxRecords'] = opts[:max_records] end - + request({ 'Action' => 'DescribeReservedCacheNodes', :parser => Fog::Parsers::AWS::Elasticache::DescribeReservedCacheNodes.new diff --git a/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb b/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb index c239a67bf..8eeec0b9e 100644 --- a/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb +++ b/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb @@ -8,7 +8,7 @@ module Fog # Describe the load balancer attributes # http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DescribeLoadBalancerAttributes.html # ==== Parameters - # * lb_name<~String> - The mnemonic name associated with the LoadBalancer. + # * lb_name<~String> - The mnemonic name associated with the LoadBalancer. # # ==== Returns # * response<~Excon::Response>: diff --git a/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb b/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb index 39c8fa8a1..8b51ce9f1 100644 --- a/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb +++ b/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb @@ -41,7 +41,7 @@ module Fog if attributes['CrossZoneLoadBalancing'] load_balancer['LoadBalancerAttributes'].merge! attributes end - + response = Excon::Response.new response.status = 200 diff --git a/lib/fog/aws/requests/emr/add_instance_groups.rb b/lib/fog/aws/requests/emr/add_instance_groups.rb index 70deac37b..01969c4ff 100644 --- a/lib/fog/aws/requests/emr/add_instance_groups.rb +++ b/lib/fog/aws/requests/emr/add_instance_groups.rb @@ -16,16 +16,16 @@ module Fog # * 'InstanceType'<~String> - The Amazon EC2 instance type for all instances in the instance group # * 'MarketType'<~String> - ON_DEMAND | SPOT Market type of the Amazon EC2 instances used to create a cluster node # * 'Name'<~String> - Friendly name given to the instance group. - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: def add_instance_groups(job_flow_id, options={}) - + if instance_groups = options.delete('InstanceGroups') options.merge!(Fog::AWS.indexed_param('InstanceGroups.member.%d', [*instance_groups])) end - + request({ 'Action' => 'AddInstanceGroups', 'JobFlowId' => job_flow_id, diff --git a/lib/fog/aws/requests/emr/add_job_flow_steps.rb b/lib/fog/aws/requests/emr/add_job_flow_steps.rb index 00d70c56b..8fe6ae290 100644 --- a/lib/fog/aws/requests/emr/add_job_flow_steps.rb +++ b/lib/fog/aws/requests/emr/add_job_flow_steps.rb @@ -19,16 +19,16 @@ module Fog # * 'Key'<~String> - The unique identifier of a key value pair # * 'Value'<~String> - The value part of the identified key # * 'Name'<~String> - The name of the job flow step - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: def add_job_flow_steps(job_flow_id, options={}) - + if steps = options.delete('Steps') options.merge!(Fog::AWS.serialize_keys('Steps', steps)) end - + request({ 'Action' => 'AddJobFlowSteps', 'JobFlowId' => job_flow_id, diff --git a/lib/fog/aws/requests/emr/describe_job_flows.rb b/lib/fog/aws/requests/emr/describe_job_flows.rb index e57f1756b..de12b21c5 100644 --- a/lib/fog/aws/requests/emr/describe_job_flows.rb +++ b/lib/fog/aws/requests/emr/describe_job_flows.rb @@ -12,7 +12,7 @@ module Fog # * CreatedBefore <~DateTime> - Return only job flows created before this date and time # * JobFlowIds <~String list> - Return only job flows whose job flow ID is contained in this list # * JobFlowStates <~String list> - RUNNING | WAITING | SHUTTING_DOWN | STARTING Return only job flows whose state is contained in this list - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: @@ -80,15 +80,15 @@ module Fog # * 'Value'<~String> - The value part of the identified key # * 'Name'<~String> - The name of the job flow step def describe_job_flows(options={}) - + if job_ids = options.delete('JobFlowIds') options.merge!(Fog::AWS.serialize_keys('JobFlowIds', job_ids)) end - + if job_states = options.delete('JobFlowStates') options.merge!(Fog::AWS.serialize_keys('JobFlowStates', job_states)) end - + request({ 'Action' => 'DescribeJobFlows', :parser => Fog::Parsers::AWS::EMR::DescribeJobFlows.new, diff --git a/lib/fog/aws/requests/emr/modify_instance_groups.rb b/lib/fog/aws/requests/emr/modify_instance_groups.rb index 147a432b6..cca9dafc0 100644 --- a/lib/fog/aws/requests/emr/modify_instance_groups.rb +++ b/lib/fog/aws/requests/emr/modify_instance_groups.rb @@ -11,16 +11,16 @@ module Fog # * InstanceGroups <~InstanceGroupModifyConfig list> - Instance groups to change # * InstanceCount <~Integer> - Target size for instance group # * InstanceGroupId <~String> - Unique ID of the instance group to expand or shrink - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash> def modify_instance_groups(options={}) - + if job_ids = options.delete('InstanceGroups') options.merge!(Fog::AWS.serialize_keys('InstanceGroups', job_ids)) end - + request({ 'Action' => 'ModifyInstanceGroups', :parser => Fog::Parsers::AWS::EMR::ModifyInstanceGroups.new, diff --git a/lib/fog/aws/requests/emr/run_job_flow.rb b/lib/fog/aws/requests/emr/run_job_flow.rb index ff1566732..8c994d17e 100644 --- a/lib/fog/aws/requests/emr/run_job_flow.rb +++ b/lib/fog/aws/requests/emr/run_job_flow.rb @@ -43,31 +43,31 @@ module Fog # * 'Key'<~String> - The unique identifier of a key value pair # * 'Value'<~String> - The value part of the identified key # * 'Name'<~String> - The name of the job flow step - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: def run_job_flow(name, options={}) - + if bootstrap_actions = options.delete('BootstrapActions') options.merge!(Fog::AWS.serialize_keys('BootstrapActions', bootstrap_actions)) end - + if instances = options.delete('Instances') options.merge!(Fog::AWS.serialize_keys('Instances', instances)) end - + if steps = options.delete('Steps') options.merge!(Fog::AWS.serialize_keys('Steps', steps)) end - + request({ 'Action' => 'RunJobFlow', 'Name' => name, :parser => Fog::Parsers::AWS::EMR::RunJobFlow.new, }.merge(options)) end - + def run_hive(name, options={}) steps = [] steps << { @@ -77,7 +77,7 @@ module Fog 'Args' => ['s3://us-east-1.elasticmapreduce/libs/hive/hive-script', '--base-path', 's3://us-east-1.elasticmapreduce/libs/hive/', '--install-hive']}, 'ActionOnFailure' => 'TERMINATE_JOB_FLOW' } - + # To add a configuration step to the Hive flow, see the step below # steps << { # 'Name' => 'Install Hive Site Configuration', @@ -87,11 +87,11 @@ module Fog # 'ActionOnFailure' => 'TERMINATE_JOB_FLOW' # } options['Steps'] = steps - + if not options['Instances'].nil? options['Instances']['KeepJobFlowAliveWhenNoSteps'] = true end - + run_job_flow name, options end end diff --git a/lib/fog/aws/requests/emr/set_termination_protection.rb b/lib/fog/aws/requests/emr/set_termination_protection.rb index b25eedff0..4f90f7c82 100644 --- a/lib/fog/aws/requests/emr/set_termination_protection.rb +++ b/lib/fog/aws/requests/emr/set_termination_protection.rb @@ -10,12 +10,12 @@ module Fog # ==== Parameters # * JobFlowIds <~String list> - list of strings that uniquely identify the job flows to protect # * TerminationProtected <~Boolean> - indicates whether to protect the job flow - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash> def set_termination_protection(is_protected, options={}) - + if job_ids = options.delete('JobFlowIds') options.merge!(Fog::AWS.serialize_keys('JobFlowIds', job_ids)) end diff --git a/lib/fog/aws/requests/emr/terminate_job_flows.rb b/lib/fog/aws/requests/emr/terminate_job_flows.rb index 66ec4b881..5616c904a 100644 --- a/lib/fog/aws/requests/emr/terminate_job_flows.rb +++ b/lib/fog/aws/requests/emr/terminate_job_flows.rb @@ -9,12 +9,12 @@ module Fog # http://docs.amazonwebservices.com/ElasticMapReduce/latest/API/API_TerminateJobFlows.html # ==== Parameters # * JobFlowIds <~String list> - list of strings that uniquely identify the job flows to protect - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash> def terminate_job_flows(options={}) - + if job_ids = options.delete('JobFlowIds') options.merge!(Fog::AWS.serialize_keys('JobFlowIds', job_ids)) end diff --git a/lib/fog/aws/requests/iam/add_role_to_instance_profile.rb b/lib/fog/aws/requests/iam/add_role_to_instance_profile.rb index 80f517947..bb89f898c 100644 --- a/lib/fog/aws/requests/iam/add_role_to_instance_profile.rb +++ b/lib/fog/aws/requests/iam/add_role_to_instance_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Add a role to an instance profile - # + # # ==== Parameters # * instance_profile_name<~String>: Name of the instance profile to update. # * role_name<~String>:Name of the role to add. diff --git a/lib/fog/aws/requests/iam/add_user_to_group.rb b/lib/fog/aws/requests/iam/add_user_to_group.rb index fe92a9463..6ea8175d7 100644 --- a/lib/fog/aws/requests/iam/add_user_to_group.rb +++ b/lib/fog/aws/requests/iam/add_user_to_group.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Add a user to a group - # + # # ==== Parameters # * group_name<~String>: name of the group # * user_name<~String>: name of user to add diff --git a/lib/fog/aws/requests/iam/create_access_key.rb b/lib/fog/aws/requests/iam/create_access_key.rb index 409f0b2ad..f0113bbd0 100644 --- a/lib/fog/aws/requests/iam/create_access_key.rb +++ b/lib/fog/aws/requests/iam/create_access_key.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/create_access_key' # Create a access keys for user (by default detects user from access credentials) - # + # # ==== Parameters # * options<~Hash>: # * 'UserName'<~String> - name of the user to create (do not include path) diff --git a/lib/fog/aws/requests/iam/create_group.rb b/lib/fog/aws/requests/iam/create_group.rb index e28eb7dba..9c9177405 100644 --- a/lib/fog/aws/requests/iam/create_group.rb +++ b/lib/fog/aws/requests/iam/create_group.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/create_group' # Create a new group - # + # # ==== Parameters # * group_name<~String>: name of the group to create (do not include path) # * path<~String>: optional path to group, defaults to '/' diff --git a/lib/fog/aws/requests/iam/create_instance_profile.rb b/lib/fog/aws/requests/iam/create_instance_profile.rb index bba783171..34f23f067 100644 --- a/lib/fog/aws/requests/iam/create_instance_profile.rb +++ b/lib/fog/aws/requests/iam/create_instance_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/instance_profile' # Create a new instance_profile - # + # # ==== Parameters # * instance_profile_name<~String>: name of the instance profile to create (do not include path) # * path<~String>: optional path to group, defaults to '/' @@ -23,7 +23,7 @@ module Fog # * Roles<~Array> - # role<~Hash>: # * 'Arn'<~String> - - # * 'AssumeRolePolicyDocument'<~String< + # * 'AssumeRolePolicyDocument'<~String< # * 'Path'<~String> - # * 'RoleId'<~String> - # * 'RoleName'<~String> - diff --git a/lib/fog/aws/requests/iam/create_login_profile.rb b/lib/fog/aws/requests/iam/create_login_profile.rb index 5ca264f73..de16c7ee8 100644 --- a/lib/fog/aws/requests/iam/create_login_profile.rb +++ b/lib/fog/aws/requests/iam/create_login_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/login_profile' # Creates a login profile for a user - # + # # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_CreateLoginProfile.html # ==== Parameters # * user_name<~String> - Name of user to create a login profile for diff --git a/lib/fog/aws/requests/iam/create_role.rb b/lib/fog/aws/requests/iam/create_role.rb index 8fde7a92e..6bb86c2e1 100644 --- a/lib/fog/aws/requests/iam/create_role.rb +++ b/lib/fog/aws/requests/iam/create_role.rb @@ -21,9 +21,9 @@ module Fog require 'fog/aws/parsers/iam/single_role' # Creates a new role for your AWS account - # + # # ==== Parameters - # * RoleName<~String>: name of the role to create + # * RoleName<~String>: name of the role to create # * AssumeRolePolicyDocument<~String>: The policy that grants an entity permission to assume the role. # * Path<~String>: This parameter is optional. If it is not included, it defaults to a slash (/). # ==== Returns @@ -31,7 +31,7 @@ module Fog # * body<~Hash>: # * 'Role'<~Hash>: # * 'Arn'<~String> - - # * 'AssumeRolePolicyDocument'<~String< + # * 'AssumeRolePolicyDocument'<~String< # * 'Path'<~String> - # * 'RoleId'<~String> - # * 'RoleName'<~String> - diff --git a/lib/fog/aws/requests/iam/create_user.rb b/lib/fog/aws/requests/iam/create_user.rb index ecf398ae2..0a354ca32 100644 --- a/lib/fog/aws/requests/iam/create_user.rb +++ b/lib/fog/aws/requests/iam/create_user.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/create_user' # Create a new user - # + # # ==== Parameters # * user_name<~String>: name of the user to create (do not include path) # * path<~String>: optional path to group, defaults to '/' diff --git a/lib/fog/aws/requests/iam/delete_access_key.rb b/lib/fog/aws/requests/iam/delete_access_key.rb index b5bd6157c..74b657d50 100644 --- a/lib/fog/aws/requests/iam/delete_access_key.rb +++ b/lib/fog/aws/requests/iam/delete_access_key.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Delete an access key - # + # # ==== Parameters # * access_key_id<~String> - Access key id to delete # * options<~Hash>: diff --git a/lib/fog/aws/requests/iam/delete_group.rb b/lib/fog/aws/requests/iam/delete_group.rb index 2d9b40868..fe5138496 100644 --- a/lib/fog/aws/requests/iam/delete_group.rb +++ b/lib/fog/aws/requests/iam/delete_group.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Delete a group - # + # # ==== Parameters # * group_name<~String>: name of the group to delete # diff --git a/lib/fog/aws/requests/iam/delete_group_policy.rb b/lib/fog/aws/requests/iam/delete_group_policy.rb index 81f9de02e..3952ef27a 100644 --- a/lib/fog/aws/requests/iam/delete_group_policy.rb +++ b/lib/fog/aws/requests/iam/delete_group_policy.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Remove a policy from a group - # + # # ==== Parameters # * group_name<~String>: name of the group # * policy_name<~String>: name of policy document diff --git a/lib/fog/aws/requests/iam/delete_instance_profile.rb b/lib/fog/aws/requests/iam/delete_instance_profile.rb index 282135796..ee81826b2 100644 --- a/lib/fog/aws/requests/iam/delete_instance_profile.rb +++ b/lib/fog/aws/requests/iam/delete_instance_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Delete a instance_profile - # + # # ==== Parameters # * instance_profile_name<~String>: name of the instance_profile to delete # diff --git a/lib/fog/aws/requests/iam/delete_login_profile.rb b/lib/fog/aws/requests/iam/delete_login_profile.rb index 93cd492f5..304978b52 100644 --- a/lib/fog/aws/requests/iam/delete_login_profile.rb +++ b/lib/fog/aws/requests/iam/delete_login_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Deletes a user's login profile - # + # # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_DeleteLoginProfile.html # ==== Parameters # * user_name<~String> - Name of user whose login profile you want to delete diff --git a/lib/fog/aws/requests/iam/delete_role.rb b/lib/fog/aws/requests/iam/delete_role.rb index 1f716588a..bc490ca61 100644 --- a/lib/fog/aws/requests/iam/delete_role.rb +++ b/lib/fog/aws/requests/iam/delete_role.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Delete a role - # + # # ==== Parameters # * role_name<~String>: name of the role to delete # diff --git a/lib/fog/aws/requests/iam/delete_role_policy.rb b/lib/fog/aws/requests/iam/delete_role_policy.rb index b6b94b20a..bcf12915d 100644 --- a/lib/fog/aws/requests/iam/delete_role_policy.rb +++ b/lib/fog/aws/requests/iam/delete_role_policy.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Remove a policy from a role - # + # # ==== Parameters # * role_name<~String>: name of the role # * policy_name<~String>: name of policy document diff --git a/lib/fog/aws/requests/iam/delete_user.rb b/lib/fog/aws/requests/iam/delete_user.rb index 26e2d15b0..7f832bdbc 100644 --- a/lib/fog/aws/requests/iam/delete_user.rb +++ b/lib/fog/aws/requests/iam/delete_user.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Delete a user - # + # # ==== Parameters # * user_name<~String>: name of the user to delete # diff --git a/lib/fog/aws/requests/iam/delete_user_policy.rb b/lib/fog/aws/requests/iam/delete_user_policy.rb index dd022e24d..c72f79bd6 100644 --- a/lib/fog/aws/requests/iam/delete_user_policy.rb +++ b/lib/fog/aws/requests/iam/delete_user_policy.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Remove a policy from a user - # + # # ==== Parameters # * user_name<~String>: name of the user # * policy_name<~String>: name of policy document diff --git a/lib/fog/aws/requests/iam/get_group.rb b/lib/fog/aws/requests/iam/get_group.rb index aa27b8f46..47c3e250f 100644 --- a/lib/fog/aws/requests/iam/get_group.rb +++ b/lib/fog/aws/requests/iam/get_group.rb @@ -6,8 +6,8 @@ module Fog require 'fog/aws/parsers/iam/get_group' # Get Group - # - # ==== Parameters + # + # ==== Parameters # * 'GroupName'<~String>: Name of the Group # * options<~Hash>: # * 'Marker'<~String>: Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received. @@ -45,11 +45,11 @@ module Fog "The user with name #{group_name} cannot be found." ) unless self.data[:groups].key?(group_name) Excon::Response.new.tap do |response| - response.body = { 'Group' => { + response.body = { 'Group' => { 'GroupId' => data[:groups][group_name][:group_id], 'Path' => data[:groups][group_name][:path], 'GroupName' => group_name, - 'Arn' => (data[:groups][group_name][:arn]).strip + 'Arn' => (data[:groups][group_name][:arn]).strip }, 'Users' => data[:groups][group_name][:members].map { |user| get_user(user).body['User'] }, 'RequestId' => Fog::AWS::Mock.request_id } diff --git a/lib/fog/aws/requests/iam/get_instance_profile.rb b/lib/fog/aws/requests/iam/get_instance_profile.rb index 17bc150d6..069951d81 100644 --- a/lib/fog/aws/requests/iam/get_instance_profile.rb +++ b/lib/fog/aws/requests/iam/get_instance_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/instance_profile' # Retrieves information about an instance profile - # + # # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_GetInstanceProfile.html # ==== Parameters # * instance_profile_name<~String> - Name of instance_profile to retrieve the information for @@ -23,7 +23,7 @@ module Fog # * Roles<~Array> - # role<~Hash>: # * 'Arn'<~String> - - # * 'AssumeRolePolicyDocument'<~String< + # * 'AssumeRolePolicyDocument'<~String< # * 'Path'<~String> - # * 'RoleId'<~String> - # * 'RoleName'<~String> - diff --git a/lib/fog/aws/requests/iam/get_login_profile.rb b/lib/fog/aws/requests/iam/get_login_profile.rb index 9305d8e4d..1c3d5cd10 100644 --- a/lib/fog/aws/requests/iam/get_login_profile.rb +++ b/lib/fog/aws/requests/iam/get_login_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/login_profile' # Retrieves the login profile for a user - # + # # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_CreateLoginProfile.html # ==== Parameters # * user_name<~String> - Name of user to retrieve the login profile for diff --git a/lib/fog/aws/requests/iam/get_role.rb b/lib/fog/aws/requests/iam/get_role.rb index 75f9aff9e..34534e178 100644 --- a/lib/fog/aws/requests/iam/get_role.rb +++ b/lib/fog/aws/requests/iam/get_role.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/single_role' # Get the specified role - # + # # ==== Parameters # role_name<~String> @@ -15,12 +15,12 @@ module Fog # * body<~Hash>: # * Role<~Hash>: # * 'Arn'<~String> - - # * 'AssumeRolePolicyDocument'<~String< + # * 'AssumeRolePolicyDocument'<~String< # * 'Path'<~String> - # * 'RoleId'<~String> - # * 'RoleName'<~String> - # * 'RequestId'<~String> - Id of the request - # + # # ==== See Also # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_GetRole.html # diff --git a/lib/fog/aws/requests/iam/get_role_policy.rb b/lib/fog/aws/requests/iam/get_role_policy.rb index eda5699cc..9dade3876 100644 --- a/lib/fog/aws/requests/iam/get_role_policy.rb +++ b/lib/fog/aws/requests/iam/get_role_policy.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/get_role_policy' # Get Role Policy - # + # # ==== Parameters # * 'PolicyName'<~String>: Name of the policy to get # * 'RoleName'<~String>: Name of the Role who the policy is associated with. diff --git a/lib/fog/aws/requests/iam/get_user.rb b/lib/fog/aws/requests/iam/get_user.rb index 9e7746932..a620213a0 100644 --- a/lib/fog/aws/requests/iam/get_user.rb +++ b/lib/fog/aws/requests/iam/get_user.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/get_user' # Get User - # + # # ==== Parameters # * username # * options<~Hash>: @@ -33,14 +33,14 @@ module Fog end end - + class Mock def get_user(user, options = {}) raise Fog::AWS::IAM::NotFound.new( "The user with name #{user} cannot be found." ) unless self.data[:users].key?(user) Excon::Response.new.tap do |response| - response.body = {'User' => { + response.body = {'User' => { 'UserId' => data[:users][user][:user_id], 'Path' => data[:users][user][:path], 'UserName' => user, diff --git a/lib/fog/aws/requests/iam/list_access_keys.rb b/lib/fog/aws/requests/iam/list_access_keys.rb index 024ae9e7b..5691b3fb1 100644 --- a/lib/fog/aws/requests/iam/list_access_keys.rb +++ b/lib/fog/aws/requests/iam/list_access_keys.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/list_access_keys' # List access_keys - # + # # ==== Parameters # * options<~Hash>: # * 'Marker'<~String> - used to paginate subsequent requests diff --git a/lib/fog/aws/requests/iam/list_account_aliases.rb b/lib/fog/aws/requests/iam/list_account_aliases.rb index 6260c8980..ce5d7ae8f 100644 --- a/lib/fog/aws/requests/iam/list_account_aliases.rb +++ b/lib/fog/aws/requests/iam/list_account_aliases.rb @@ -4,7 +4,7 @@ module Fog class Real require 'fog/aws/parsers/iam/list_account_aliases' - + def list_account_aliases(options = {}) request({ 'Action' => 'ListAccountAliases', diff --git a/lib/fog/aws/requests/iam/list_group_policies.rb b/lib/fog/aws/requests/iam/list_group_policies.rb index 99df3855f..0866424ba 100644 --- a/lib/fog/aws/requests/iam/list_group_policies.rb +++ b/lib/fog/aws/requests/iam/list_group_policies.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/list_policies' # List policies for a group - # + # # ==== Parameters # * group_name<~String> - Name of group to list policies for # * options<~Hash>: Optional diff --git a/lib/fog/aws/requests/iam/list_groups.rb b/lib/fog/aws/requests/iam/list_groups.rb index fd46fc994..e2ffc5738 100644 --- a/lib/fog/aws/requests/iam/list_groups.rb +++ b/lib/fog/aws/requests/iam/list_groups.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/list_groups' # List groups - # + # # ==== Parameters # * options<~Hash>: # * 'Marker'<~String>: used to paginate subsequent requests diff --git a/lib/fog/aws/requests/iam/list_groups_for_user.rb b/lib/fog/aws/requests/iam/list_groups_for_user.rb index e86969c37..1c6446a69 100644 --- a/lib/fog/aws/requests/iam/list_groups_for_user.rb +++ b/lib/fog/aws/requests/iam/list_groups_for_user.rb @@ -12,7 +12,7 @@ module Fog # * options<~Hash>: # * 'Marker'<~String> - used to paginate subsequent requests # * 'MaxItems'<~Integer> - limit results to this number per page - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: diff --git a/lib/fog/aws/requests/iam/list_instance_profiles.rb b/lib/fog/aws/requests/iam/list_instance_profiles.rb index 67c5007a9..45d950a30 100644 --- a/lib/fog/aws/requests/iam/list_instance_profiles.rb +++ b/lib/fog/aws/requests/iam/list_instance_profiles.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/list_instance_profiles' # Lists instance profiles - # + # # ==== Parameters # * options<~Hash>: # * 'Marker'<~String>: used to paginate subsequent requests @@ -26,14 +26,14 @@ module Fog # * Roles<~Array> - # role<~Hash>: # * 'Arn'<~String> - - # * 'AssumeRolePolicyDocument'<~String< + # * 'AssumeRolePolicyDocument'<~String< # * 'Path'<~String> - # * 'RoleId'<~String> - # * 'RoleName'<~String> - # * 'IsTruncated<~Boolean> - Whether or not results were truncated # * 'Marker'<~String> - appears when IsTruncated is true as the next marker to use # * 'RequestId'<~String> - Id of the request - # + # # ==== See Also # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_ListInstanceProfiles.html # diff --git a/lib/fog/aws/requests/iam/list_instance_profiles_for_role.rb b/lib/fog/aws/requests/iam/list_instance_profiles_for_role.rb index a0922dd5e..b8f5e89d2 100644 --- a/lib/fog/aws/requests/iam/list_instance_profiles_for_role.rb +++ b/lib/fog/aws/requests/iam/list_instance_profiles_for_role.rb @@ -26,14 +26,14 @@ module Fog # * Roles<~Array> - # role<~Hash>: # * 'Arn'<~String> - - # * 'AssumeRolePolicyDocument'<~String< + # * 'AssumeRolePolicyDocument'<~String< # * 'Path'<~String> - # * 'RoleId'<~String> - # * 'RoleName'<~String> - # * 'IsTruncated<~Boolean> - Whether or not results were truncated # * 'Marker'<~String> - appears when IsTruncated is true as the next marker to use # * 'RequestId'<~String> - Id of the request - # + # # ==== See Also # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_ListInstanceProfilesForRole.html # diff --git a/lib/fog/aws/requests/iam/list_role_policies.rb b/lib/fog/aws/requests/iam/list_role_policies.rb index c94d72728..60e76de85 100644 --- a/lib/fog/aws/requests/iam/list_role_policies.rb +++ b/lib/fog/aws/requests/iam/list_role_policies.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/list_policies' # Lists the names of policies associated with a role - # + # # ==== Parameters # * role_name<~String>: the role to list policies for # * options<~Hash>: @@ -21,7 +21,7 @@ module Fog # * 'IsTruncated<~Boolean> - Whether or not results were truncated # * 'Marker'<~String> - appears when IsTruncated is true as the next marker to use # * 'RequestId'<~String> - Id of the request - # + # # ==== See Also # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_ListRoleProfiles.html # diff --git a/lib/fog/aws/requests/iam/list_roles.rb b/lib/fog/aws/requests/iam/list_roles.rb index f8cdbaba7..3cc5998a8 100644 --- a/lib/fog/aws/requests/iam/list_roles.rb +++ b/lib/fog/aws/requests/iam/list_roles.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/list_roles' # Lists roles - # + # # ==== Parameters # * options<~Hash>: # * 'Marker'<~String>: used to paginate subsequent requests @@ -19,14 +19,14 @@ module Fog # * Roles<~Array> - # role<~Hash>: # * 'Arn'<~String> - - # * 'AssumeRolePolicyDocument'<~String< + # * 'AssumeRolePolicyDocument'<~String< # * 'Path'<~String> - # * 'RoleId'<~String> - # * 'RoleName'<~String> - # * 'IsTruncated<~Boolean> - Whether or not results were truncated # * 'Marker'<~String> - appears when IsTruncated is true as the next marker to use # * 'RequestId'<~String> - Id of the request - # + # # ==== See Also # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_ListRoles.html # diff --git a/lib/fog/aws/requests/iam/list_user_policies.rb b/lib/fog/aws/requests/iam/list_user_policies.rb index 45b974a97..32d138819 100644 --- a/lib/fog/aws/requests/iam/list_user_policies.rb +++ b/lib/fog/aws/requests/iam/list_user_policies.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/list_policies' # List policies for a user - # + # # ==== Parameters # * user_name<~String> - Name of user to list policies for # * options<~Hash>: Optional diff --git a/lib/fog/aws/requests/iam/list_users.rb b/lib/fog/aws/requests/iam/list_users.rb index 2a6ed3c40..698c99df6 100644 --- a/lib/fog/aws/requests/iam/list_users.rb +++ b/lib/fog/aws/requests/iam/list_users.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/list_users' # List users - # + # # ==== Parameters # * options<~Hash>: # * 'Marker'<~String>: used to paginate subsequent requests diff --git a/lib/fog/aws/requests/iam/put_role_policy.rb b/lib/fog/aws/requests/iam/put_role_policy.rb index 4d21a77bc..257b42d5d 100644 --- a/lib/fog/aws/requests/iam/put_role_policy.rb +++ b/lib/fog/aws/requests/iam/put_role_policy.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Add or update a policy for a role - # + # # ==== Parameters # * role_name<~String>: name of the role # * policy_name<~String>: name of policy document diff --git a/lib/fog/aws/requests/iam/remove_role_from_instance_profile.rb b/lib/fog/aws/requests/iam/remove_role_from_instance_profile.rb index 1aae79aa5..c6c1cfdf8 100644 --- a/lib/fog/aws/requests/iam/remove_role_from_instance_profile.rb +++ b/lib/fog/aws/requests/iam/remove_role_from_instance_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # removes a role from an instance profile - # + # # Make sure you do not have any Amazon EC2 instances running with the role you are about to remove from the instance profile. # ==== Parameters # * instance_profile_name<~String>: Name of the instance profile to update. diff --git a/lib/fog/aws/requests/iam/remove_user_from_group.rb b/lib/fog/aws/requests/iam/remove_user_from_group.rb index 16e847a13..24b19d4c8 100644 --- a/lib/fog/aws/requests/iam/remove_user_from_group.rb +++ b/lib/fog/aws/requests/iam/remove_user_from_group.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Remove a user from a group - # + # # ==== Parameters # * group_name<~String>: name of the group # * user_name<~String>: name of user to remove diff --git a/lib/fog/aws/requests/iam/update_access_key.rb b/lib/fog/aws/requests/iam/update_access_key.rb index 1184b0805..cc9c1413c 100644 --- a/lib/fog/aws/requests/iam/update_access_key.rb +++ b/lib/fog/aws/requests/iam/update_access_key.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Update an access key for a user - # + # # ==== Parameters # * access_key_id<~String> - Access key id to delete # * status<~String> - status of keys in ['Active', 'Inactive'] diff --git a/lib/fog/aws/requests/iam/update_login_profile.rb b/lib/fog/aws/requests/iam/update_login_profile.rb index cc89b40ad..e54357efd 100644 --- a/lib/fog/aws/requests/iam/update_login_profile.rb +++ b/lib/fog/aws/requests/iam/update_login_profile.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/basic' # Updates a login profile for a user - # + # # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_UpdateLoginProfile.html # ==== Parameters # * user_name<~String> - Name of user to change the login profile for diff --git a/lib/fog/aws/requests/iam/update_user.rb b/lib/fog/aws/requests/iam/update_user.rb index 2c31cd664..291dfc5b4 100644 --- a/lib/fog/aws/requests/iam/update_user.rb +++ b/lib/fog/aws/requests/iam/update_user.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/iam/update_user' # Update a user - # + # # ==== Parameters # * user_name<~String> - Required. Name of the User to update. If you're changing the name of the User, this is the original User name. # * options<~Hash>: diff --git a/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb b/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb index 77e1109b5..4760bcc71 100644 --- a/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +++ b/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb @@ -36,9 +36,9 @@ module Fog unless opts.key?('CIDRIP') || (opts.key?('EC2SecurityGroupName') && opts.key?('EC2SecurityGroupOwnerId')) raise ArgumentError, 'Must specify CIDRIP, or both EC2SecurityGroupName and EC2SecurityGroupOwnerId' end - + response = Excon::Response.new - + if sec_group = self.data[:security_groups][name] if opts.key?('CIDRIP') if sec_group['IPRanges'].detect{|h| h['CIDRIP'] == opts['CIDRIP']} @@ -54,7 +54,7 @@ module Fog response.status = 200 response.body = { "ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id }, - 'AuthorizeDBSecurityGroupIngressResult' => { + 'AuthorizeDBSecurityGroupIngressResult' => { 'DBSecurityGroup' => sec_group } } @@ -62,7 +62,7 @@ module Fog else raise Fog::AWS::RDS::NotFound.new("DBSecurityGroupNotFound => #{name} not found") end - + end end diff --git a/lib/fog/aws/requests/rds/create_db_instance.rb b/lib/fog/aws/requests/rds/create_db_instance.rb index c852a2b41..0b8f02215 100644 --- a/lib/fog/aws/requests/rds/create_db_instance.rb +++ b/lib/fog/aws/requests/rds/create_db_instance.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/parsers/rds/create_db_instance' # Create a db instance - # + # # @param DBInstanceIdentifier [String] name of the db instance to modify # @param AllocatedStorage [Integer] Storage space, in GB # @param AutoMinorVersionUpgrade [Boolean] Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window @@ -28,10 +28,10 @@ module Fog # @param DBSubnetGroupName [String] The name, if any, of the VPC subnet for this RDS instance # @param PubliclyAcccesible [Boolean] Whether an RDS instance inside of the VPC subnet should have a public-facing endpoint # @param VpcSecurityGroups [Array] A list of VPC Security Groups to authorize on this DB instance - # + # # @return [Excon::Response]: # * body [Hash]: - # + # # @see http://docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html def create_db_instance(db_name, options={}) @@ -104,7 +104,7 @@ module Fog [{"DBParameterGroupName"=>"default.mysql5.5", "ParameterApplyStatus"=>"in-sync"}], "DBSecurityGroups"=> - [{"Status"=>"active", + [{"Status"=>"active", "DBSecurityGroupName"=>"default"}], "LicenseModel"=>"general-public-license", "PreferredBackupWindow"=>"08:00-08:30", diff --git a/lib/fog/aws/requests/rds/create_db_instance_read_replica.rb b/lib/fog/aws/requests/rds/create_db_instance_read_replica.rb index 0238b1d5f..52af499e7 100644 --- a/lib/fog/aws/requests/rds/create_db_instance_read_replica.rb +++ b/lib/fog/aws/requests/rds/create_db_instance_read_replica.rb @@ -10,7 +10,7 @@ module Fog # ==== Parameters # * DBInstanceIdentifier <~String> - name of the db instance to create # * SourceDBInstanceIdentifier <~String> - name of the db instance that will be the source. Must have backup retention on - # * AutoMinorVersionUpgrade <~Boolean> Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window + # * AutoMinorVersionUpgrade <~Boolean> Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window # * AvailabilityZone <~String> The availability zone to create the instance in # * DBInstanceClass <~String> The new compute and memory capacity of the DB Instance # * Port <~Integer> The port number on which the database accepts connections. @@ -18,8 +18,8 @@ module Fog # * response<~Excon::Response>: # * body<~Hash>: def create_db_instance_read_replica(instance_identifier, source_identifier, options={}) - - + + request({ 'Action' => 'CreateDBInstanceReadReplica', 'DBInstanceIdentifier' => instance_identifier, diff --git a/lib/fog/aws/requests/rds/create_db_parameter_group.rb b/lib/fog/aws/requests/rds/create_db_parameter_group.rb index a11a34955..149785ccd 100644 --- a/lib/fog/aws/requests/rds/create_db_parameter_group.rb +++ b/lib/fog/aws/requests/rds/create_db_parameter_group.rb @@ -11,18 +11,18 @@ module Fog # * DBParameterGroupName <~String> - name of the parameter group # * DBParameterGroupFamily <~String> - The DB parameter group family name. Current valid values: MySQL5.1 | MySQL5.5 # * Description <~String> - The description for the DB Parameter Grou - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: def create_db_parameter_group(group_name, group_family, description) - + request({ 'Action' => 'CreateDBParameterGroup', 'DBParameterGroupName' => group_name, 'DBParameterGroupFamily' => group_family, 'Description' => description, - + :parser => Fog::Parsers::AWS::RDS::CreateDbParameterGroup.new }) end @@ -36,21 +36,21 @@ module Fog if self.data[:parameter_groups] and self.data[:parameter_groups][group_name] raise Fog::AWS::RDS::IdentifierTaken.new("Parameter group #{group_name} already exists") end - + data = { 'DBParameterGroupName' => group_name, 'DBParameterGroupFamily' => group_family.downcase, 'Description' => description } self.data[:parameter_groups][group_name] = data - + response.body = { "ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id }, "CreateDBParameterGroupResult"=> {"DBParameterGroup"=> data} } response.status = 200 response - + end end diff --git a/lib/fog/aws/requests/rds/create_db_security_group.rb b/lib/fog/aws/requests/rds/create_db_security_group.rb index f0d717e30..c259cd271 100644 --- a/lib/fog/aws/requests/rds/create_db_security_group.rb +++ b/lib/fog/aws/requests/rds/create_db_security_group.rb @@ -31,7 +31,7 @@ module Fog if self.data[:security_groups] and self.data[:security_groups][name] raise Fog::AWS::RDS::IdentifierTaken.new("DBInstanceAlreadyExists => The security group '#{name}' already exists") end - + data = { 'DBSecurityGroupName' => name, 'DBSecurityGroupDescription' => description, @@ -45,7 +45,7 @@ module Fog 'CreateDBSecurityGroupResult' => { 'DBSecurityGroup' => data } } response - + end end diff --git a/lib/fog/aws/requests/rds/create_db_snapshot.rb b/lib/fog/aws/requests/rds/create_db_snapshot.rb index 02a9adda1..6edfd69b4 100644 --- a/lib/fog/aws/requests/rds/create_db_snapshot.rb +++ b/lib/fog/aws/requests/rds/create_db_snapshot.rb @@ -41,7 +41,7 @@ module Fog snapshot_data = { 'Status' => 'creating', - 'SnapshotType' => 'manual', + 'SnapshotType' => 'manual', 'DBInstanceIdentifier' => identifier, 'DBSnapshotIdentifier' => name, 'InstanceCreateTime' => Time.now diff --git a/lib/fog/aws/requests/rds/delete_db_instance.rb b/lib/fog/aws/requests/rds/delete_db_instance.rb index e9af95fba..baa333f5c 100644 --- a/lib/fog/aws/requests/rds/delete_db_instance.rb +++ b/lib/fog/aws/requests/rds/delete_db_instance.rb @@ -15,13 +15,13 @@ module Fog # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: - def delete_db_instance(identifier, snapshot_identifier, skip_snapshot = false) + def delete_db_instance(identifier, snapshot_identifier, skip_snapshot = false) params = {} params['FinalDBSnapshotIdentifier'] = snapshot_identifier if snapshot_identifier request({ 'Action' => 'DeleteDBInstance', 'DBInstanceIdentifier' => identifier, - 'SkipFinalSnapshot' => skip_snapshot, + 'SkipFinalSnapshot' => skip_snapshot, :parser => Fog::Parsers::AWS::RDS::DeleteDBInstance.new }.merge(params)) end @@ -32,11 +32,11 @@ module Fog def delete_db_instance(identifier, snapshot_identifier, skip_snapshot = false) response = Excon::Response.new - + unless skip_snapshot create_db_snapshot(identifier, snapshot_identifier) end - + if server_set = self.data[:servers].delete(identifier) response.status = 200 response.body = { diff --git a/lib/fog/aws/requests/rds/delete_db_parameter_group.rb b/lib/fog/aws/requests/rds/delete_db_parameter_group.rb index 02a3b88ca..b4e807db3 100644 --- a/lib/fog/aws/requests/rds/delete_db_parameter_group.rb +++ b/lib/fog/aws/requests/rds/delete_db_parameter_group.rb @@ -13,11 +13,11 @@ module Fog # * response<~Excon::Response>: # * body<~Hash>: def delete_db_parameter_group(group_name) - + request({ 'Action' => 'DeleteDBParameterGroup', 'DBParameterGroupName' => group_name, - + :parser => Fog::Parsers::AWS::RDS::DeleteDbParameterGroup.new }) end @@ -28,7 +28,7 @@ module Fog def delete_db_parameter_group(group_name) response = Excon::Response.new - + if self.data[:parameter_groups].delete(group_name) response.status = 200 response.body = { diff --git a/lib/fog/aws/requests/rds/delete_db_security_group.rb b/lib/fog/aws/requests/rds/delete_db_security_group.rb index 156c84c6d..c1506faa7 100644 --- a/lib/fog/aws/requests/rds/delete_db_security_group.rb +++ b/lib/fog/aws/requests/rds/delete_db_security_group.rb @@ -26,7 +26,7 @@ module Fog def delete_db_security_group(name, description = name) response = Excon::Response.new - + if self.data[:security_groups].delete(name) response.status = 200 response.body = { diff --git a/lib/fog/aws/requests/rds/delete_db_snapshot.rb b/lib/fog/aws/requests/rds/delete_db_snapshot.rb index a08cfcc6e..036b54f0f 100644 --- a/lib/fog/aws/requests/rds/delete_db_snapshot.rb +++ b/lib/fog/aws/requests/rds/delete_db_snapshot.rb @@ -13,11 +13,11 @@ module Fog # * response<~Excon::Response>: # * body<~Hash>: def delete_db_snapshot(name) - + request({ 'Action' => 'DeleteDBSnapshot', 'DBSnapshotIdentifier' => name, - + :parser => Fog::Parsers::AWS::RDS::DeleteDBSnapshot.new }) end diff --git a/lib/fog/aws/requests/rds/describe_db_engine_versions.rb b/lib/fog/aws/requests/rds/describe_db_engine_versions.rb index a0e0c698c..459b4b35d 100644 --- a/lib/fog/aws/requests/rds/describe_db_engine_versions.rb +++ b/lib/fog/aws/requests/rds/describe_db_engine_versions.rb @@ -4,7 +4,7 @@ module Fog class Real require 'fog/aws/parsers/rds/describe_db_engine_versions' - + def describe_db_engine_versions(opts={}) params = {} params['DBParameterGroupFamily'] = opts[:db_parameter_group_family] if opts[:db_parameter_group_family] @@ -13,7 +13,7 @@ module Fog params['EngineVersion'] = opts[:engine_version] if opts[:engine_version] params['Marker'] = opts[:marker] if opts[:marker] params['MaxRecords'] = opts[:max_records] if opts[:max_records] - + request({ 'Action' => 'DescribeDBEngineVersions', :parser => Fog::Parsers::AWS::RDS::DescribeDBEngineVersions.new diff --git a/lib/fog/aws/requests/rds/describe_db_parameter_groups.rb b/lib/fog/aws/requests/rds/describe_db_parameter_groups.rb index d9a033663..992bba45f 100644 --- a/lib/fog/aws/requests/rds/describe_db_parameter_groups.rb +++ b/lib/fog/aws/requests/rds/describe_db_parameter_groups.rb @@ -24,7 +24,7 @@ module Fog if opts[:max_records] params['MaxRecords'] = opts[:max_records] end - + request({ 'Action' => 'DescribeDBParameterGroups', :parser => Fog::Parsers::AWS::RDS::DescribeDBParameterGroups.new @@ -47,7 +47,7 @@ module Fog else parameter_set = self.data[:parameter_groups].values end - + response.status = 200 response.body = { diff --git a/lib/fog/aws/requests/rds/describe_db_parameters.rb b/lib/fog/aws/requests/rds/describe_db_parameters.rb index 8a93a5d6d..cab0967cf 100644 --- a/lib/fog/aws/requests/rds/describe_db_parameters.rb +++ b/lib/fog/aws/requests/rds/describe_db_parameters.rb @@ -24,7 +24,7 @@ module Fog if opts[:max_records] params['MaxRecords'] = opts[:max_records] end - + request({ 'Action' => 'DescribeDBParameters', 'DBParameterGroupName' => name, diff --git a/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb b/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb index ab089110e..e0033a409 100644 --- a/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb +++ b/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb @@ -21,7 +21,7 @@ module Fog if opts[:max_records] params['MaxRecords'] = opts[:max_records] end - + request({ 'Action' => 'DescribeReservedDBInstances', :parser => Fog::Parsers::AWS::RDS::DescribeDBReservedInstances.new diff --git a/lib/fog/aws/requests/rds/describe_db_snapshots.rb b/lib/fog/aws/requests/rds/describe_db_snapshots.rb index 9b635f516..85a80fcb0 100644 --- a/lib/fog/aws/requests/rds/describe_db_snapshots.rb +++ b/lib/fog/aws/requests/rds/describe_db_snapshots.rb @@ -12,7 +12,7 @@ module Fog # * DBSnapshotIdentifier <~String> - ID of snapshot to retrieve information for. if absent information for all snapshots is returned # * SnapshotType <~String> - type of snapshot to retrive (automated|manual) # * Marker <~String> - An optional marker provided in the previous DescribeDBInstances request - # * MaxRecords <~Integer> - Max number of records to return (between 20 and 100) + # * MaxRecords <~Integer> - Max number of records to return (between 20 and 100) # Only one of DBInstanceIdentifier or DBSnapshotIdentifier can be specified # ==== Returns # * response<~Excon::Response>: diff --git a/lib/fog/aws/requests/rds/describe_events.rb b/lib/fog/aws/requests/rds/describe_events.rb index 9fc1d1bfe..c312ada93 100644 --- a/lib/fog/aws/requests/rds/describe_events.rb +++ b/lib/fog/aws/requests/rds/describe_events.rb @@ -1,6 +1,6 @@ module Fog module AWS - class RDS + class RDS class Real require 'fog/aws/parsers/rds/event_list' diff --git a/lib/fog/aws/requests/rds/modify_db_instance.rb b/lib/fog/aws/requests/rds/modify_db_instance.rb index 79088685e..7d921e537 100644 --- a/lib/fog/aws/requests/rds/modify_db_instance.rb +++ b/lib/fog/aws/requests/rds/modify_db_instance.rb @@ -12,12 +12,12 @@ module Fog # * ApplyImmediately <~Boolean> - whether to apply the changes immediately or wait for the next maintenance window # # * AllocatedStorage <~Integer> Storage space, in GB - # * AllowMajorVersionUpgrade <~Boolean> Must be set to true if EngineVersion specifies a different major version - # * AutoMinorVersionUpgrade <~Boolean> Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window + # * AllowMajorVersionUpgrade <~Boolean> Must be set to true if EngineVersion specifies a different major version + # * AutoMinorVersionUpgrade <~Boolean> Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window # * BackupRetentionPeriod <~Integer> 0-8 The number of days to retain automated backups. - # * DBInstanceClass <~String> The new compute and memory capacity of the DB Instanc - # * DBParameterGroupName <~String> The name of the DB Parameter Group to apply to this DB Instance - # * DBSecurityGroups <~Array> A list of DB Security Groups to authorize on this DB Instance + # * DBInstanceClass <~String> The new compute and memory capacity of the DB Instanc + # * DBParameterGroupName <~String> The name of the DB Parameter Group to apply to this DB Instance + # * DBSecurityGroups <~Array> A list of DB Security Groups to authorize on this DB Instance # * EngineVersion <~String> The version number of the database engine to upgrade to. # * Iops <~Integer> IOPS rate # * MasterUserPassword <~String> The new password for the DB Instance master user diff --git a/lib/fog/aws/requests/rds/modify_db_parameter_group.rb b/lib/fog/aws/requests/rds/modify_db_parameter_group.rb index cab76c174..0d29f0d38 100644 --- a/lib/fog/aws/requests/rds/modify_db_parameter_group.rb +++ b/lib/fog/aws/requests/rds/modify_db_parameter_group.rb @@ -13,16 +13,16 @@ module Fog # * 'ParameterName'<~String> - parameter name. # * 'ParameterValue'<~String> - new paremeter value # * 'ApplyMethod'<~String> - immediate | pending-reboot whether to set the parameter immediately or not (may require an instance restart) - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: def modify_db_parameter_group(group_name, parameters) - + parameter_names = [] parameter_values = [] parameter_apply_methods = [] - + parameters.each do |parameter| parameter_names.push(parameter['ParameterName']) parameter_values.push(parameter['ParameterValue']) @@ -32,11 +32,11 @@ module Fog params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ParameterName', parameter_names)) params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ParameterValue', parameter_values)) params.merge!(Fog::AWS.indexed_param('Parameters.member.%d.ApplyMethod', parameter_apply_methods)) - + request({ 'Action' => 'ModifyDBParameterGroup', 'DBParameterGroupName' => group_name, - + :parser => Fog::Parsers::AWS::RDS::ModifyDbParameterGroup.new }.merge(params)) end diff --git a/lib/fog/aws/requests/rds/remove_tags_from_resource.rb b/lib/fog/aws/requests/rds/remove_tags_from_resource.rb index 19b297f69..5eef00273 100644 --- a/lib/fog/aws/requests/rds/remove_tags_from_resource.rb +++ b/lib/fog/aws/requests/rds/remove_tags_from_resource.rb @@ -11,7 +11,7 @@ module Fog # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: - def remove_tags_from_resource(rds_id, keys) + def remove_tags_from_resource(rds_id, keys) request( { 'Action' => 'RemoveTagsFromResource', 'ResourceName' => "arn:aws:rds:#{@region}:#{owner_id}:db:#{rds_id}", diff --git a/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb b/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb index a42457272..b630fb636 100644 --- a/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb +++ b/lib/fog/aws/requests/rds/revoke_db_security_group_ingress.rb @@ -36,9 +36,9 @@ module Fog unless opts.key?('CIDRIP') || (opts.key?('EC2SecurityGroupName') && opts.key?('EC2SecurityGroupOwnerId')) raise ArgumentError, 'Must specify CIDRIP, or both EC2SecurityGroupName and EC2SecurityGroupOwnerId' end - + response = Excon::Response.new - + if sec_group = self.data[:security_groups][name] if opts.key?('CIDRIP') sec_group['IPRanges'].each do |iprange| @@ -52,7 +52,7 @@ module Fog response.status = 200 response.body = { "ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id }, - 'RevokeDBSecurityGroupIngressResult' => { + 'RevokeDBSecurityGroupIngressResult' => { 'DBSecurityGroup' => sec_group } } diff --git a/lib/fog/aws/requests/redshift/authorize_cluster_security_group_ingress.rb b/lib/fog/aws/requests/redshift/authorize_cluster_security_group_ingress.rb index 5cc475376..d53e418bc 100644 --- a/lib/fog/aws/requests/redshift/authorize_cluster_security_group_ingress.rb +++ b/lib/fog/aws/requests/redshift/authorize_cluster_security_group_ingress.rb @@ -5,26 +5,26 @@ module Fog require 'fog/aws/parsers/redshift/revoke_cluster_security_group_ingress' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_security_group_name - required - (String) + # * :cluster_security_group_name - required - (String) # The name of the security Group from which to revoke the ingress rule. - # * :cidrip - (String) - # The IP range for which to revoke access. This range must be a valid Classless - # Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified, + # * :cidrip - (String) + # The IP range for which to revoke access. This range must be a valid Classless + # Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified, # EC2SecurityGroupName and EC2SecurityGroupOwnerId cannot be provided. - # * :ec2_security_group_name - (String) - # The name of the EC2 Security Group whose access is to be revoked. If - # EC2SecurityGroupName is specified, EC2SecurityGroupOwnerId must also be + # * :ec2_security_group_name - (String) + # The name of the EC2 Security Group whose access is to be revoked. If + # EC2SecurityGroupName is specified, EC2SecurityGroupOwnerId must also be # provided and CIDRIP cannot be provided. - # * :ec2_security_group_owner_id - (String) - # The AWS account number of the owner of the security group specified in the - # EC2SecurityGroupName parameter. The AWS access key ID is not an acceptable - # value. If EC2SecurityGroupOwnerId is specified, EC2SecurityGroupName must - # also be provided. and CIDRIP cannot be provided. Example: 111122223333 + # * :ec2_security_group_owner_id - (String) + # The AWS account number of the owner of the security group specified in the + # EC2SecurityGroupName parameter. The AWS access key ID is not an acceptable + # value. If EC2SecurityGroupOwnerId is specified, EC2SecurityGroupName must + # also be provided. and CIDRIP cannot be provided. Example: 111122223333 # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_AuthorizeClusterSecurityGroupIngress.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_AuthorizeClusterSecurityGroupIngress.html def authorize_cluster_security_group_ingress(options = {}) cluster_security_group_name = options[:cluster_security_group_name] cidrip = options[:cidrip] diff --git a/lib/fog/aws/requests/redshift/authorize_snapshot_access.rb b/lib/fog/aws/requests/redshift/authorize_snapshot_access.rb index e549a5396..3c00944a2 100644 --- a/lib/fog/aws/requests/redshift/authorize_snapshot_access.rb +++ b/lib/fog/aws/requests/redshift/authorize_snapshot_access.rb @@ -7,14 +7,14 @@ module Fog # ==== Parameters # # @param [Hash] options - # * :snapshot_identifier - required - (String) + # * :snapshot_identifier - required - (String) # The identifier of the snapshot the account is authorized to restore. # * :snapshot_cluster_identifier - (String) - # * :account_with_restore_access - required - (String) - # The identifier of the AWS customer account authorized to restore the specified snapshot. # + # * :account_with_restore_access - required - (String) + # The identifier of the AWS customer account authorized to restore the specified snapshot. # # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CopyClusterSnapshot.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CopyClusterSnapshot.html def authorize_snapshot_access(options = {}) snapshot_identifier = options[:snapshot_identifier] snapshot_cluster_identifier = options[:snapshot_cluster_identifier] @@ -40,4 +40,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/copy_cluster_snapshot.rb b/lib/fog/aws/requests/redshift/copy_cluster_snapshot.rb index d2e288d58..f9ac15ee7 100644 --- a/lib/fog/aws/requests/redshift/copy_cluster_snapshot.rb +++ b/lib/fog/aws/requests/redshift/copy_cluster_snapshot.rb @@ -5,20 +5,20 @@ module Fog require 'fog/aws/parsers/redshift/cluster_snapshot' # ==== Parameters - # + # # @param [Hash] options - # * :source_snapshot_identifier - required - (String) + # * :source_snapshot_identifier - required - (String) # The identifier for the source snapshot. Constraints: Must be the identifier for # a valid automated snapshot whose state is "available". # * :source_snapshot_cluster_identifier - (String) - # * :target_snapshot_identifier - required - (String) - # The identifier given to the new manual snapshot. Constraints: Cannot be null, + # * :target_snapshot_identifier - required - (String) + # The identifier given to the new manual snapshot. Constraints: Cannot be null, # empty, or blank. Must contain from 1 to 255 alphanumeric characters or hyphens. - # First character must be a letter. Cannot end with a hyphen or contain two + # First character must be a letter. Cannot end with a hyphen or contain two # consecutive hyphens. Must be unique for the AWS account that is making the request. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CopyClusterSnapshot.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CopyClusterSnapshot.html def copy_cluster_snapshot(options = {}) source_snapshot_identifier = options[:source_snapshot_identifier] source_snapshot_cluster_identifier = options[:source_snapshot_cluster_identifier] diff --git a/lib/fog/aws/requests/redshift/create_cluster.rb b/lib/fog/aws/requests/redshift/create_cluster.rb index 4422415c6..c86fbdbe4 100644 --- a/lib/fog/aws/requests/redshift/create_cluster.rb +++ b/lib/fog/aws/requests/redshift/create_cluster.rb @@ -5,29 +5,29 @@ module Fog require 'fog/aws/parsers/redshift/cluster' # ==== Parameters - # + # # @param [Hash] options - # * :db_name - (String) - # The name of the first database to be created when the cluster is created. To create - # additional databases after the cluster is created, connect to the cluster with a SQL - # client and use SQL commands to create a database. Default: dev Constraints: Must + # * :db_name - (String) + # The name of the first database to be created when the cluster is created. To create + # additional databases after the cluster is created, connect to the cluster with a SQL + # client and use SQL commands to create a database. Default: dev Constraints: Must # contain 1 to 64 alphanumeric characters. Must contain only lowercase letters. - # * :cluster_identifier - required - (String) - # A unique identifier for the cluster. You use this identifier to refer to the cluster + # * :cluster_identifier - required - (String) + # A unique identifier for the cluster. You use this identifier to refer to the cluster # for any subsequent cluster operations such as deleting or modifying. Must be unique # for all clusters within an AWS account. Example: myexamplecluster - # * :cluster_type - (String) - # Type of the cluster. When cluster type is specified as single-node, the NumberOfNodes - # parameter is not required. multi-node, the NumberOfNodes parameter is required. Valid + # * :cluster_type - (String) + # Type of the cluster. When cluster type is specified as single-node, the NumberOfNodes + # parameter is not required. multi-node, the NumberOfNodes parameter is required. Valid # Values: multi-node | single-node Default: multi-node - # * :node_type - required - (String) + # * :node_type - required - (String) # The node type to be provisioned. Valid Values: dw.hs1.xlarge | dw.hs1.8xlarge. - # * :master_username - required - (String) - # The user name associated with the master user account for the cluster that is being - # created. Constraints: Must be 1 - 128 alphanumeric characters. First character must + # * :master_username - required - (String) + # The user name associated with the master user account for the cluster that is being + # created. Constraints: Must be 1 - 128 alphanumeric characters. First character must # be a letter. Cannot be a reserved word. - # * :master_user_password - required - (String) - # The password associated with the master user account for the cluster that is being + # * :master_user_password - required - (String) + # The password associated with the master user account for the cluster that is being # created. Constraints: Must be between 8 and 64 characters in length. Must contain at # least one uppercase letter. Must contain at least one lowercase letter. Must contain # one number. @@ -37,51 +37,51 @@ module Fog # * :vpc_security_group_ids - (Array) # A list of Virtual Private Cloud (VPC) security groups to be associated with the # cluster. Default: The default VPC security group is associated with the cluster. - # * :cluster_subnet_group_name - (String) - # The name of a cluster subnet group to be associated with this cluster. If this + # * :cluster_subnet_group_name - (String) + # The name of a cluster subnet group to be associated with this cluster. If this # parameter is not provided the resulting cluster will be deployed outside virtual # private cloud (VPC). - # * :availability_zone - (String) + # * :availability_zone - (String) # The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the # cluster. Default: A random, system-chosen Availability Zone in the region that is - # specified by the endpoint. Example: us-east-1d Constraint: The specified + # specified by the endpoint. Example: us-east-1d Constraint: The specified # Availability Zone must be in the same region as the current endpoint. - # * :preferred_maintenance_window - (String) - # The weekly time range (in UTC) during which automated cluster maintenance can occur. - # Format: ddd:hh24:mi-ddd:hh24:mi Default: A 30-minute window selected at random from - # an 8-hour block of time per region, occurring on a random day of the week. + # * :preferred_maintenance_window - (String) + # The weekly time range (in UTC) during which automated cluster maintenance can occur. + # Format: ddd:hh24:mi-ddd:hh24:mi Default: A 30-minute window selected at random from + # an 8-hour block of time per region, occurring on a random day of the week. # Constraints: Minimum 30-minute window. - # * :cluster_parameter_group_name - (String) + # * :cluster_parameter_group_name - (String) # The name of the parameter group to be associated with this cluster. Default: The - # default Amazon Redshift cluster parameter group. Constraints: Must be 1 to 255 - # alphanumeric characters or hyphens. First character must be a letter. Cannot end + # default Amazon Redshift cluster parameter group. Constraints: Must be 1 to 255 + # alphanumeric characters or hyphens. First character must be a letter. Cannot end # with a hyphen or contain two consecutive hyphens. # * :automated_snapshot_retention_period - (Integer) # Number of days that automated snapshots are retained. If the value is 0, automated # snapshots are disabled. Default: 1 Constraints: Must be a value from 0 to 35. - # * :port - (Integer) + # * :port - (Integer) # The port number on which the cluster accepts incoming connections. Default: 5439 # Valid Values: 1150-65535 - # * :cluster_version - (String) + # * :cluster_version - (String) # The version of the Amazon Redshift engine software that you want to deploy on the - # cluster. The version selected runs on all the nodes in the cluster. Constraints: + # cluster. The version selected runs on all the nodes in the cluster. Constraints: # Only version 1.0 is currently available. Example: 1.0 - # * :allow_version_upgrade - (Boolean) - # If `true` , upgrades can be applied during the maintenance window to the Amazon + # * :allow_version_upgrade - (Boolean) + # If `true` , upgrades can be applied during the maintenance window to the Amazon # Redshift engine that is running on the cluster. Default: `true` # * :number_of_nodes - (Integer) - # The number of compute nodes in the cluster. This parameter is required when the + # The number of compute nodes in the cluster. This parameter is required when the # ClusterType parameter is specified as multi-node. If you don't specify this parameter, # you get a single-node cluster. When requesting a multi-node cluster, you must specify - # the number of nodes that you want in the cluster. Default: 1 Constraints: Value must + # the number of nodes that you want in the cluster. Default: 1 Constraints: Value must # be at least 1 and no more than 100. # * :publicly_accessible - (Boolean) # If `true` , the cluster can be accessed from a public network. - # * :encrypted - (Boolean) + # * :encrypted - (Boolean) # If `true` , the data in cluster is encrypted at rest. Default: `false` # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateCluster.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateCluster.html def create_cluster(options = {}) db_name = options[:db_name] cluster_identifier = options[:cluster_identifier] @@ -98,7 +98,7 @@ module Fog cluster_version = options[:cluster_version] allow_version_upgrade = options[:allow_version_upgrade] number_of_nodes = options[:number_of_nodes] - publicly_accessible = options[:publicly_accessible] + publicly_accessible = options[:publicly_accessible] encrypted = options[:encrypted] path = "/" @@ -114,7 +114,7 @@ module Fog if cluster_security_groups = options.delete(:ClusterSecurityGroups) params[:query].merge!(Fog::AWS.indexed_param('ClusterSecurityGroups.member.%d', [*cluster_security_groups])) end - + if vpc_security_group_ids = options.delete(:VpcSecurityGroupIds) params[:query].merge!(Fog::AWS.indexed_param('VpcSecurityGroupIds.member.%d', [*vpc_security_group_ids])) end @@ -148,4 +148,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/create_cluster_parameter_group.rb b/lib/fog/aws/requests/redshift/create_cluster_parameter_group.rb index 2211eeeee..546abeeba 100644 --- a/lib/fog/aws/requests/redshift/create_cluster_parameter_group.rb +++ b/lib/fog/aws/requests/redshift/create_cluster_parameter_group.rb @@ -5,26 +5,26 @@ module Fog require 'fog/aws/parsers/redshift/create_cluster_parameter_group' # ==== Parameters - # + # # @param [Hash] options - # * :parameter_group_name - required - (String) - # The name of the cluster parameter group. Constraints: Must be 1 to 255 alphanumeric - # characters or hyphens First character must be a letter. Cannot end with a hyphen or + # * :parameter_group_name - required - (String) + # The name of the cluster parameter group. Constraints: Must be 1 to 255 alphanumeric + # characters or hyphens First character must be a letter. Cannot end with a hyphen or # contain two consecutive hyphens. Must be unique within your AWS account. This value # is stored as a lower-case string. # * :parameter_group_family - required - (String) # The Amazon Redshift engine version to which the cluster parameter group applies. The - # cluster engine version determines the set of parameters. To get a list of valid parameter - # group family names, you can call DescribeClusterParameterGroups. By default, Amazon - # Redshift returns a list of all the parameter groups that are owned by your AWS account, - # including the default parameter groups for each Amazon Redshift engine version. The - # parameter group family names associated with the default parameter groups provide you + # cluster engine version determines the set of parameters. To get a list of valid parameter + # group family names, you can call DescribeClusterParameterGroups. By default, Amazon + # Redshift returns a list of all the parameter groups that are owned by your AWS account, + # including the default parameter groups for each Amazon Redshift engine version. The + # parameter group family names associated with the default parameter groups provide you # the valid values. For example, a valid family name is "redshift-1.0". - # * :description - required - (String) + # * :description - required - (String) # A description of the parameter group. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterParameterGroup.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterParameterGroup.html def create_cluster_parameter_group(options = {}) parameter_group_name = options[:parameter_group_name] parameter_group_family = options[:parameter_group_family] @@ -41,7 +41,7 @@ module Fog } params[:query]['Action'] = 'CreateClusterParameterGroup' - params[:query]['ParameterGroupName'] = parameter_group_name if parameter_group_name + params[:query]['ParameterGroupName'] = parameter_group_name if parameter_group_name params[:query]['ParameterGroupFamily'] = parameter_group_family if parameter_group_family params[:query]['Description'] = description if description @@ -51,4 +51,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/create_cluster_security_group.rb b/lib/fog/aws/requests/redshift/create_cluster_security_group.rb index db8cfb9fe..2f2495703 100644 --- a/lib/fog/aws/requests/redshift/create_cluster_security_group.rb +++ b/lib/fog/aws/requests/redshift/create_cluster_security_group.rb @@ -5,17 +5,17 @@ module Fog require 'fog/aws/parsers/redshift/create_cluster_security_group' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_security_group_name - (String) + # * :cluster_security_group_name - (String) # The name of a cluster security group for which you are requesting details. You # can specify either the Marker parameter or a ClusterSecurityGroupName parameter, # but not both. Example: securitygroup1 # * :description - required - (String) - # A description for the security group. + # A description for the security group. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSecurityGroup.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSecurityGroup.html def create_cluster_security_group(options = {}) cluster_security_group_name = options[:cluster_security_group_name] description = options[:description] @@ -39,4 +39,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/create_cluster_snapshot.rb b/lib/fog/aws/requests/redshift/create_cluster_snapshot.rb index 8f92c286c..30ca4d807 100644 --- a/lib/fog/aws/requests/redshift/create_cluster_snapshot.rb +++ b/lib/fog/aws/requests/redshift/create_cluster_snapshot.rb @@ -5,19 +5,19 @@ module Fog require 'fog/aws/parsers/redshift/cluster_snapshot' # ==== Parameters - # + # # @param [Hash] options # * :snapshot_identifier - required - (String) - # A unique identifier for the snapshot that you are requesting. This identifier + # A unique identifier for the snapshot that you are requesting. This identifier # must be unique for all snapshots within the AWS account. Constraints: Cannot be - # null, empty, or blank Must contain from 1 to 255 alphanumeric characters or + # null, empty, or blank Must contain from 1 to 255 alphanumeric characters or # hyphens First character must be a letter Cannot end with a hyphen or contain two # consecutive hyphens Example: my-snapshot-id - # * :cluster_identifier - required - (String) + # * :cluster_identifier - required - (String) # The cluster identifier for which you want a snapshot. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSnapshot.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSnapshot.html def create_cluster_snapshot(options = {}) snapshot_identifier = options[:snapshot_identifier] cluster_identifier = options[:cluster_identifier] @@ -41,4 +41,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/create_cluster_subnet_group.rb b/lib/fog/aws/requests/redshift/create_cluster_subnet_group.rb index 02e952691..d524118b6 100644 --- a/lib/fog/aws/requests/redshift/create_cluster_subnet_group.rb +++ b/lib/fog/aws/requests/redshift/create_cluster_subnet_group.rb @@ -5,20 +5,20 @@ module Fog require 'fog/aws/parsers/redshift/cluster_subnet_group_parser' # ==== Parameters - # + # # @param [Hash] options # * :cluster_subnet_group_name - required - (String) - # The name for the subnet group. Amazon Redshift stores the value as a lowercase string. + # The name for the subnet group. Amazon Redshift stores the value as a lowercase string. # Constraints: Must contain no more than 255 alphanumeric characters or hyphens. Must not # be "Default". Must be unique for all subnet groups that are created by your AWS account. # Example: examplesubnetgroup - # * :description - required - (String) + # * :description - required - (String) # A description of the parameter group. - # * :subnet_ids - required - (Array<) + # * :subnet_ids - required - (Array<) # An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSubnetGroup.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSubnetGroup.html def create_cluster_subnet_group(options = {}) cluster_subnet_group_name = options[:cluster_subnet_group_name] description = options[:description] @@ -47,4 +47,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/delete_cluster.rb b/lib/fog/aws/requests/redshift/delete_cluster.rb index cfa94e173..7335334bf 100644 --- a/lib/fog/aws/requests/redshift/delete_cluster.rb +++ b/lib/fog/aws/requests/redshift/delete_cluster.rb @@ -5,27 +5,27 @@ module Fog require 'fog/aws/parsers/redshift/cluster' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_identifier - required - (String) - # A unique identifier for the cluster. You use this identifier to refer to the cluster + # * :cluster_identifier - required - (String) + # A unique identifier for the cluster. You use this identifier to refer to the cluster # for any subsequent cluster operations such as deleting or modifying. Must be unique # for all clusters within an AWS account. Example: myexamplecluster - # * :skip_final_cluster_snapshot - (Boolean) + # * :skip_final_cluster_snapshot - (Boolean) # Determines whether a final snapshot of the cluster is created before Amazon Redshift - # deletes the cluster. If `true` , a final cluster snapshot is not created. If `false`, - # a final cluster snapshot is created before the cluster is deleted. The + # deletes the cluster. If `true` , a final cluster snapshot is not created. If `false`, + # a final cluster snapshot is created before the cluster is deleted. The # FinalClusterSnapshotIdentifier parameter must be specified if SkipFinalClusterSnapshot - # is `false` . Default: `false` + # is `false` . Default: `false` # * :final_cluster_snapshot_identifier - (String) # The identifier of the final snapshot that is to be created immediately before deleting # the cluster. If this parameter is provided, SkipFinalClusterSnapshot must be `false`. # Constraints: Must be 1 to 255 alphanumeric characters. First character must be a letter # Cannot end with a hyphen or contain two consecutive hyphens. # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteCluster.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteCluster.html def delete_cluster(options = {}) - cluster_identifier = options[:cluster_identifier] + cluster_identifier = options[:cluster_identifier] final_cluster_snapshot_identifier = options[:final_cluster_snapshot_identifier] skip_final_cluster_snapshot = options[:skip_final_cluster_snapshot] @@ -40,7 +40,7 @@ module Fog params[:query]['Action'] = 'DeleteCluster' params[:query]['ClusterIdentifier'] = cluster_identifier if cluster_identifier - params[:query]['FinalClusterSnapshotIdentifier'] = final_cluster_snapshot_identifier if final_cluster_snapshot_identifier + params[:query]['FinalClusterSnapshotIdentifier'] = final_cluster_snapshot_identifier if final_cluster_snapshot_identifier params[:query]['SkipFinalClusterSnapshot'] = skip_final_cluster_snapshot if skip_final_cluster_snapshot request(params) end @@ -48,4 +48,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/delete_cluster_parameter_group.rb b/lib/fog/aws/requests/redshift/delete_cluster_parameter_group.rb index 21f7353e3..c244058a7 100644 --- a/lib/fog/aws/requests/redshift/delete_cluster_parameter_group.rb +++ b/lib/fog/aws/requests/redshift/delete_cluster_parameter_group.rb @@ -4,14 +4,14 @@ module Fog class Real # ==== Parameters - # + # # @param [Hash] options - # * :parameter_group_name - required - (String) + # * :parameter_group_name - required - (String) # The name of the parameter group to be deleted. Constraints: Must be the name of an # existing cluster parameter group. Cannot delete a default cluster parameter group. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteClusterParameterGroup.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteClusterParameterGroup.html def delete_cluster_parameter_group(options = {}) parameter_group_name = options[:parameter_group_name] diff --git a/lib/fog/aws/requests/redshift/delete_cluster_security_group.rb b/lib/fog/aws/requests/redshift/delete_cluster_security_group.rb index 0ea30d72e..3e47b1fcd 100644 --- a/lib/fog/aws/requests/redshift/delete_cluster_security_group.rb +++ b/lib/fog/aws/requests/redshift/delete_cluster_security_group.rb @@ -4,13 +4,13 @@ module Fog class Real # ==== Parameters - # + # # @param [Hash] options # * :cluster_security_group_name - required - (String) - # The name of the cluster security group to be deleted. + # The name of the cluster security group to be deleted. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteClusterSecurityGroup.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteClusterSecurityGroup.html def delete_cluster_security_group(options = {}) cluster_security_group_name = options[:cluster_security_group_name] diff --git a/lib/fog/aws/requests/redshift/delete_cluster_snapshot.rb b/lib/fog/aws/requests/redshift/delete_cluster_snapshot.rb index ce01a490a..1f11ecfd4 100644 --- a/lib/fog/aws/requests/redshift/delete_cluster_snapshot.rb +++ b/lib/fog/aws/requests/redshift/delete_cluster_snapshot.rb @@ -5,19 +5,19 @@ module Fog require 'fog/aws/parsers/redshift/cluster_snapshot' # ==== Parameters - # + # # @param [Hash] options # * :snapshot_identifier - required - (String) - # A unique identifier for the snapshot that you are requesting. This identifier + # A unique identifier for the snapshot that you are requesting. This identifier # must be unique for all snapshots within the AWS account. Constraints: Cannot be - # null, empty, or blank Must contain from 1 to 255 alphanumeric characters or + # null, empty, or blank Must contain from 1 to 255 alphanumeric characters or # hyphens First character must be a letter Cannot end with a hyphen or contain two # consecutive hyphens Example: my-snapshot-id - # * :snapshot_cluster_identifier - required - (String) + # * :snapshot_cluster_identifier - required - (String) # The cluster identifier for which you want a snapshot. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSnapshot.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateClusterSnapshot.html def delete_cluster_snapshot(options = {}) snapshot_identifier = options[:snapshot_identifier] snapshot_cluster_identifier = options[:snapshot_cluster_identifier] @@ -41,4 +41,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/delete_cluster_subnet_group.rb b/lib/fog/aws/requests/redshift/delete_cluster_subnet_group.rb index 716234f5f..e92980d95 100644 --- a/lib/fog/aws/requests/redshift/delete_cluster_subnet_group.rb +++ b/lib/fog/aws/requests/redshift/delete_cluster_subnet_group.rb @@ -2,12 +2,12 @@ module Fog module AWS class Redshift class Real - + # ==== Parameters - # + # # @param [Hash] options # * :cluster_subnet_group_name - required - (String) - # The name for the subnet group. Amazon Redshift stores the value as a lowercase string. + # The name for the subnet group. Amazon Redshift stores the value as a lowercase string. # Constraints: Must contain no more than 255 alphanumeric characters or hyphens. Must not # be "Default". Must be unique for all subnet groups that are created by your AWS account. # Example: examplesubnetgroup @@ -35,4 +35,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_cluster_parameter_groups.rb b/lib/fog/aws/requests/redshift/describe_cluster_parameter_groups.rb index 654b96779..8a669a226 100644 --- a/lib/fog/aws/requests/redshift/describe_cluster_parameter_groups.rb +++ b/lib/fog/aws/requests/redshift/describe_cluster_parameter_groups.rb @@ -5,20 +5,20 @@ module Fog require 'fog/aws/parsers/redshift/describe_cluster_parameter_groups' # ==== Parameters - # + # # @param [Hash] options - # * :parameter_group_name (String) + # * :parameter_group_name (String) # The name of a cluster parameter group for which to return details. - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterParameterGroups.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterParameterGroups.html def describe_cluster_parameter_groups(options = {}) parameter_group_name = options[:parameter_group_name] marker = options[:marker] @@ -35,7 +35,7 @@ module Fog } params[:query]['Action'] = 'DescribeClusterParameterGroups' - params[:query]['ParameterGroupName'] = parameter_group_name if parameter_group_name + params[:query]['ParameterGroupName'] = parameter_group_name if parameter_group_name params[:query]['Marker'] = marker if marker params[:query]['MaxRecords'] = max_records if max_records @@ -45,4 +45,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_cluster_parameters.rb b/lib/fog/aws/requests/redshift/describe_cluster_parameters.rb index b6d98a8fb..df0ec23eb 100644 --- a/lib/fog/aws/requests/redshift/describe_cluster_parameters.rb +++ b/lib/fog/aws/requests/redshift/describe_cluster_parameters.rb @@ -5,25 +5,25 @@ module Fog require 'fog/aws/parsers/redshift/describe_cluster_parameters' # ==== Parameters - # + # # @param [Hash] options - # * :parameter_group_name - required - (String) + # * :parameter_group_name - required - (String) # The name of a cluster parameter group for which to return details. - # * :source - (String) - # The parameter types to return. Specify user to show parameters that are - # different form the default. Similarly, specify engine-default to show parameters - # that are the same as the default parameter group. Default: All parameter types + # * :source - (String) + # The parameter types to return. Specify user to show parameters that are + # different form the default. Similarly, specify engine-default to show parameters + # that are the same as the default parameter group. Default: All parameter types # returned. Valid Values: user | engine-default - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterParameters.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterParameters.html def describe_cluster_parameters(options = {}) parameter_group_name = options[:parameter_group_name] source = options[:source] @@ -41,7 +41,7 @@ module Fog } params[:query]['Action'] = 'DescribeClusterParameters' - params[:query]['ParameterGroupName'] = parameter_group_name if parameter_group_name + params[:query]['ParameterGroupName'] = parameter_group_name if parameter_group_name params[:query]['Source'] = source if source params[:query]['Marker'] = marker if marker params[:query]['MaxRecords'] = max_records if max_records @@ -52,4 +52,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_cluster_security_groups.rb b/lib/fog/aws/requests/redshift/describe_cluster_security_groups.rb index 04518e7c1..abd8b39da 100644 --- a/lib/fog/aws/requests/redshift/describe_cluster_security_groups.rb +++ b/lib/fog/aws/requests/redshift/describe_cluster_security_groups.rb @@ -5,22 +5,22 @@ module Fog require 'fog/aws/parsers/redshift/describe_cluster_security_groups' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_security_group_name - (String) + # * :cluster_security_group_name - (String) # The name of a cluster security group for which you are requesting details. You # can specify either the Marker parameter or a ClusterSecurityGroupName parameter, # but not both. Example: securitygroup1 - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterSecurityGroups.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterSecurityGroups.html def describe_cluster_security_groups(options = {}) cluster_security_group_name = options[:cluster_security_group_name] marker = options[:marker] @@ -47,4 +47,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_cluster_snapshots.rb b/lib/fog/aws/requests/redshift/describe_cluster_snapshots.rb index 6e36ba99a..8e36c3c5e 100644 --- a/lib/fog/aws/requests/redshift/describe_cluster_snapshots.rb +++ b/lib/fog/aws/requests/redshift/describe_cluster_snapshots.rb @@ -5,37 +5,37 @@ module Fog require 'fog/aws/parsers/redshift/describe_cluster_snapshots' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_identifier - (String) + # * :cluster_identifier - (String) # The identifier of the cluster for which information about snapshots is requested. - # * :snapshot_identifier - (String) + # * :snapshot_identifier - (String) # The snapshot identifier of the snapshot about which to return information. - # * :snapshot_type - (String) + # * :snapshot_type - (String) # The type of snapshots for which you are requesting information. By default, # snapshots of all types are returned. Valid Values: automated | manual - # * :start_time - (String) - # A value that requests only snapshots created at or after the specified time. - # The time value is specified in ISO 8601 format. For more information about + # * :start_time - (String) + # A value that requests only snapshots created at or after the specified time. + # The time value is specified in ISO 8601 format. For more information about # ISO 8601, go to the ISO8601 Wikipedia page. Example: 2012-07-16T18:00:00Z - # * :end_time - (String) - # A time value that requests only snapshots created at or before the specified - # time. The time value is specified in ISO 8601 format. For more information + # * :end_time - (String) + # A time value that requests only snapshots created at or before the specified + # time. The time value is specified in ISO 8601 format. For more information # about ISO 8601, go to the ISO8601 Wikipedia page. Example: 2012-07-16T18:00:00Z # * :owner_account - (String) # The AWS customer account used to create or copy the snapshot. Use this field to # filter the results to snapshots owned by a particular account. To describe snapshots # you own, either specify your AWS customer account, or do not specify the parameter. - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterSnapshots.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterSnapshots.html def describe_cluster_snapshots(options = {}) cluster_identifier = options[:cluster_identifier] snapshot_identifier = options[:snapshot_identifier] @@ -70,4 +70,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_cluster_subnet_groups.rb b/lib/fog/aws/requests/redshift/describe_cluster_subnet_groups.rb index 1b3b5a721..c05e877c3 100644 --- a/lib/fog/aws/requests/redshift/describe_cluster_subnet_groups.rb +++ b/lib/fog/aws/requests/redshift/describe_cluster_subnet_groups.rb @@ -5,23 +5,23 @@ module Fog require 'fog/aws/parsers/redshift/describe_cluster_subnet_groups' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_subnet_group_name - (String) + # * :cluster_subnet_group_name - (String) # The name of the cluster subnet group for which information is requested. - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== Returns # * response<~Excon::Response>: # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterSubnetGroups.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterSubnetGroups.html def describe_cluster_subnet_groups(cluster_subnet_group_name=nil, marker=nil,max_records=nil) path = "/" params = { @@ -44,4 +44,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_cluster_versions.rb b/lib/fog/aws/requests/redshift/describe_cluster_versions.rb index 2af2ab68d..87f157889 100644 --- a/lib/fog/aws/requests/redshift/describe_cluster_versions.rb +++ b/lib/fog/aws/requests/redshift/describe_cluster_versions.rb @@ -5,24 +5,24 @@ module Fog require 'fog/aws/parsers/redshift/describe_cluster_versions' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_parameter_group_family - (String) + # * :cluster_parameter_group_family - (String) # The name of a specific cluster parameter group family to return details for. - # Constraints: Must be 1 to 255 alphanumeric characters. First character must be + # Constraints: Must be 1 to 255 alphanumeric characters. First character must be # a letter, and cannot end with a hyphen or contain two consecutive hyphens. - # * :cluster_version - (String) + # * :cluster_version - (String) # The specific cluster version to return. Example: 1.0 - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterVersions.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusterVersions.html def describe_cluster_versions(options = {}) cluster_version = options[:cluster_version] cluster_parameter_group_family = options[:cluster_parameter_group_family] @@ -51,4 +51,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_clusters.rb b/lib/fog/aws/requests/redshift/describe_clusters.rb index ed18c1b62..6329ec846 100644 --- a/lib/fog/aws/requests/redshift/describe_clusters.rb +++ b/lib/fog/aws/requests/redshift/describe_clusters.rb @@ -5,22 +5,22 @@ module Fog require 'fog/aws/parsers/redshift/describe_clusters' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_identifier - (String) - # The unique identifier of a cluster whose properties you are requesting. - # This parameter isn't case sensitive. The default is that all clusters + # * :cluster_identifier - (String) + # The unique identifier of a cluster whose properties you are requesting. + # This parameter isn't case sensitive. The default is that all clusters # defined for an account are returned. - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusters.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusters.html def describe_clusters(options = {}) cluster_identifier = options[:cluster_identifier] marker = options[:marker] diff --git a/lib/fog/aws/requests/redshift/describe_default_cluster_parameters.rb b/lib/fog/aws/requests/redshift/describe_default_cluster_parameters.rb index deafcba38..2b679b282 100644 --- a/lib/fog/aws/requests/redshift/describe_default_cluster_parameters.rb +++ b/lib/fog/aws/requests/redshift/describe_default_cluster_parameters.rb @@ -5,20 +5,20 @@ module Fog require 'fog/aws/parsers/redshift/describe_default_cluster_parameters' # ==== Parameters - # + # # @param [Hash] options - # * :parameter_group_family - required - (String) + # * :parameter_group_family - required - (String) # The name of a cluster parameter group family for which to return details. - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeDefaultClusterParameters.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeDefaultClusterParameters.html def describe_default_cluster_parameters(options = {}) parameter_group_family = options[:parameter_group_family] source = options[:source] @@ -46,4 +46,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_events.rb b/lib/fog/aws/requests/redshift/describe_events.rb index 5f3815378..16e88c847 100644 --- a/lib/fog/aws/requests/redshift/describe_events.rb +++ b/lib/fog/aws/requests/redshift/describe_events.rb @@ -5,50 +5,50 @@ module Fog require 'fog/aws/parsers/redshift/describe_events' # ==== Parameters - # + # # @param [Hash] options - # * :source_identifier - (String) - # The identifier of the event source for which events will be returned. If this - # parameter is not specified, then all sources are included in the response. - # Constraints: If SourceIdentifier is supplied, SourceType must also be provided. - # Specify a cluster identifier when SourceType is cluster. Specify a cluster security - # group name when SourceType is cluster-security-group. Specify a cluster parameter - # group name when SourceType is cluster-parameter-group. Specify a cluster snapshot + # * :source_identifier - (String) + # The identifier of the event source for which events will be returned. If this + # parameter is not specified, then all sources are included in the response. + # Constraints: If SourceIdentifier is supplied, SourceType must also be provided. + # Specify a cluster identifier when SourceType is cluster. Specify a cluster security + # group name when SourceType is cluster-security-group. Specify a cluster parameter + # group name when SourceType is cluster-parameter-group. Specify a cluster snapshot # identifier when SourceType is cluster-snapshot. - # * :source_type - (String) - # The event source to retrieve events for. If no value is specified, all events are - # returned. Constraints: If SourceType is supplied, SourceIdentifier must also be - # provided. Specify cluster when SourceIdentifier is a cluster identifier. Specify - # cluster-security-group when SourceIdentifier is a cluster security group name. Specify + # * :source_type - (String) + # The event source to retrieve events for. If no value is specified, all events are + # returned. Constraints: If SourceType is supplied, SourceIdentifier must also be + # provided. Specify cluster when SourceIdentifier is a cluster identifier. Specify + # cluster-security-group when SourceIdentifier is a cluster security group name. Specify # cluster-parameter-group when SourceIdentifier is a cluster parameter group name. Specify # cluster-snapshot when SourceIdentifier is a cluster snapshot identifier. Valid values # include: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot # * :start_time - (String<) - # The beginning of the time interval to retrieve events for, specified in ISO 8601 + # The beginning of the time interval to retrieve events for, specified in ISO 8601 # format. Example: 2009-07-08T18:00Z - # * :end_time - (String<) - # The end of the time interval for which to retrieve events, specified in ISO 8601 + # * :end_time - (String<) + # The end of the time interval for which to retrieve events, specified in ISO 8601 # format. Example: 2009-07-08T18:00Z - # * :duration - (Integer) - # The number of minutes prior to the time of the request for which to retrieve events. - # For example, if the request is sent at 18:00 and you specify a duration of 60, then - # only events which have occurred after 17:00 will be returned. Default: 60 - # * :max_records - (Integer) + # * :duration - (Integer) + # The number of minutes prior to the time of the request for which to retrieve events. + # For example, if the request is sent at 18:00 and you specify a duration of 60, then + # only events which have occurred after 17:00 will be returned. Default: 60 + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeEvents.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeEvents.html def describe_events(options = {}) source_identifier = options[:source_identifier] source_type = options[:source_type] start_time = options[:start_time] end_time = options[:end_time] - duration = options[:duration] + duration = options[:duration] marker = options[:marker] max_records = options[:max_records] @@ -67,7 +67,7 @@ module Fog params[:query]['SourceType'] = source_type if source_type params[:query]['StartTime'] = start_time if start_time params[:query]['EndTime'] = end_time if end_time - params[:query]['Duration'] = duration if duration + params[:query]['Duration'] = duration if duration params[:query]['Marker'] = marker if marker params[:query]['MaxRecords'] = max_records if max_records @@ -77,4 +77,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_orderable_cluster_options.rb b/lib/fog/aws/requests/redshift/describe_orderable_cluster_options.rb index 3f3e35bde..757f0779c 100644 --- a/lib/fog/aws/requests/redshift/describe_orderable_cluster_options.rb +++ b/lib/fog/aws/requests/redshift/describe_orderable_cluster_options.rb @@ -5,25 +5,25 @@ module Fog require 'fog/aws/parsers/redshift/describe_orderable_cluster_options' # ==== Parameters - # + # # @param [Hash] options # * :cluster_version - (String) - # The version filter value. Specify this parameter to show only the available - # offerings matching the specified version. Default: All versions. Constraints: + # The version filter value. Specify this parameter to show only the available + # offerings matching the specified version. Default: All versions. Constraints: # Must be one of the version returned from DescribeClusterVersions. - # * :node_type - (String) - # The node type filter value. Specify this parameter to show only the available + # * :node_type - (String) + # The node type filter value. Specify this parameter to show only the available # offerings matching the specified node type. - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeOrderableClusterOptions.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeOrderableClusterOptions.html def describe_orderable_cluster_options(options = {}) cluster_version = options[:cluster_version] node_type = options[:node_type] @@ -52,4 +52,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_reserved_node_offerings.rb b/lib/fog/aws/requests/redshift/describe_reserved_node_offerings.rb index 908ccaa80..acc1d58e6 100644 --- a/lib/fog/aws/requests/redshift/describe_reserved_node_offerings.rb +++ b/lib/fog/aws/requests/redshift/describe_reserved_node_offerings.rb @@ -5,20 +5,20 @@ module Fog require 'fog/aws/parsers/redshift/describe_reserved_node_offerings' # ==== Parameters - # + # # @param [Hash] options - # * :reserved_node_offering_id - (String) + # * :reserved_node_offering_id - (String) # The unique identifier for the offering. - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeReservedNodeOfferings.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeReservedNodeOfferings.html def describe_reserved_node_offerings(options = {}) reserved_node_offering_id = options[:reserved_node_offering_id] marker = options[:marker] @@ -45,4 +45,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_reserved_nodes.rb b/lib/fog/aws/requests/redshift/describe_reserved_nodes.rb index 0c13bb807..3a4981d3c 100644 --- a/lib/fog/aws/requests/redshift/describe_reserved_nodes.rb +++ b/lib/fog/aws/requests/redshift/describe_reserved_nodes.rb @@ -5,20 +5,20 @@ module Fog require 'fog/aws/parsers/redshift/describe_reserved_nodes' # ==== Parameters - # + # # @param [Hash] options - # * :reserved_node_id - (String) + # * :reserved_node_id - (String) # The unique identifier for the node reservation. - # * :max_records - (Integer) + # * :max_records - (Integer) # The maximum number of records to include in the response. If more than the - # MaxRecords value is available, a marker is included in the response so that the + # MaxRecords value is available, a marker is included in the response so that the # following results can be retrieved. Constrained between [20,100]. Default is 100. - # * :marker - (String) - # The marker returned from a previous request. If this parameter is specified, the + # * :marker - (String) + # The marker returned from a previous request. If this parameter is specified, the # response includes records beyond the marker only, up to MaxRecords. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeReservedNodes.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeReservedNodes.html def describe_reserved_nodes(options = {}) reserved_node_id = options[:reserved_node_id] marker = options[:marker] @@ -45,4 +45,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/describe_resize.rb b/lib/fog/aws/requests/redshift/describe_resize.rb index ab8dcdaf7..a71de1584 100644 --- a/lib/fog/aws/requests/redshift/describe_resize.rb +++ b/lib/fog/aws/requests/redshift/describe_resize.rb @@ -5,15 +5,15 @@ module Fog require 'fog/aws/parsers/redshift/describe_resize' # ==== Parameters - # + # # @param [Hash] options # * :cluster_identifier - required - (String) - # The unique identifier of a cluster whose resize progress you are requesting. - # This parameter isn't case-sensitive. By default, resize operations for all + # The unique identifier of a cluster whose resize progress you are requesting. + # This parameter isn't case-sensitive. By default, resize operations for all # clusters defined for an AWS account are returned. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeResize.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeResize.html def describe_resize(options = {}) cluster_identifier = options[:cluster_identifier] @@ -36,4 +36,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/modify_cluster.rb b/lib/fog/aws/requests/redshift/modify_cluster.rb index a77e31b38..7cedb34c3 100644 --- a/lib/fog/aws/requests/redshift/modify_cluster.rb +++ b/lib/fog/aws/requests/redshift/modify_cluster.rb @@ -5,58 +5,58 @@ module Fog require 'fog/aws/parsers/redshift/cluster' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_identifier - required - (String) - # A unique identifier for the cluster. You use this identifier to refer to the cluster + # * :cluster_identifier - required - (String) + # A unique identifier for the cluster. You use this identifier to refer to the cluster # for any subsequent cluster operations such as deleting or modifying. Must be unique # for all clusters within an AWS account. Example: myexamplecluster - # * :allow_version_upgrade - (Boolean) - # If `true` , upgrades can be applied during the maintenance window to the Amazon + # * :allow_version_upgrade - (Boolean) + # If `true` , upgrades can be applied during the maintenance window to the Amazon # Redshift engine that is running on the cluster. Default: `true` # * :automated_snapshot_retention_period - (Integer) # Number of days that automated snapshots are retained. If the value is 0, automated # snapshots are disabled. Default: 1 Constraints: Must be a value from 0 to 35. - # * :cluster_parameter_group_name - (String) + # * :cluster_parameter_group_name - (String) # The name of the parameter group to be associated with this cluster. Default: The - # default Amazon Redshift cluster parameter group. Constraints: Must be 1 to 255 - # alphanumeric characters or hyphens. First character must be a letter. Cannot end + # default Amazon Redshift cluster parameter group. Constraints: Must be 1 to 255 + # alphanumeric characters or hyphens. First character must be a letter. Cannot end # with a hyphen or contain two consecutive hyphens. # * :cluster_security_groups - (Array) # A list of security groups to be associated with this cluster. Default: The default # cluster security group for Amazon Redshift. - # * :cluster_type - (String) - # Type of the cluster. When cluster type is specified as single-node, the NumberOfNodes - # parameter is not required. multi-node, the NumberOfNodes parameter is required. Valid + # * :cluster_type - (String) + # Type of the cluster. When cluster type is specified as single-node, the NumberOfNodes + # parameter is not required. multi-node, the NumberOfNodes parameter is required. Valid # Values: multi-node | single-node Default: multi-node - # * :cluster_version - (String) + # * :cluster_version - (String) # The version of the Amazon Redshift engine software that you want to deploy on the - # cluster. The version selected runs on all the nodes in the cluster. Constraints: + # cluster. The version selected runs on all the nodes in the cluster. Constraints: # Only version 1.0 is currently available. Example: 1.0 - # * :master_user_password - required - (String) - # The password associated with the master user account for the cluster that is being + # * :master_user_password - required - (String) + # The password associated with the master user account for the cluster that is being # created. Constraints: Must be between 8 and 64 characters in length. Must contain at # least one uppercase letter. Must contain at least one lowercase letter. Must contain # one number. - # * :node_type - required - (String) + # * :node_type - required - (String) # The node type to be provisioned. Valid Values: dw.hs1.xlarge | dw.hs1.8xlarge. # * :number_of_nodes - (Integer) - # The number of compute nodes in the cluster. This parameter is required when the + # The number of compute nodes in the cluster. This parameter is required when the # ClusterType parameter is specified as multi-node. If you don't specify this parameter, # you get a single-node cluster. When requesting a multi-node cluster, you must specify - # the number of nodes that you want in the cluster. Default: 1 Constraints: Value must + # the number of nodes that you want in the cluster. Default: 1 Constraints: Value must # be at least 1 and no more than 100. - # * :preferred_maintenance_window - (String) - # The weekly time range (in UTC) during which automated cluster maintenance can occur. - # Format: ddd:hh24:mi-ddd:hh24:mi Default: A 30-minute window selected at random from - # an 8-hour block of time per region, occurring on a random day of the week. + # * :preferred_maintenance_window - (String) + # The weekly time range (in UTC) during which automated cluster maintenance can occur. + # Format: ddd:hh24:mi-ddd:hh24:mi Default: A 30-minute window selected at random from + # an 8-hour block of time per region, occurring on a random day of the week. # Constraints: Minimum 30-minute window. # * :vpc_security_group_ids - (Array) # A list of Virtual Private Cloud (VPC) security groups to be associated with the # cluster. Default: The default VPC security group is associated with the cluster. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateCluster.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateCluster.html def modify_cluster(options = {}) cluster_identifier = options[:cluster_identifier] cluster_type = options[:cluster_type] @@ -82,7 +82,7 @@ module Fog if cluster_security_groups = options.delete(:ClusterSecurityGroups) params[:query].merge!(Fog::AWS.indexed_param('ClusterSecurityGroups.member.%d', [*cluster_security_groups])) end - + if vpc_security_group_ids = options.delete(:VpcSecurityGroupIds) params[:query].merge!(Fog::AWS.indexed_param('VpcSecurityGroupIds.member.%d', [*vpc_security_group_ids])) end @@ -108,4 +108,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/modify_cluster_parameter_group.rb b/lib/fog/aws/requests/redshift/modify_cluster_parameter_group.rb index aa4f867ee..e3f2b1042 100644 --- a/lib/fog/aws/requests/redshift/modify_cluster_parameter_group.rb +++ b/lib/fog/aws/requests/redshift/modify_cluster_parameter_group.rb @@ -5,14 +5,14 @@ module Fog require 'fog/aws/parsers/redshift/update_cluster_parameter_group_parser' # ==== Parameters - # + # # @param [Hash] options - # * :parameter_group_name - required - (String) + # * :parameter_group_name - required - (String) # The name of the parameter group to be deleted. Constraints: Must be the name of an # existing cluster parameter group. Cannot delete a default cluster parameter group. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_ModifyClusterParameterGroup.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_ModifyClusterParameterGroup.html def modify_cluster_parameter_group(options = {}) parameter_group_name = options[:parameter_group_name] diff --git a/lib/fog/aws/requests/redshift/modify_cluster_subnet_group.rb b/lib/fog/aws/requests/redshift/modify_cluster_subnet_group.rb index 023cb85b7..13e4cbae6 100644 --- a/lib/fog/aws/requests/redshift/modify_cluster_subnet_group.rb +++ b/lib/fog/aws/requests/redshift/modify_cluster_subnet_group.rb @@ -5,20 +5,20 @@ module Fog require 'fog/aws/parsers/redshift/cluster_subnet_group_parser' # ==== Parameters - # + # # @param [Hash] options # * :cluster_subnet_group_name - required - (String) - # The name for the subnet group. Amazon Redshift stores the value as a lowercase string. + # The name for the subnet group. Amazon Redshift stores the value as a lowercase string. # Constraints: Must contain no more than 255 alphanumeric characters or hyphens. Must not # be "Default". Must be unique for all subnet groups that are created by your AWS account. # Example: examplesubnetgroup - # * :description - required - (String) + # * :description - required - (String) # A description of the parameter group. - # * :subnet_ids - required - (Array<) + # * :subnet_ids - required - (Array<) # An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_ModifyClusterSubnetGroup.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_ModifyClusterSubnetGroup.html def modify_cluster_subnet_group(options = {}) cluster_subnet_group_name = options[:cluster_subnet_group_name] description = options[:description] @@ -47,4 +47,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/purchase_reserved_node_offering.rb b/lib/fog/aws/requests/redshift/purchase_reserved_node_offering.rb index e6a42281b..35d6abdd4 100644 --- a/lib/fog/aws/requests/redshift/purchase_reserved_node_offering.rb +++ b/lib/fog/aws/requests/redshift/purchase_reserved_node_offering.rb @@ -5,15 +5,15 @@ module Fog require 'fog/aws/parsers/redshift/purchase_reserved_node_offering' # ==== Parameters - # + # # @param [Hash] options # * :reserved_node_offering_id - required - (String) # The unique identifier of the reserved node offering you want to purchase. - # * :node_count - (Integer) + # * :node_count - (Integer) # The number of reserved nodes you want to purchase. Default: 1 # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_PurchaseReservedNodeOffering.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_PurchaseReservedNodeOffering.html def purchase_reserved_node_offering(options = {}) reserved_node_offering_id = options[:reserved_node_offering_id] node_count = options[:node_count] diff --git a/lib/fog/aws/requests/redshift/reboot_cluster.rb b/lib/fog/aws/requests/redshift/reboot_cluster.rb index 778189f4a..b43246cfd 100644 --- a/lib/fog/aws/requests/redshift/reboot_cluster.rb +++ b/lib/fog/aws/requests/redshift/reboot_cluster.rb @@ -5,17 +5,17 @@ module Fog require 'fog/aws/parsers/redshift/cluster' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_identifier - required - (String) - # A unique identifier for the cluster. You use this identifier to refer to the cluster + # * :cluster_identifier - required - (String) + # A unique identifier for the cluster. You use this identifier to refer to the cluster # for any subsequent cluster operations such as deleting or modifying. Must be unique # for all clusters within an AWS account. Example: myexamplecluster # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteCluster.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteCluster.html def reboot_cluster(options = {}) - cluster_identifier = options[:cluster_identifier] + cluster_identifier = options[:cluster_identifier] path = "/" params = { @@ -34,4 +34,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/redshift/reset_cluster_parameter_group.rb b/lib/fog/aws/requests/redshift/reset_cluster_parameter_group.rb index 5829f70ec..bff7f8705 100644 --- a/lib/fog/aws/requests/redshift/reset_cluster_parameter_group.rb +++ b/lib/fog/aws/requests/redshift/reset_cluster_parameter_group.rb @@ -5,7 +5,7 @@ module Fog require 'fog/aws/parsers/redshift/update_cluster_parameter_group_parser' # ==== Parameters - # + # # @param [Hash] options # * :parameter_group_name - required - (String) The name of the cluster parameter group to be reset. # * :reset_all_parameters - (Boolean) If true , all parameters in the specified parameter group will be reset to their default values. Default: true diff --git a/lib/fog/aws/requests/redshift/restore_from_cluster_snapshot.rb b/lib/fog/aws/requests/redshift/restore_from_cluster_snapshot.rb index 9e82ab658..36d7606ab 100644 --- a/lib/fog/aws/requests/redshift/restore_from_cluster_snapshot.rb +++ b/lib/fog/aws/requests/redshift/restore_from_cluster_snapshot.rb @@ -5,41 +5,41 @@ module Fog require 'fog/aws/parsers/redshift/cluster' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_identifier - required - (String) - # The identifier of the cluster that will be created from restoring the snapshot. - # Constraints: Must contain from 1 to 63 alphanumeric characters or hyphens. + # * :cluster_identifier - required - (String) + # The identifier of the cluster that will be created from restoring the snapshot. + # Constraints: Must contain from 1 to 63 alphanumeric characters or hyphens. # Alphabetic characters must be lowercase. First character must be a letter. Cannot - # end with a hyphen or contain two consecutive hyphens. Must be unique for all + # end with a hyphen or contain two consecutive hyphens. Must be unique for all # clusters within an AWS account. # * :snapshot_identifier - required - (String) - # The name of the snapshot from which to create the new cluster. This parameter + # The name of the snapshot from which to create the new cluster. This parameter # isn't case sensitive. Example: my-snapshot-id # * :snapshot_cluster_identifier - (String) - # * :port - (Integer) + # * :port - (Integer) # The port number on which the cluster accepts connections. Default: The same port # as the original cluster. Constraints: Must be between 1115 and 65535. # * :availability_zone - (String) # The Amazon EC2 Availability Zone in which to restore the cluster. Default: A # random, system-chosen Availability Zone. Example: us-east-1a # * :allow_version_upgrade - (Boolean) - # If true , upgrades can be applied during the maintenance window to the Amazon + # If true , upgrades can be applied during the maintenance window to the Amazon # Redshift engine that is running on the cluster. Default: true - # * :cluster_subnet_group_name - (String) - # The name of the subnet group where you want to cluster restored. A snapshot of - # cluster in VPC can be restored only in VPC. Therefore, you must provide subnet + # * :cluster_subnet_group_name - (String) + # The name of the subnet group where you want to cluster restored. A snapshot of + # cluster in VPC can be restored only in VPC. Therefore, you must provide subnet # group name where you want the cluster restored. - # * :publicly_accessible - (Boolean) + # * :publicly_accessible - (Boolean) # If true , the cluster can be accessed from a public network. - # * :owner_account - (String) - # The AWS customer account used to create or copy the snapshot. Required if you are + # * :owner_account - (String) + # The AWS customer account used to create or copy the snapshot. Required if you are # restoring a snapshot you do not own, optional if you own the snapshot. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_RestoreFromClusterSnapshot.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_RestoreFromClusterSnapshot.html def restore_from_cluster_snapshot(options = {}) - cluster_identifier = options[:cluster_identifier] + cluster_identifier = options[:cluster_identifier] snapshot_identifier = options[:snapshot_identifier] snapshot_cluster_identifier = options[:snapshot_cluster_identifier] port = options[:port] @@ -61,7 +61,7 @@ module Fog params[:query]['Action'] = 'RestoreFromClusterSnapshot' params[:query]['ClusterIdentifier'] = cluster_identifier if cluster_identifier - params[:query]['SnapshotIdentifier'] = snapshot_identifier if snapshot_identifier + params[:query]['SnapshotIdentifier'] = snapshot_identifier if snapshot_identifier params[:query]['SnapshotClusterIdentifier'] = snapshot_cluster_identifier if snapshot_cluster_identifier params[:query]['Port'] = port if port params[:query]['AvailabilityZone'] = availability_zone if availability_zone diff --git a/lib/fog/aws/requests/redshift/revoke_cluster_security_group_ingress.rb b/lib/fog/aws/requests/redshift/revoke_cluster_security_group_ingress.rb index 528cd1eba..6a041348f 100644 --- a/lib/fog/aws/requests/redshift/revoke_cluster_security_group_ingress.rb +++ b/lib/fog/aws/requests/redshift/revoke_cluster_security_group_ingress.rb @@ -5,26 +5,26 @@ module Fog require 'fog/aws/parsers/redshift/revoke_cluster_security_group_ingress' # ==== Parameters - # + # # @param [Hash] options - # * :cluster_security_group_name - required - (String) + # * :cluster_security_group_name - required - (String) # The name of the security Group from which to revoke the ingress rule. - # * :cidrip - (String) - # The IP range for which to revoke access. This range must be a valid Classless - # Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified, + # * :cidrip - (String) + # The IP range for which to revoke access. This range must be a valid Classless + # Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified, # EC2SecurityGroupName and EC2SecurityGroupOwnerId cannot be provided. - # * :ec2_security_group_name - (String) - # The name of the EC2 Security Group whose access is to be revoked. If - # EC2SecurityGroupName is specified, EC2SecurityGroupOwnerId must also be + # * :ec2_security_group_name - (String) + # The name of the EC2 Security Group whose access is to be revoked. If + # EC2SecurityGroupName is specified, EC2SecurityGroupOwnerId must also be # provided and CIDRIP cannot be provided. - # * :ec2_security_group_owner_id - (String) - # The AWS account number of the owner of the security group specified in the - # EC2SecurityGroupName parameter. The AWS access key ID is not an acceptable - # value. If EC2SecurityGroupOwnerId is specified, EC2SecurityGroupName must - # also be provided. and CIDRIP cannot be provided. Example: 111122223333 + # * :ec2_security_group_owner_id - (String) + # The AWS account number of the owner of the security group specified in the + # EC2SecurityGroupName parameter. The AWS access key ID is not an acceptable + # value. If EC2SecurityGroupOwnerId is specified, EC2SecurityGroupName must + # also be provided. and CIDRIP cannot be provided. Example: 111122223333 # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_RevokeClusterSecurityGroupIngress.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_RevokeClusterSecurityGroupIngress.html def revoke_cluster_security_group_ingress(options = {}) cluster_security_group_name = options[:cluster_security_group_name] cidrip = options[:cidrip] diff --git a/lib/fog/aws/requests/redshift/revoke_snapshot_access.rb b/lib/fog/aws/requests/redshift/revoke_snapshot_access.rb index b60572b52..0b6f37e8b 100644 --- a/lib/fog/aws/requests/redshift/revoke_snapshot_access.rb +++ b/lib/fog/aws/requests/redshift/revoke_snapshot_access.rb @@ -5,16 +5,16 @@ module Fog require 'fog/aws/parsers/redshift/cluster_snapshot' # ==== Parameters - # + # # @param [Hash] options - # * :snapshot_identifier - required - (String) + # * :snapshot_identifier - required - (String) # The identifier of the snapshot that the account can no longer access. # * :snapshot_cluster_identifier - (String) # * :account_with_restore_access - required - (String) # The identifier of the AWS customer account that can no longer restore the specified snapshot. # # ==== See Also - # http://docs.aws.amazon.com/redshift/latest/APIReference/API_RevokeSnapshotAccess.html + # http://docs.aws.amazon.com/redshift/latest/APIReference/API_RevokeSnapshotAccess.html def revoke_snapshot_access(options = {}) snapshot_identifier = options[:snapshot_identifier] snapshot_cluster_identifier = options[:snapshot_cluster_identifier] @@ -41,4 +41,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/aws/requests/simpledb/create_domain.rb b/lib/fog/aws/requests/simpledb/create_domain.rb index 6101ddafc..9512f0e9d 100644 --- a/lib/fog/aws/requests/simpledb/create_domain.rb +++ b/lib/fog/aws/requests/simpledb/create_domain.rb @@ -8,7 +8,7 @@ module Fog # ==== Parameters # * domain_name<~String>:: Name of domain. Must be between 3 and 255 of the # following characters: a-z, A-Z, 0-9, '_', '-' and '.'. - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: diff --git a/lib/fog/aws/requests/simpledb/delete_domain.rb b/lib/fog/aws/requests/simpledb/delete_domain.rb index 628219945..e780ccccd 100644 --- a/lib/fog/aws/requests/simpledb/delete_domain.rb +++ b/lib/fog/aws/requests/simpledb/delete_domain.rb @@ -8,7 +8,7 @@ module Fog # ==== Parameters # * domain_name<~String>:: Name of domain. Must be between 3 and 255 of the # following characters: a-z, A-Z, 0-9, '_', '-' and '.'. - # + # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: diff --git a/lib/fog/aws/requests/simpledb/domain_metadata.rb b/lib/fog/aws/requests/simpledb/domain_metadata.rb index 213856bef..486ef1507 100644 --- a/lib/fog/aws/requests/simpledb/domain_metadata.rb +++ b/lib/fog/aws/requests/simpledb/domain_metadata.rb @@ -40,7 +40,7 @@ module Fog response = Excon::Response.new if domain = self.data[:domains][domain_name] response.status = 200 - + attribute_names = [] attribute_values = [] for item in domain.values @@ -51,7 +51,7 @@ module Fog end end end - + response.body = { 'AttributeNameCount' => attribute_names.length, 'AttributeNamesSizeBytes' => attribute_names.join('').length, diff --git a/lib/fog/aws/requests/simpledb/select.rb b/lib/fog/aws/requests/simpledb/select.rb index 1b2c9cb97..331053d0d 100644 --- a/lib/fog/aws/requests/simpledb/select.rb +++ b/lib/fog/aws/requests/simpledb/select.rb @@ -18,7 +18,7 @@ module Fog # * body<~Hash>: # * 'BoxUsage'<~Float> # * 'RequestId'<~String> - # * 'Items'<~Hash> - list of attribute name/values for the items formatted as + # * 'Items'<~Hash> - list of attribute name/values for the items formatted as # { 'item_name' => { 'attribute_name' => ['attribute_value'] }} # * 'NextToken'<~String> - offset to start with if there are are more domains to list def select(select_expression, options = {}) diff --git a/lib/fog/aws/requests/sqs/change_message_visibility.rb b/lib/fog/aws/requests/sqs/change_message_visibility.rb index af84af3df..b330d826c 100644 --- a/lib/fog/aws/requests/sqs/change_message_visibility.rb +++ b/lib/fog/aws/requests/sqs/change_message_visibility.rb @@ -27,16 +27,16 @@ module Fog end end - + class Mock - + def change_message_visibility(queue_url, receipt_handle, visibility_timeout) Excon::Response.new.tap do |response| if (queue = data[:queues][queue_url]) message_id, _ = queue[:receipt_handles].find { |message_id, receipts| receipts.has_key?(receipt_handle) } - + if message_id queue[:messages][message_id]['Attributes']['VisibilityTimeout'] = visibility_timeout response.body = { @@ -55,7 +55,7 @@ module Fog end end end - + end end diff --git a/lib/fog/aws/requests/sqs/create_queue.rb b/lib/fog/aws/requests/sqs/create_queue.rb index 4cdccaec9..cbac2b8bc 100644 --- a/lib/fog/aws/requests/sqs/create_queue.rb +++ b/lib/fog/aws/requests/sqs/create_queue.rb @@ -25,12 +25,12 @@ module Fog end end - + class Mock def create_queue(name, options = {}) Excon::Response.new.tap do |response| response.status = 200 - + now = Time.now queue_url = "https://queue.amazonaws.com/#{data[:owner_id]}/#{name}" queue = { @@ -49,7 +49,7 @@ module Fog :receipt_handles => {} } data[:queues][queue_url] = queue unless data[:queues][queue_url] - + response.body = { 'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id @@ -57,7 +57,7 @@ module Fog 'QueueUrl' => queue_url } end - + end end end diff --git a/lib/fog/aws/requests/sqs/delete_message.rb b/lib/fog/aws/requests/sqs/delete_message.rb index c25ba16a0..da5a4d97b 100644 --- a/lib/fog/aws/requests/sqs/delete_message.rb +++ b/lib/fog/aws/requests/sqs/delete_message.rb @@ -25,7 +25,7 @@ module Fog end end - + class Mock def delete_message(queue_url, receipt_handle) diff --git a/lib/fog/aws/requests/sqs/delete_queue.rb b/lib/fog/aws/requests/sqs/delete_queue.rb index 8d122f0f0..6d8c3d577 100644 --- a/lib/fog/aws/requests/sqs/delete_queue.rb +++ b/lib/fog/aws/requests/sqs/delete_queue.rb @@ -23,16 +23,16 @@ module Fog end end - + class Mock - + def delete_queue(queue_url) Excon::Response.new.tap do |response| if (queue = data[:queues][queue_url]) response.status = 200 - + data[:queues].delete(queue_url) - + response.body = { 'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id @@ -44,9 +44,9 @@ module Fog end end end - + end - + end end end diff --git a/lib/fog/aws/requests/sqs/get_queue_attributes.rb b/lib/fog/aws/requests/sqs/get_queue_attributes.rb index 75e852852..23a92b432 100644 --- a/lib/fog/aws/requests/sqs/get_queue_attributes.rb +++ b/lib/fog/aws/requests/sqs/get_queue_attributes.rb @@ -25,14 +25,14 @@ module Fog end end - + class Mock - + def get_queue_attributes(queue_url, attribute_name) Excon::Response.new.tap do |response| if (queue = data[:queues][queue_url]) response.status = 200 - + response.body = { 'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id @@ -45,7 +45,7 @@ module Fog end end end - + end end end diff --git a/lib/fog/aws/requests/sqs/list_queues.rb b/lib/fog/aws/requests/sqs/list_queues.rb index 9059e6f5c..9a9919550 100644 --- a/lib/fog/aws/requests/sqs/list_queues.rb +++ b/lib/fog/aws/requests/sqs/list_queues.rb @@ -22,12 +22,12 @@ module Fog }.merge!(options)) end end - + class Mock def list_queues(options = {}) Excon::Response.new.tap do |response| response.status = 200 - + response.body = { 'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id diff --git a/lib/fog/aws/requests/sqs/receive_message.rb b/lib/fog/aws/requests/sqs/receive_message.rb index aed4e2dd8..d829a67b0 100644 --- a/lib/fog/aws/requests/sqs/receive_message.rb +++ b/lib/fog/aws/requests/sqs/receive_message.rb @@ -28,15 +28,15 @@ module Fog end end - + class Mock - + def receive_message(queue_url, options = {}) Excon::Response.new.tap do |response| if (queue = data[:queues][queue_url]) max_number_of_messages = options['MaxNumberOfMessages'] || 1 now = Time.now - + messages = [] queue[:messages].values.each do |m| @@ -80,7 +80,7 @@ module Fog end end end - + end end end diff --git a/lib/fog/aws/requests/sqs/send_message.rb b/lib/fog/aws/requests/sqs/send_message.rb index 90d25bae7..335238bcd 100644 --- a/lib/fog/aws/requests/sqs/send_message.rb +++ b/lib/fog/aws/requests/sqs/send_message.rb @@ -25,18 +25,18 @@ module Fog end end - + class Mock - + def send_message(queue_url, message) Excon::Response.new.tap do |response| if (queue = data[:queues][queue_url]) response.status = 200 - + now = Time.now message_id = Fog::AWS::Mock.sqs_message_id md5 = Digest::MD5.hexdigest(message) - + queue[:messages][message_id] = { 'MessageId' => message_id, 'Body' => message, @@ -46,9 +46,9 @@ module Fog 'SentTimestamp' => now } } - + queue['Attributes']['LastModifiedTimestamp'] = now - + response.body = { 'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id @@ -62,7 +62,7 @@ module Fog end end end - + end end end diff --git a/lib/fog/aws/requests/sqs/set_queue_attributes.rb b/lib/fog/aws/requests/sqs/set_queue_attributes.rb index 10c7032d9..20ef22710 100644 --- a/lib/fog/aws/requests/sqs/set_queue_attributes.rb +++ b/lib/fog/aws/requests/sqs/set_queue_attributes.rb @@ -27,7 +27,7 @@ module Fog end end - + class Mock def set_queue_attributes(queue_url, attribute_name, attribute_value) Excon::Response.new.tap do |response| diff --git a/lib/fog/aws/requests/storage/abort_multipart_upload.rb b/lib/fog/aws/requests/storage/abort_multipart_upload.rb index d458ed64f..0b2d15e71 100644 --- a/lib/fog/aws/requests/storage/abort_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/abort_multipart_upload.rb @@ -2,7 +2,7 @@ module Fog module Storage class AWS class Real - # + # # Abort a multipart upload # # @param [String] bucket_name Name of bucket to abort multipart upload on diff --git a/lib/fog/aws/requests/storage/copy_object.rb b/lib/fog/aws/requests/storage/copy_object.rb index 037bbe99b..c6faa9347 100644 --- a/lib/fog/aws/requests/storage/copy_object.rb +++ b/lib/fog/aws/requests/storage/copy_object.rb @@ -11,7 +11,7 @@ module Fog # @param source_object_name [String] Name of source object # @param target_bucket_name [String] Name of bucket to create copy in # @param target_object_name [String] Name for new copy of object - # + # # @param options [Hash]: # @option options [String] x-amz-metadata-directive Specifies whether to copy metadata from source or replace with data in request. Must be in ['COPY', 'REPLACE'] # @option options [String] x-amz-copy_source-if-match Copies object if its etag matches this value @@ -20,14 +20,14 @@ module Fog # @option options [Time] x-amz-copy_source-if-unmodified-since Copies object it it has not been modified since this time # @option options [String] x-amz-storage-class Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data # - # + # # @return [Excon::Response] # * body [Hash]: # * ETag [String] - etag of new object # * LastModified [Time] - date object was last modified # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html - # + # def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {}) headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{CGI.escape(source_object_name)}" }.merge!(options) request({ diff --git a/lib/fog/aws/requests/storage/delete_bucket_policy.rb b/lib/fog/aws/requests/storage/delete_bucket_policy.rb index 57c4172d1..f9bfca95c 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_policy.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_policy.rb @@ -9,7 +9,7 @@ module Fog # # @return [Excon::Response] response: # * status [Integer] - 204 - # + # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html def delete_bucket_policy(bucket_name) diff --git a/lib/fog/aws/requests/storage/delete_multiple_objects.rb b/lib/fog/aws/requests/storage/delete_multiple_objects.rb index 3413228d0..40da111e9 100644 --- a/lib/fog/aws/requests/storage/delete_multiple_objects.rb +++ b/lib/fog/aws/requests/storage/delete_multiple_objects.rb @@ -30,7 +30,7 @@ module Fog # * Message [String] - Error description # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html - + def delete_multiple_objects(bucket_name, object_names, options = {}) headers = options.dup data = "" diff --git a/lib/fog/aws/requests/storage/get_bucket_website.rb b/lib/fog/aws/requests/storage/get_bucket_website.rb index 62d52605f..cda7d9031 100644 --- a/lib/fog/aws/requests/storage/get_bucket_website.rb +++ b/lib/fog/aws/requests/storage/get_bucket_website.rb @@ -7,7 +7,7 @@ module Fog # Get website configuration for an S3 bucket # - # + # # @param bucket_name [String] name of bucket to get website configuration for # # @return [Excon::Response] response: diff --git a/lib/fog/aws/requests/storage/head_object.rb b/lib/fog/aws/requests/storage/head_object.rb index fb1af5807..6d99ff9cf 100644 --- a/lib/fog/aws/requests/storage/head_object.rb +++ b/lib/fog/aws/requests/storage/head_object.rb @@ -7,22 +7,22 @@ module Fog # # @param bucket_name [String] Name of bucket to read from # @param object_name [String] Name of object to read - # @param options [Hash]: + # @param options [Hash]: # @option options [String] If-Match Returns object only if its etag matches this value, otherwise returns 412 (Precondition Failed). # @option options [Time] If-Modified-Since Returns object only if it has been modified since this time, otherwise returns 304 (Not Modified). # @option options [String] If-None-Match Returns object only if its etag differs from this value, otherwise returns 304 (Not Modified) # @option options [Time] If-Unmodified-Since Returns object only if it has not been modified since this time, otherwise returns 412 (Precodition Failed). # @option options [String] Range Range of object to download # @option options [String] versionId specify a particular version to retrieve - # - # @return [Excon::Response] response: + # + # @return [Excon::Response] response: # * body [String] Contents of object - # * headers [Hash]: + # * headers [Hash]: # * Content-Length [String] - Size of object contents # * Content-Type [String] - MIME type of object # * ETag [String] - Etag of object # * Last-Modified - [String] Last modified timestamp for object - # + # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectHEAD.html # def head_object(bucket_name, object_name, options={}) diff --git a/lib/fog/aws/requests/storage/initiate_multipart_upload.rb b/lib/fog/aws/requests/storage/initiate_multipart_upload.rb index 05d930230..da0b969fe 100644 --- a/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/initiate_multipart_upload.rb @@ -9,7 +9,7 @@ module Fog # # @param bucket_name [String] Name of bucket to create object in # @param object_name [String] Name of object to create - # @param options [Hash]: + # @param options [Hash]: # @option options [String] Cache-Control Caching behaviour # @option options [String] Content-Disposition Presentational information for the object # @option options [String] Content-Encoding Encoding of object data @@ -18,8 +18,8 @@ module Fog # @option options [String] x-amz-acl Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read'] # @option options [String] x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB. # - # @return [Excon::Response] response: - # * body [Hash]: + # @return [Excon::Response] response: + # * body [Hash]: # * Bucket [String] - Bucket where upload was initiated # * Key [String] - Object key where the upload was initiated # * UploadId [String] - Id for initiated multipart upload diff --git a/lib/fog/aws/requests/storage/post_object_hidden_fields.rb b/lib/fog/aws/requests/storage/post_object_hidden_fields.rb index eaabef96e..0f6ae8176 100644 --- a/lib/fog/aws/requests/storage/post_object_hidden_fields.rb +++ b/lib/fog/aws/requests/storage/post_object_hidden_fields.rb @@ -22,7 +22,7 @@ module Fog # @option options x-amz-meta... meta data tags # # @see http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTForms.html - # + # def post_object_hidden_fields(options = {}) if options['policy'] options['policy'] = Base64.encode64(Fog::JSON.encode(options['policy'])).gsub("\n", "") diff --git a/lib/fog/aws/requests/storage/put_bucket.rb b/lib/fog/aws/requests/storage/put_bucket.rb index 05e1f4d9a..25fcd2986 100644 --- a/lib/fog/aws/requests/storage/put_bucket.rb +++ b/lib/fog/aws/requests/storage/put_bucket.rb @@ -14,7 +14,7 @@ module Fog # * status [Integer] 200 # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUT.html - # + # def put_bucket(bucket_name, options = {}) if location_constraint = options.delete('LocationConstraint') data = diff --git a/lib/fog/aws/requests/storage/put_bucket_acl.rb b/lib/fog/aws/requests/storage/put_bucket_acl.rb index 98a382de5..69caa5d51 100644 --- a/lib/fog/aws/requests/storage/put_bucket_acl.rb +++ b/lib/fog/aws/requests/storage/put_bucket_acl.rb @@ -6,7 +6,7 @@ module Fog require 'fog/aws/requests/storage/acl_utils' # Change access control list for an S3 bucket - # + # # @param bucket_name [String] name of bucket to modify # @param acl [Hash] # * Owner [Hash]: @@ -28,7 +28,7 @@ module Fog def put_bucket_acl(bucket_name, acl) data = "" headers = {} - + if acl.is_a?(Hash) data = Fog::Storage::AWS.hash_to_acl(acl) else @@ -52,7 +52,7 @@ module Fog }) end end - + class Mock def put_bucket_acl(bucket_name, acl) if acl.is_a?(Hash) @@ -62,7 +62,7 @@ module Fog raise Excon::Errors::BadRequest.new('invalid x-amz-acl') end self.data[:acls][:bucket][bucket_name] = acl - end + end end end diff --git a/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb b/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb index 9dd491998..769c0578c 100644 --- a/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +++ b/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb @@ -11,28 +11,28 @@ module Fog # * ID [String] Unique identifier for the rule # * Prefix [String] Prefix identifying one or more objects to which the rule applies # * Enabled [Boolean] if rule is currently being applied - # * Expiration [Hash] Container for the object expiration rule. + # * Expiration [Hash] Container for the object expiration rule. # * Days [Integer] lifetime, in days, of the objects that are subject to the rule # * Date [Date] Indicates when the specific rule take effect. - # The date value must conform to the ISO 8601 format. The time is always midnight UTC. - # * Transition [Hash] Container for the transition rule that describes when objects transition + # The date value must conform to the ISO 8601 format. The time is always midnight UTC. + # * Transition [Hash] Container for the transition rule that describes when objects transition # to the Glacier storage class # * Days [Integer] lifetime, in days, of the objects that are subject to the rule # * Date [Date] Indicates when the specific rule take effect. - # The date value must conform to the ISO 8601 format. The time is always midnight UTC. + # The date value must conform to the ISO 8601 format. The time is always midnight UTC. # * StorageClass [String] Indicates the Amazon S3 storage class to which you want the object - # to transition to. + # to transition to. + # # - # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html - # + # def put_bucket_lifecycle(bucket_name, lifecycle) builder = Nokogiri::XML::Builder.new do LifecycleConfiguration { lifecycle['Rules'].each do |rule| Rule { ID rule['ID'] - Prefix rule['Prefix'] + Prefix rule['Prefix'] Status rule['Enabled'] ? 'Enabled' : 'Disabled' unless (rule['Expiration'] or rule['Transition']) Expiration { Days rule['Days'] } diff --git a/lib/fog/aws/requests/storage/put_object.rb b/lib/fog/aws/requests/storage/put_object.rb index b54c195be..bfc5ebd15 100644 --- a/lib/fog/aws/requests/storage/put_object.rb +++ b/lib/fog/aws/requests/storage/put_object.rb @@ -25,7 +25,7 @@ module Fog # * ETag [String] etag of new object # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html - + def put_object(bucket_name, object_name, data, options = {}) data = Fog::Storage.parse_data(data) headers = data[:headers].merge!(options) diff --git a/lib/fog/aws/requests/storage/put_object_acl.rb b/lib/fog/aws/requests/storage/put_object_acl.rb index 03b714026..9ddbcb386 100644 --- a/lib/fog/aws/requests/storage/put_object_acl.rb +++ b/lib/fog/aws/requests/storage/put_object_acl.rb @@ -33,10 +33,10 @@ module Fog if version_id = options.delete('versionId') query['versionId'] = version_id end - + data = "" headers = {} - + if acl.is_a?(Hash) data = Fog::Storage::AWS.hash_to_acl(acl) else @@ -49,7 +49,7 @@ module Fog headers['Content-MD5'] = Base64.encode64(Digest::MD5.digest(data)).strip headers['Content-Type'] = 'application/json' headers['Date'] = Fog::Time.now.to_date_header - + request({ :body => data, :expects => 200, @@ -61,7 +61,7 @@ module Fog }) end end - + class Mock def put_object_acl(bucket_name, object_name, acl, options = {}) if acl.is_a?(Hash) @@ -71,7 +71,7 @@ module Fog raise Excon::Errors::BadRequest.new('invalid x-amz-acl') end self.data[:acls][:object][bucket_name][object_name] = acl - end + end end end diff --git a/lib/fog/aws/requests/storage/sync_clock.rb b/lib/fog/aws/requests/storage/sync_clock.rb index 147c5b8b8..7dbc576f7 100644 --- a/lib/fog/aws/requests/storage/sync_clock.rb +++ b/lib/fog/aws/requests/storage/sync_clock.rb @@ -25,4 +25,4 @@ module Fog end # Mock end # Storage end # AWS -end # Fog \ No newline at end of file +end # Fog diff --git a/lib/fog/aws/requests/sts/assume_role.rb b/lib/fog/aws/requests/sts/assume_role.rb index afe393293..ff9f59161 100644 --- a/lib/fog/aws/requests/sts/assume_role.rb +++ b/lib/fog/aws/requests/sts/assume_role.rb @@ -4,7 +4,7 @@ module Fog class Real require 'fog/aws/parsers/sts/assume_role' - + # Assume Role # # ==== Parameters @@ -39,7 +39,7 @@ module Fog :parser => Fog::Parsers::AWS::STS::AssumeRole.new }) end - + end end end diff --git a/lib/fog/aws/simpledb.rb b/lib/fog/aws/simpledb.rb index 66ec1b3a7..646c6fc94 100644 --- a/lib/fog/aws/simpledb.rb +++ b/lib/fog/aws/simpledb.rb @@ -4,7 +4,7 @@ module Fog module AWS class SimpleDB < Fog::Service extend Fog::AWS::CredentialFetcher::ServiceMethods - + requires :aws_access_key_id, :aws_secret_access_key recognizes :host, :nil_string, :path, :port, :scheme, :persistent, :region, :aws_session_token, :use_iam_profile, :aws_credentials_expire_at diff --git a/lib/fog/aws/sqs.rb b/lib/fog/aws/sqs.rb index 1dd680769..327ded0c0 100644 --- a/lib/fog/aws/sqs.rb +++ b/lib/fog/aws/sqs.rb @@ -4,7 +4,7 @@ module Fog module AWS class SQS < Fog::Service extend Fog::AWS::CredentialFetcher::ServiceMethods - + requires :aws_access_key_id, :aws_secret_access_key recognizes :region, :host, :path, :port, :scheme, :persistent, :aws_session_token, :use_iam_profile, :aws_credentials_expire_at @@ -30,7 +30,7 @@ module Fog end end end - + def self.reset @data = nil end diff --git a/lib/fog/bare_metal_cloud/requests/compute/list_images.rb b/lib/fog/bare_metal_cloud/requests/compute/list_images.rb index 521ab3483..b96ba0270 100644 --- a/lib/fog/bare_metal_cloud/requests/compute/list_images.rb +++ b/lib/fog/bare_metal_cloud/requests/compute/list_images.rb @@ -8,7 +8,7 @@ module Fog # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: - # * 'image'<~Array> + # * 'image'<~Array> # * 'Size'<~String> - Size of the image # * 'Name'<~String> - Name of the image # diff --git a/lib/fog/bin/aws.rb b/lib/fog/bin/aws.rb index 208c09ea4..e15784ae5 100644 --- a/lib/fog/bin/aws.rb +++ b/lib/fog/bin/aws.rb @@ -90,7 +90,7 @@ class AWS < Fog::Bin when :iam Fog::AWS::IAM.new when :redshift - Fog::AWS::Redshift.new + Fog::AWS::Redshift.new when :rds Fog::AWS::RDS.new when :eu_storage diff --git a/lib/fog/bin/bare_metal_cloud.rb b/lib/fog/bin/bare_metal_cloud.rb index eef5ef4b2..34fc21a6d 100644 --- a/lib/fog/bin/bare_metal_cloud.rb +++ b/lib/fog/bin/bare_metal_cloud.rb @@ -5,7 +5,7 @@ class BareMetalCloud < Fog::Bin case key when :compute Fog::Compute::BareMetalCloud - else + else raise ArgumentError, "Unsupported #{self} service: #{key}" end end diff --git a/lib/fog/bin/brightbox.rb b/lib/fog/bin/brightbox.rb index 47b7e1607..638080fb0 100644 --- a/lib/fog/bin/brightbox.rb +++ b/lib/fog/bin/brightbox.rb @@ -5,7 +5,7 @@ class Brightbox < Fog::Bin case key when :compute Fog::Compute::Brightbox - else + else raise ArgumentError, "Unrecognized service: #{key}" end end diff --git a/lib/fog/bin/clodo.rb b/lib/fog/bin/clodo.rb index fdad0e161..f36e46e85 100644 --- a/lib/fog/bin/clodo.rb +++ b/lib/fog/bin/clodo.rb @@ -5,7 +5,7 @@ class Clodo < Fog::Bin case key when :compute Fog::Compute::Clodo - else + else raise ArgumentError, "Unrecognized service: #{key}" end end diff --git a/lib/fog/bin/cloudsigma.rb b/lib/fog/bin/cloudsigma.rb index 9f572c289..08047923d 100644 --- a/lib/fog/bin/cloudsigma.rb +++ b/lib/fog/bin/cloudsigma.rb @@ -26,4 +26,4 @@ class CloudSigma < Fog::Bin Fog::CloudSigma.services end end -end \ No newline at end of file +end diff --git a/lib/fog/bin/ecloud.rb b/lib/fog/bin/ecloud.rb index 229e63f5f..6562400ca 100644 --- a/lib/fog/bin/ecloud.rb +++ b/lib/fog/bin/ecloud.rb @@ -9,7 +9,7 @@ class Ecloud < Fog::Bin case key when :compute Fog::Compute::Ecloud - else + else raise ArgumentError, "Unrecognized service: #{key}" end end diff --git a/lib/fog/bin/go_grid.rb b/lib/fog/bin/go_grid.rb index bea8352dc..4acc091fd 100644 --- a/lib/fog/bin/go_grid.rb +++ b/lib/fog/bin/go_grid.rb @@ -5,7 +5,7 @@ class GoGrid < Fog::Bin case key when :compute Fog::Compute::GoGrid - else + else raise ArgumentError, "Unsupported #{self} service: #{key}" end end diff --git a/lib/fog/bin/google.rb b/lib/fog/bin/google.rb index 9f71e647b..b7389f22a 100644 --- a/lib/fog/bin/google.rb +++ b/lib/fog/bin/google.rb @@ -7,7 +7,7 @@ module Google # deviates from other bin stuff to accomodate gem Fog::Compute::Google when :storage Fog::Storage::Google - else + else raise ArgumentError, "Unsupported #{self} service: #{key}" end end diff --git a/lib/fog/bin/local.rb b/lib/fog/bin/local.rb index 7aa2d6bb6..bd22f67a1 100644 --- a/lib/fog/bin/local.rb +++ b/lib/fog/bin/local.rb @@ -5,7 +5,7 @@ class Local < Fog::Bin case key when :storage Fog::Storage::Local - else + else raise ArgumentError, "Unsupported #{self} service: #{key}" end end diff --git a/lib/fog/bin/rackspace.rb b/lib/fog/bin/rackspace.rb index 90d2579f6..7e9952b9b 100644 --- a/lib/fog/bin/rackspace.rb +++ b/lib/fog/bin/rackspace.rb @@ -6,7 +6,7 @@ class Rackspace < Fog::Bin when :auto_scale Fog::Rackspace::AutoScale when :block_storage - Fog::Rackspace::BlockStorage + Fog::Rackspace::BlockStorage when :cdn Fog::CDN::Rackspace when :compute diff --git a/lib/fog/bin/stormondemand.rb b/lib/fog/bin/stormondemand.rb index 23d03a9bc..2b889e3b6 100644 --- a/lib/fog/bin/stormondemand.rb +++ b/lib/fog/bin/stormondemand.rb @@ -5,7 +5,7 @@ class StormOnDemand < Fog::Bin case key when :compute Fog::Compute::StormOnDemand - else + else raise ArgumentError, "Unsupported #{self} service: #{key}" end end @@ -28,4 +28,4 @@ class StormOnDemand < Fog::Bin end end -end \ No newline at end of file +end diff --git a/lib/fog/bin/zerigo.rb b/lib/fog/bin/zerigo.rb index 2e0a6e04d..38b69fc1a 100644 --- a/lib/fog/bin/zerigo.rb +++ b/lib/fog/bin/zerigo.rb @@ -5,7 +5,7 @@ class Zerigo < Fog::Bin case key when :dns Fog::DNS::Zerigo - else + else raise ArgumentError, "Unrecognized service: #{key}" end end diff --git a/lib/fog/bluebox/models/blb/lb_application.rb b/lib/fog/bluebox/models/blb/lb_application.rb index 4700c8cb6..c4923e253 100644 --- a/lib/fog/bluebox/models/blb/lb_application.rb +++ b/lib/fog/bluebox/models/blb/lb_application.rb @@ -6,7 +6,7 @@ module Fog class LbApplication < Fog::Model identity :id - + attribute :name attribute :ip_v4 attribute :ip_v6 diff --git a/lib/fog/bluebox/models/blb/lb_backend.rb b/lib/fog/bluebox/models/blb/lb_backend.rb index 3951a4143..86b657fbb 100644 --- a/lib/fog/bluebox/models/blb/lb_backend.rb +++ b/lib/fog/bluebox/models/blb/lb_backend.rb @@ -6,7 +6,7 @@ module Fog class LbBackend < Fog::Model identity :id - + attribute :name attribute :lb_machines attribute :monitoring_url diff --git a/lib/fog/bluebox/models/blb/lb_service.rb b/lib/fog/bluebox/models/blb/lb_service.rb index 5d2ef9fa8..22ffbf8b8 100644 --- a/lib/fog/bluebox/models/blb/lb_service.rb +++ b/lib/fog/bluebox/models/blb/lb_service.rb @@ -6,7 +6,7 @@ module Fog class LbService < Fog::Model identity :id - + attribute :name attribute :port attribute :service_type diff --git a/lib/fog/bluebox/models/compute/location.rb b/lib/fog/bluebox/models/compute/location.rb index 3a15a6a8e..9c2fc43b9 100644 --- a/lib/fog/bluebox/models/compute/location.rb +++ b/lib/fog/bluebox/models/compute/location.rb @@ -7,7 +7,7 @@ module Fog class Location < Fog::Model identity :id - + attribute :description end diff --git a/lib/fog/bluebox/requests/blb/get_lb_machine.rb b/lib/fog/bluebox/requests/blb/get_lb_machine.rb index cebed3d45..c04316d50 100644 --- a/lib/fog/bluebox/requests/blb/get_lb_machine.rb +++ b/lib/fog/bluebox/requests/blb/get_lb_machine.rb @@ -12,7 +12,7 @@ module Fog # * response<~Excon::Response>: # * body<~Hash>: # * id<~String> - machine ID - # * ip<~String> - machine IP address for this member (v4 or v6) + # * ip<~String> - machine IP address for this member (v4 or v6) # * port<~Integer> - service port for this member # * hostname<~String> - name as registered with Box Panel # * acl_name<~String> - name of ACL for this machine diff --git a/lib/fog/bluebox/requests/blb/get_lb_machines.rb b/lib/fog/bluebox/requests/blb/get_lb_machines.rb index 716c981c9..e0bb698f6 100644 --- a/lib/fog/bluebox/requests/blb/get_lb_machines.rb +++ b/lib/fog/bluebox/requests/blb/get_lb_machines.rb @@ -12,7 +12,7 @@ module Fog # * body<~Array>: # * machine<~Hash>: # * id<~String> - machine ID - # * ip<~String> - machine IP address for this member (v4 or v6) + # * ip<~String> - machine IP address for this member (v4 or v6) # * port<~Integer> - service port for this member # * hostname<~String> - name as registered with Box Panel # * acl_name<~String> - name of ACL for this machine diff --git a/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb b/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb index b80fb602a..0716e023b 100644 --- a/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb +++ b/lib/fog/bluebox/requests/blb/remove_machine_from_lb_backend.rb @@ -7,7 +7,7 @@ module Fog # === Parameters # * lb_backend_id<~String> - ID of backend # * lb_machine_id<~String> - ID of machine - # + # # ==== Returns # * response<~Excon::Response>: # * body<~String> - success or failure message diff --git a/lib/fog/clodo/requests/compute/create_server.rb b/lib/fog/clodo/requests/compute/create_server.rb index 562b6c23a..cedfd5f22 100644 --- a/lib/fog/clodo/requests/compute/create_server.rb +++ b/lib/fog/clodo/requests/compute/create_server.rb @@ -13,7 +13,7 @@ module Fog # Output: # id - VDS ID # name - VDS title - # imageId - OS ID + # imageId - OS ID # adminPass - root password def create_server(image_id, options = {}) diff --git a/lib/fog/clodo/requests/compute/delete_ip_address.rb b/lib/fog/clodo/requests/compute/delete_ip_address.rb index 4c4ffb50c..b2fc4d1f1 100644 --- a/lib/fog/clodo/requests/compute/delete_ip_address.rb +++ b/lib/fog/clodo/requests/compute/delete_ip_address.rb @@ -36,7 +36,7 @@ module Fog raise Excon::Errors::BadRequest.new "Address not found" unless pa && pa.reject! {|addr| addr['ip'] == ip } - + response = Excon::Response.new response.status = 204 response diff --git a/lib/fog/cloudsigma/connection.rb b/lib/fog/cloudsigma/connection.rb index 7cb4f59a6..ab055955d 100644 --- a/lib/fog/cloudsigma/connection.rb +++ b/lib/fog/cloudsigma/connection.rb @@ -194,4 +194,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/cloudsigma/error.rb b/lib/fog/cloudsigma/error.rb index bba86fb58..8ed7b73de 100644 --- a/lib/fog/cloudsigma/error.rb +++ b/lib/fog/cloudsigma/error.rb @@ -42,4 +42,4 @@ module Fog end -end \ No newline at end of file +end diff --git a/lib/fog/cloudsigma/mock_data.rb b/lib/fog/cloudsigma/mock_data.rb index dd85aa912..ca1a97975 100644 --- a/lib/fog/cloudsigma/mock_data.rb +++ b/lib/fog/cloudsigma/mock_data.rb @@ -43,4 +43,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/cloudsigma/models/lib_volume.rb b/lib/fog/cloudsigma/models/lib_volume.rb index e5d285018..93ad12e47 100644 --- a/lib/fog/cloudsigma/models/lib_volume.rb +++ b/lib/fog/cloudsigma/models/lib_volume.rb @@ -47,4 +47,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/cloudsigma/models/price_record.rb b/lib/fog/cloudsigma/models/price_record.rb index 27816a209..0e4e1c6d8 100644 --- a/lib/fog/cloudsigma/models/price_record.rb +++ b/lib/fog/cloudsigma/models/price_record.rb @@ -35,4 +35,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/cloudsigma/models/pricing.rb b/lib/fog/cloudsigma/models/pricing.rb index be81d1bf9..4185fe1e0 100644 --- a/lib/fog/cloudsigma/models/pricing.rb +++ b/lib/fog/cloudsigma/models/pricing.rb @@ -17,4 +17,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/cloudsigma/models/profile.rb b/lib/fog/cloudsigma/models/profile.rb index ea4639ec3..9e75de812 100644 --- a/lib/fog/cloudsigma/models/profile.rb +++ b/lib/fog/cloudsigma/models/profile.rb @@ -47,4 +47,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/cloudsigma/models/volume.rb b/lib/fog/cloudsigma/models/volume.rb index fee03fba2..8072cea21 100644 --- a/lib/fog/cloudsigma/models/volume.rb +++ b/lib/fog/cloudsigma/models/volume.rb @@ -68,4 +68,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/cloudsigma/nested_model.rb b/lib/fog/cloudsigma/nested_model.rb index 1b0ce2118..70219c19a 100644 --- a/lib/fog/cloudsigma/nested_model.rb +++ b/lib/fog/cloudsigma/nested_model.rb @@ -57,4 +57,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/cloudstack/compute.rb b/lib/fog/cloudstack/compute.rb index 923b94a01..ddbf57627 100644 --- a/lib/fog/cloudstack/compute.rb +++ b/lib/fog/cloudstack/compute.rb @@ -130,7 +130,7 @@ module Fog request :reset_password_for_virtual_machine request :revoke_security_group_ingress request :revoke_security_group_egress - request :start_virtual_machine + request :start_virtual_machine request :stop_virtual_machine request :update_account request :update_domain @@ -233,7 +233,7 @@ module Fog :query => params, :headers => headers, :method => method, - :expects => expects + :expects => expects }) rescue Excon::Errors::HTTPStatusError => error diff --git a/lib/fog/cloudstack/requests/compute/assign_to_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/assign_to_load_balancer_rule.rb index 696b99add..335981a22 100644 --- a/lib/fog/cloudstack/requests/compute/assign_to_load_balancer_rule.rb +++ b/lib/fog/cloudstack/requests/compute/assign_to_load_balancer_rule.rb @@ -8,7 +8,7 @@ module Fog # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/assignToLoadBalancerRule.html] def assign_to_load_balancer_rule(id,virtualmachineids=[]) virtualmachineids = [*virtualmachineids] - + options = { 'command' => 'assignToLoadBalancerRule', 'id' => id, diff --git a/lib/fog/cloudstack/requests/compute/delete_snapshot.rb b/lib/fog/cloudstack/requests/compute/delete_snapshot.rb index 570270be7..7a6742bb5 100644 --- a/lib/fog/cloudstack/requests/compute/delete_snapshot.rb +++ b/lib/fog/cloudstack/requests/compute/delete_snapshot.rb @@ -56,7 +56,7 @@ module Fog end end - + end end end diff --git a/lib/fog/cloudstack/requests/compute/generate_usage_records.rb b/lib/fog/cloudstack/requests/compute/generate_usage_records.rb index 458389697..907c29ea5 100644 --- a/lib/fog/cloudstack/requests/compute/generate_usage_records.rb +++ b/lib/fog/cloudstack/requests/compute/generate_usage_records.rb @@ -10,15 +10,15 @@ module Fog options.merge!( 'command' => 'generateUsageRecords' ) - + if startdate = options.delete('startdate') options.merge!('startdate' => startdate.strftime('%Y-%m-%d')) end - + if enddate = options.delete('enddate') options.merge!('enddate' => enddate.strftime('%Y-%m-%d')) end - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/get_vm_password.rb b/lib/fog/cloudstack/requests/compute/get_vm_password.rb index 81bbf22f5..1704da271 100644 --- a/lib/fog/cloudstack/requests/compute/get_vm_password.rb +++ b/lib/fog/cloudstack/requests/compute/get_vm_password.rb @@ -11,7 +11,7 @@ module Fog 'command' => 'getVMPassword', 'id' => id } - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_accounts.rb b/lib/fog/cloudstack/requests/compute/list_accounts.rb index bd0630f8a..ffdeab8e0 100644 --- a/lib/fog/cloudstack/requests/compute/list_accounts.rb +++ b/lib/fog/cloudstack/requests/compute/list_accounts.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listAccounts' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_alerts.rb b/lib/fog/cloudstack/requests/compute/list_alerts.rb index 85fe8399a..69f8cf7b8 100644 --- a/lib/fog/cloudstack/requests/compute/list_alerts.rb +++ b/lib/fog/cloudstack/requests/compute/list_alerts.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listAlerts' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_capacity.rb b/lib/fog/cloudstack/requests/compute/list_capacity.rb index 2855d850c..f2347c265 100644 --- a/lib/fog/cloudstack/requests/compute/list_capacity.rb +++ b/lib/fog/cloudstack/requests/compute/list_capacity.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listCapacity' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_clusters.rb b/lib/fog/cloudstack/requests/compute/list_clusters.rb index 1d1085999..cac96d450 100644 --- a/lib/fog/cloudstack/requests/compute/list_clusters.rb +++ b/lib/fog/cloudstack/requests/compute/list_clusters.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listClusters' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_configurations.rb b/lib/fog/cloudstack/requests/compute/list_configurations.rb index 48c9e277b..204d0bef0 100644 --- a/lib/fog/cloudstack/requests/compute/list_configurations.rb +++ b/lib/fog/cloudstack/requests/compute/list_configurations.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listConfigurations' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb b/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb index 08bc816b5..c003079d9 100644 --- a/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb +++ b/lib/fog/cloudstack/requests/compute/list_disk_offerings.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listDiskOfferings' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_domain_children.rb b/lib/fog/cloudstack/requests/compute/list_domain_children.rb index aaf3a632c..2cbe24648 100644 --- a/lib/fog/cloudstack/requests/compute/list_domain_children.rb +++ b/lib/fog/cloudstack/requests/compute/list_domain_children.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listDomainChildren' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_domains.rb b/lib/fog/cloudstack/requests/compute/list_domains.rb index 2f05cb69b..683b1eead 100644 --- a/lib/fog/cloudstack/requests/compute/list_domains.rb +++ b/lib/fog/cloudstack/requests/compute/list_domains.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listDomains' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_events.rb b/lib/fog/cloudstack/requests/compute/list_events.rb index 4245db9ef..7843880af 100644 --- a/lib/fog/cloudstack/requests/compute/list_events.rb +++ b/lib/fog/cloudstack/requests/compute/list_events.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listEvents' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_external_firewalls.rb b/lib/fog/cloudstack/requests/compute/list_external_firewalls.rb index 2bd033cc7..b188287e9 100644 --- a/lib/fog/cloudstack/requests/compute/list_external_firewalls.rb +++ b/lib/fog/cloudstack/requests/compute/list_external_firewalls.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listExternalFirewalls' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_external_load_balancers.rb b/lib/fog/cloudstack/requests/compute/list_external_load_balancers.rb index af2c8f28f..1e2cc1227 100644 --- a/lib/fog/cloudstack/requests/compute/list_external_load_balancers.rb +++ b/lib/fog/cloudstack/requests/compute/list_external_load_balancers.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listExternalLoadBalancers' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_hosts.rb b/lib/fog/cloudstack/requests/compute/list_hosts.rb index 0056872db..594889329 100644 --- a/lib/fog/cloudstack/requests/compute/list_hosts.rb +++ b/lib/fog/cloudstack/requests/compute/list_hosts.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listHosts' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_hypervisors.rb b/lib/fog/cloudstack/requests/compute/list_hypervisors.rb index e001ebc49..8244d4db4 100644 --- a/lib/fog/cloudstack/requests/compute/list_hypervisors.rb +++ b/lib/fog/cloudstack/requests/compute/list_hypervisors.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listHypervisors' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_instance_groups.rb b/lib/fog/cloudstack/requests/compute/list_instance_groups.rb index 07cc86300..1cc417c8e 100644 --- a/lib/fog/cloudstack/requests/compute/list_instance_groups.rb +++ b/lib/fog/cloudstack/requests/compute/list_instance_groups.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listInstanceGroups' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_isos.rb b/lib/fog/cloudstack/requests/compute/list_isos.rb index 630c4a03e..839f71cb5 100644 --- a/lib/fog/cloudstack/requests/compute/list_isos.rb +++ b/lib/fog/cloudstack/requests/compute/list_isos.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listIsos' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_load_balancer_rule_instances.rb b/lib/fog/cloudstack/requests/compute/list_load_balancer_rule_instances.rb index cc56f6f00..9cc21248c 100644 --- a/lib/fog/cloudstack/requests/compute/list_load_balancer_rule_instances.rb +++ b/lib/fog/cloudstack/requests/compute/list_load_balancer_rule_instances.rb @@ -11,7 +11,7 @@ module Fog 'command' => 'listLoadBalancerRuleInstances', 'id' => load_balancer_rule_id ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_load_balancer_rules.rb b/lib/fog/cloudstack/requests/compute/list_load_balancer_rules.rb index 9be207951..a8b8b4d7b 100644 --- a/lib/fog/cloudstack/requests/compute/list_load_balancer_rules.rb +++ b/lib/fog/cloudstack/requests/compute/list_load_balancer_rules.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listLoadBalancerRules' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_network_offerings.rb b/lib/fog/cloudstack/requests/compute/list_network_offerings.rb index 3af1fa114..5e86dfb86 100644 --- a/lib/fog/cloudstack/requests/compute/list_network_offerings.rb +++ b/lib/fog/cloudstack/requests/compute/list_network_offerings.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listNetworkOfferings' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_networks.rb b/lib/fog/cloudstack/requests/compute/list_networks.rb index 5476ee437..bfb6b7c7f 100644 --- a/lib/fog/cloudstack/requests/compute/list_networks.rb +++ b/lib/fog/cloudstack/requests/compute/list_networks.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listNetworks' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_os_categories.rb b/lib/fog/cloudstack/requests/compute/list_os_categories.rb index e020235aa..4f2be386f 100644 --- a/lib/fog/cloudstack/requests/compute/list_os_categories.rb +++ b/lib/fog/cloudstack/requests/compute/list_os_categories.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listOsCategories' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_os_types.rb b/lib/fog/cloudstack/requests/compute/list_os_types.rb index e7ad65037..4abcaa79e 100644 --- a/lib/fog/cloudstack/requests/compute/list_os_types.rb +++ b/lib/fog/cloudstack/requests/compute/list_os_types.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listOsTypes' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_pods.rb b/lib/fog/cloudstack/requests/compute/list_pods.rb index 03aa9740b..102e7d70a 100644 --- a/lib/fog/cloudstack/requests/compute/list_pods.rb +++ b/lib/fog/cloudstack/requests/compute/list_pods.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listPods' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_port_forwarding_rules.rb b/lib/fog/cloudstack/requests/compute/list_port_forwarding_rules.rb index 9ce663021..5bdde173b 100644 --- a/lib/fog/cloudstack/requests/compute/list_port_forwarding_rules.rb +++ b/lib/fog/cloudstack/requests/compute/list_port_forwarding_rules.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listPortForwardingRules' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_public_ip_addresses.rb b/lib/fog/cloudstack/requests/compute/list_public_ip_addresses.rb index 5c6c10ea0..18ebe99f5 100644 --- a/lib/fog/cloudstack/requests/compute/list_public_ip_addresses.rb +++ b/lib/fog/cloudstack/requests/compute/list_public_ip_addresses.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listPublicIpAddresses' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_resource_limits.rb b/lib/fog/cloudstack/requests/compute/list_resource_limits.rb index 58af9d964..94c873d76 100644 --- a/lib/fog/cloudstack/requests/compute/list_resource_limits.rb +++ b/lib/fog/cloudstack/requests/compute/list_resource_limits.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listResourceLimits' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_snapshot_policies.rb b/lib/fog/cloudstack/requests/compute/list_snapshot_policies.rb index 0696cd005..d9ef1bf8c 100644 --- a/lib/fog/cloudstack/requests/compute/list_snapshot_policies.rb +++ b/lib/fog/cloudstack/requests/compute/list_snapshot_policies.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listSnapshotPolicies' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_snapshots.rb b/lib/fog/cloudstack/requests/compute/list_snapshots.rb index 270f434d0..df4651326 100644 --- a/lib/fog/cloudstack/requests/compute/list_snapshots.rb +++ b/lib/fog/cloudstack/requests/compute/list_snapshots.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listSnapshots' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_ssh_key_pairs.rb b/lib/fog/cloudstack/requests/compute/list_ssh_key_pairs.rb index 4b8ff1be6..9b4eb2086 100644 --- a/lib/fog/cloudstack/requests/compute/list_ssh_key_pairs.rb +++ b/lib/fog/cloudstack/requests/compute/list_ssh_key_pairs.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listSSHKeyPairs' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_storage_pools.rb b/lib/fog/cloudstack/requests/compute/list_storage_pools.rb index ca461fbd6..e41b5fedb 100644 --- a/lib/fog/cloudstack/requests/compute/list_storage_pools.rb +++ b/lib/fog/cloudstack/requests/compute/list_storage_pools.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listStoragePools' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_usage_records.rb b/lib/fog/cloudstack/requests/compute/list_usage_records.rb index c9cf63819..0d169c96b 100644 --- a/lib/fog/cloudstack/requests/compute/list_usage_records.rb +++ b/lib/fog/cloudstack/requests/compute/list_usage_records.rb @@ -10,15 +10,15 @@ module Fog options.merge!( 'command' => 'listUsageRecords' ) - + if startdate = options.delete('startdate') options.merge!('startdate' => startdate.strftime('%Y-%m-%d')) end - + if enddate = options.delete('enddate') options.merge!('enddate' => enddate.strftime('%Y-%m-%d')) end - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/list_users.rb b/lib/fog/cloudstack/requests/compute/list_users.rb index c0de27123..09c905882 100644 --- a/lib/fog/cloudstack/requests/compute/list_users.rb +++ b/lib/fog/cloudstack/requests/compute/list_users.rb @@ -10,7 +10,7 @@ module Fog options.merge!( 'command' => 'listUsers' ) - + request(options) end diff --git a/lib/fog/cloudstack/requests/compute/remove_from_load_balancer_rule.rb b/lib/fog/cloudstack/requests/compute/remove_from_load_balancer_rule.rb index 913813bfa..bc09ac9e7 100644 --- a/lib/fog/cloudstack/requests/compute/remove_from_load_balancer_rule.rb +++ b/lib/fog/cloudstack/requests/compute/remove_from_load_balancer_rule.rb @@ -8,7 +8,7 @@ module Fog # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.12/global_admin/removeFromLoadBalancerRule.html] def remove_from_load_balancer_rule(id,virtualmachineids=[]) virtualmachineids = [*virtualmachineids] - + options = { 'command' => 'removeFromLoadBalancerRule', 'id' => id, diff --git a/lib/fog/cloudstack/requests/compute/reset_password_for_virtual_machine.rb b/lib/fog/cloudstack/requests/compute/reset_password_for_virtual_machine.rb index b044bd0df..00671aa2e 100644 --- a/lib/fog/cloudstack/requests/compute/reset_password_for_virtual_machine.rb +++ b/lib/fog/cloudstack/requests/compute/reset_password_for_virtual_machine.rb @@ -11,7 +11,7 @@ module Fog 'command' => 'resetPasswordForVirtualMachine', 'id' => id } - + request(options) end diff --git a/lib/fog/digitalocean/compute.rb b/lib/fog/digitalocean/compute.rb index 39371935b..feea465ff 100644 --- a/lib/fog/digitalocean/compute.rb +++ b/lib/fog/digitalocean/compute.rb @@ -20,7 +20,7 @@ module Fog collection :regions model :ssh_key collection :ssh_keys - + request_path 'fog/digitalocean/requests/compute' request :list_servers request :list_images @@ -39,7 +39,7 @@ module Fog request :get_ssh_key request :destroy_ssh_key - # request :digitalocean_resize + # request :digitalocean_resize class Mock diff --git a/lib/fog/digitalocean/examples/getting_started.md b/lib/fog/digitalocean/examples/getting_started.md index 48665ebd2..c8e62bb1f 100644 --- a/lib/fog/digitalocean/examples/getting_started.md +++ b/lib/fog/digitalocean/examples/getting_started.md @@ -4,7 +4,7 @@ You'll need a DigitalOcean account and API key to use this provider. Get one from http://www.digitalocean.com. -To generate the API key, login to the DigitalOcean web panel and go to +To generate the API key, login to the DigitalOcean web panel and go to 'My Settings -> API Access -> Generate a new API key'. Write down the Client Key and API Key, you'll need both to use the service. @@ -13,7 +13,7 @@ Write down the Client Key and API Key, you'll need both to use the service. ## Connecting, retrieving and managing server objects Before we start, I guess it will be useful to the reader to know -that Fog servers are 'droplets' in DigitalOcean's parlance. +that Fog servers are 'droplets' in DigitalOcean's parlance. 'Server' is the Fog way to name VMs, and we have respected that in the DigitalOcean's Fog provider. @@ -56,7 +56,7 @@ server = docean.servers.create :name => 'foobar', :image_id => docean.images.first.id, # use the first flavor listed :flavor_id => docean.flavors.first.id, - # use the first region listed + # use the first region listed :region_id => docean.regions.first.id ``` diff --git a/lib/fog/digitalocean/models/compute/flavor.rb b/lib/fog/digitalocean/models/compute/flavor.rb index 2ed3dcc65..70a6e57de 100644 --- a/lib/fog/digitalocean/models/compute/flavor.rb +++ b/lib/fog/digitalocean/models/compute/flavor.rb @@ -4,7 +4,7 @@ module Fog module Compute class DigitalOcean class Flavor < Fog::Model - + identity :id attribute :name diff --git a/lib/fog/digitalocean/models/compute/image.rb b/lib/fog/digitalocean/models/compute/image.rb index 45d536801..a6f9fd688 100644 --- a/lib/fog/digitalocean/models/compute/image.rb +++ b/lib/fog/digitalocean/models/compute/image.rb @@ -4,7 +4,7 @@ module Fog module Compute class DigitalOcean class Image < Fog::Model - + identity :id attribute :name attribute :distribution diff --git a/lib/fog/digitalocean/models/compute/region.rb b/lib/fog/digitalocean/models/compute/region.rb index 448e42240..b5af26b18 100644 --- a/lib/fog/digitalocean/models/compute/region.rb +++ b/lib/fog/digitalocean/models/compute/region.rb @@ -4,7 +4,7 @@ module Fog module Compute class DigitalOcean class Region < Fog::Model - + identity :id attribute :name diff --git a/lib/fog/digitalocean/models/compute/ssh_key.rb b/lib/fog/digitalocean/models/compute/ssh_key.rb index a5d203536..a698bb7dc 100644 --- a/lib/fog/digitalocean/models/compute/ssh_key.rb +++ b/lib/fog/digitalocean/models/compute/ssh_key.rb @@ -1,6 +1,6 @@ module Fog module Compute - class DigitalOcean + class DigitalOcean class SshKey < Fog::Model identity :id diff --git a/lib/fog/digitalocean/models/compute/ssh_keys.rb b/lib/fog/digitalocean/models/compute/ssh_keys.rb index a7f1ef4df..8b2c0ca56 100644 --- a/lib/fog/digitalocean/models/compute/ssh_keys.rb +++ b/lib/fog/digitalocean/models/compute/ssh_keys.rb @@ -2,7 +2,7 @@ require 'fog/digitalocean/models/compute/ssh_key' module Fog module Compute - class DigitalOcean + class DigitalOcean class SshKeys < Fog::Collection identity :href diff --git a/lib/fog/digitalocean/requests/compute/destroy_ssh_key.rb b/lib/fog/digitalocean/requests/compute/destroy_ssh_key.rb index 876c823c1..1819f7076 100644 --- a/lib/fog/digitalocean/requests/compute/destroy_ssh_key.rb +++ b/lib/fog/digitalocean/requests/compute/destroy_ssh_key.rb @@ -1,6 +1,6 @@ module Fog module Compute - class DigitalOcean + class DigitalOcean class Real # diff --git a/lib/fog/digitalocean/requests/compute/get_ssh_key.rb b/lib/fog/digitalocean/requests/compute/get_ssh_key.rb index ee982d4fd..e88b211bd 100644 --- a/lib/fog/digitalocean/requests/compute/get_ssh_key.rb +++ b/lib/fog/digitalocean/requests/compute/get_ssh_key.rb @@ -1,6 +1,6 @@ module Fog module Compute - class DigitalOcean + class DigitalOcean class Real # diff --git a/lib/fog/digitalocean/requests/compute/list_flavors.rb b/lib/fog/digitalocean/requests/compute/list_flavors.rb index 869fb0061..4ccc9ff46 100644 --- a/lib/fog/digitalocean/requests/compute/list_flavors.rb +++ b/lib/fog/digitalocean/requests/compute/list_flavors.rb @@ -1,6 +1,6 @@ module Fog module Compute - class DigitalOcean + class DigitalOcean class Real def list_flavors(options = {}) diff --git a/lib/fog/digitalocean/requests/compute/list_regions.rb b/lib/fog/digitalocean/requests/compute/list_regions.rb index e8577daaa..cc13faf0b 100644 --- a/lib/fog/digitalocean/requests/compute/list_regions.rb +++ b/lib/fog/digitalocean/requests/compute/list_regions.rb @@ -1,6 +1,6 @@ module Fog module Compute - class DigitalOcean + class DigitalOcean class Real def list_regions(options = {}) diff --git a/lib/fog/digitalocean/requests/compute/list_servers.rb b/lib/fog/digitalocean/requests/compute/list_servers.rb index b3f0ca636..6062b6f6f 100644 --- a/lib/fog/digitalocean/requests/compute/list_servers.rb +++ b/lib/fog/digitalocean/requests/compute/list_servers.rb @@ -1,6 +1,6 @@ module Fog module Compute - class DigitalOcean + class DigitalOcean class Real def list_servers(options = {}) diff --git a/lib/fog/digitalocean/requests/compute/list_ssh_keys.rb b/lib/fog/digitalocean/requests/compute/list_ssh_keys.rb index cec1c65c0..2887643a8 100644 --- a/lib/fog/digitalocean/requests/compute/list_ssh_keys.rb +++ b/lib/fog/digitalocean/requests/compute/list_ssh_keys.rb @@ -1,6 +1,6 @@ module Fog module Compute - class DigitalOcean + class DigitalOcean class Real def list_ssh_keys(options = {}) diff --git a/lib/fog/dnsimple/requests/dns/get_domain.rb b/lib/fog/dnsimple/requests/dns/get_domain.rb index baddb3905..e922e8ba5 100644 --- a/lib/fog/dnsimple/requests/dns/get_domain.rb +++ b/lib/fog/dnsimple/requests/dns/get_domain.rb @@ -40,4 +40,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb b/lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb index 6663fce6b..b66cc2f5a 100644 --- a/lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb +++ b/lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb @@ -17,11 +17,11 @@ module Fog # * gtdLocation<~String> Global Traffic Director location. Values: DEFAULT, US_EAST, US_WEST, EUROPE # * status<~Integer> - 201 - secondary entry successfully created or modified, 400 - secondary entry name or IP addresses not valid, see errors in response content def create_secondary(secondary_name, ip_addresses) - + body = { "ip" => [*ip_addresses] } - + request( :expects => 201, :method => 'PUT', diff --git a/lib/fog/dreamhost/examples/dns/getting_started.md b/lib/fog/dreamhost/examples/dns/getting_started.md index c026d4fd9..85bbc2982 100644 --- a/lib/fog/dreamhost/examples/dns/getting_started.md +++ b/lib/fog/dreamhost/examples/dns/getting_started.md @@ -1,6 +1,6 @@ # Getting started with Fog::DNS and Dreamhost (2013/01/21) -You'll need a [Dreamhost](http://www.dreamhost.com) account and API key +You'll need a [Dreamhost](http://www.dreamhost.com) account and API key to use this. See http://wiki.dreamhost.com/API. @@ -13,7 +13,7 @@ records. We need to create the service first, using the API key from our account: ```ruby -require 'fog' +require 'fog' require 'pp' dh = Fog::DNS.new( :provider => "Dreamhost", @@ -80,7 +80,7 @@ you can also use this code to accomplish the same thing: ```ruby dh.records.create( - :name => 'stuff.rbel.co', + :name => 'stuff.rbel.co', :type => 'A', :value => '8.8.8.8' ) diff --git a/lib/fog/dreamhost/models/dns/record.rb b/lib/fog/dreamhost/models/dns/record.rb index bf1333e9d..2aea5c072 100644 --- a/lib/fog/dreamhost/models/dns/record.rb +++ b/lib/fog/dreamhost/models/dns/record.rb @@ -9,7 +9,7 @@ module Fog identity :name, :aliases => 'record' attribute :value - attribute :zone + attribute :zone attribute :type attribute :editable attribute :account_id diff --git a/lib/fog/dreamhost/models/dns/zone.rb b/lib/fog/dreamhost/models/dns/zone.rb index c583960f8..1f46f3224 100644 --- a/lib/fog/dreamhost/models/dns/zone.rb +++ b/lib/fog/dreamhost/models/dns/zone.rb @@ -3,7 +3,7 @@ require 'fog/dreamhost/models/dns/records' module Fog module DNS - class Dreamhost + class Dreamhost # # Dreamhost API has no concept of 'Zone', but we @@ -16,7 +16,7 @@ module Fog identity :id attribute :domain, :aliases => 'name' - # + # # There's no destroy API call # def destroy @@ -45,7 +45,7 @@ module Fog ] end - # + # # There's no zone create API call # def save diff --git a/lib/fog/dreamhost/models/dns/zones.rb b/lib/fog/dreamhost/models/dns/zones.rb index 3463f6cae..8255966f5 100644 --- a/lib/fog/dreamhost/models/dns/zones.rb +++ b/lib/fog/dreamhost/models/dns/zones.rb @@ -3,7 +3,7 @@ require 'fog/dreamhost/models/dns/zone' module Fog module DNS - class Dreamhost + class Dreamhost # # Dreamhost API has no concept of 'Zone', but we diff --git a/lib/fog/dreamhost/requests/dns/create_record.rb b/lib/fog/dreamhost/requests/dns/create_record.rb index c763a7b02..aeb919e9f 100644 --- a/lib/fog/dreamhost/requests/dns/create_record.rb +++ b/lib/fog/dreamhost/requests/dns/create_record.rb @@ -16,7 +16,7 @@ module Fog request( :expects => 200, :method => 'GET', :path => "/", - :query => { + :query => { :record => record, :type => type, :value => value, diff --git a/lib/fog/dreamhost/requests/dns/delete_record.rb b/lib/fog/dreamhost/requests/dns/delete_record.rb index 9a113839e..bba688aba 100644 --- a/lib/fog/dreamhost/requests/dns/delete_record.rb +++ b/lib/fog/dreamhost/requests/dns/delete_record.rb @@ -16,12 +16,12 @@ module Fog request( :expects => 200, :method => "GET", :path => "/", - :query => { + :query => { :cmd => 'dns-remove_record', :type => type, :record => name, :value => value, - } + } ) end diff --git a/lib/fog/dreamhost/requests/dns/list_records.rb b/lib/fog/dreamhost/requests/dns/list_records.rb index 591ce418a..d736eb8b3 100644 --- a/lib/fog/dreamhost/requests/dns/list_records.rb +++ b/lib/fog/dreamhost/requests/dns/list_records.rb @@ -1,6 +1,6 @@ module Fog module DNS - class Dreamhost + class Dreamhost class Mock diff --git a/lib/fog/ecloud/mock_data_classes.rb b/lib/fog/ecloud/mock_data_classes.rb index 61ee24c8d..d724a1418 100644 --- a/lib/fog/ecloud/mock_data_classes.rb +++ b/lib/fog/ecloud/mock_data_classes.rb @@ -53,7 +53,7 @@ module Fog end def organization_collection_from_href(href) - find_href_in(href, all_organizations) + find_href_in(href, all_organizations) end def all_organizations diff --git a/lib/fog/ecloud/models/compute/api_key.rb b/lib/fog/ecloud/models/compute/api_key.rb index 3b7403d7b..d009f00e6 100644 --- a/lib/fog/ecloud/models/compute/api_key.rb +++ b/lib/fog/ecloud/models/compute/api_key.rb @@ -11,7 +11,7 @@ module Fog attribute :status, :aliases => :Status attribute :private_key, :aliases => :PrivateKey - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/authentication_level.rb b/lib/fog/ecloud/models/compute/authentication_level.rb index a43f344f6..56dc6b5fb 100644 --- a/lib/fog/ecloud/models/compute/authentication_level.rb +++ b/lib/fog/ecloud/models/compute/authentication_level.rb @@ -11,8 +11,8 @@ module Fog attribute :hmacsha1_enabled, :aliases => :HMACSHA1Enabled, :type => :boolean attribute :hmacsha256_enabled, :aliases => :HMACSHA256Enabled, :type => :boolean attribute :hmacsha512_enabled, :aliases => :HMACSHA512Enabled, :type => :boolean - - + + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/catalog_configuration.rb b/lib/fog/ecloud/models/compute/catalog_configuration.rb index ad87e1879..8b06d6f09 100644 --- a/lib/fog/ecloud/models/compute/catalog_configuration.rb +++ b/lib/fog/ecloud/models/compute/catalog_configuration.rb @@ -13,7 +13,7 @@ module Fog attribute :network_adapters, :aliases => :NetworkAdapters, :type => :integer attribute :network_mappings, :aliases => :NetworkMappings - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/cpu_usage_detail.rb b/lib/fog/ecloud/models/compute/cpu_usage_detail.rb index 9b89979a6..a50e96c12 100644 --- a/lib/fog/ecloud/models/compute/cpu_usage_detail.rb +++ b/lib/fog/ecloud/models/compute/cpu_usage_detail.rb @@ -7,7 +7,7 @@ module Fog attribute :time, :aliases => :Time attribute :value, :aliases => :Value - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/guest_process.rb b/lib/fog/ecloud/models/compute/guest_process.rb index bdce3cbf8..0372e82f1 100644 --- a/lib/fog/ecloud/models/compute/guest_process.rb +++ b/lib/fog/ecloud/models/compute/guest_process.rb @@ -5,7 +5,7 @@ module Fog identity :name attribute :process_id, :aliases => :ProcessId - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/login_banner.rb b/lib/fog/ecloud/models/compute/login_banner.rb index 202be0d23..f57e95ae2 100644 --- a/lib/fog/ecloud/models/compute/login_banner.rb +++ b/lib/fog/ecloud/models/compute/login_banner.rb @@ -6,7 +6,7 @@ module Fog attribute :display, :aliases => :Display, :type => :boolean attribute :text, :aliases => :Text - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/memory_usage_detail.rb b/lib/fog/ecloud/models/compute/memory_usage_detail.rb index 8a578583f..185bee85f 100644 --- a/lib/fog/ecloud/models/compute/memory_usage_detail.rb +++ b/lib/fog/ecloud/models/compute/memory_usage_detail.rb @@ -6,7 +6,7 @@ module Fog attribute :time, :aliases => :Time attribute :value, :aliases => :Value - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/operating_system.rb b/lib/fog/ecloud/models/compute/operating_system.rb index 4b66d5d63..ed8c68c5b 100644 --- a/lib/fog/ecloud/models/compute/operating_system.rb +++ b/lib/fog/ecloud/models/compute/operating_system.rb @@ -7,7 +7,7 @@ module Fog attribute :name, :aliases => :Name attribute :type, :aliases => :Type - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/password_complexity_rule.rb b/lib/fog/ecloud/models/compute/password_complexity_rule.rb index 7895adc25..1ddbcb21b 100644 --- a/lib/fog/ecloud/models/compute/password_complexity_rule.rb +++ b/lib/fog/ecloud/models/compute/password_complexity_rule.rb @@ -39,7 +39,7 @@ module Fog def minimum_generations_before_reuse custom_rules[:MinimumGenerationsBeforeReuse] end - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/physical_device.rb b/lib/fog/ecloud/models/compute/physical_device.rb index 4cea4fc81..663b93162 100644 --- a/lib/fog/ecloud/models/compute/physical_device.rb +++ b/lib/fog/ecloud/models/compute/physical_device.rb @@ -12,7 +12,7 @@ module Fog attribute :classification, :aliases => :Classification attribute :model, :aliases => :Model - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/role.rb b/lib/fog/ecloud/models/compute/role.rb index 22758c8bc..7233b1a41 100644 --- a/lib/fog/ecloud/models/compute/role.rb +++ b/lib/fog/ecloud/models/compute/role.rb @@ -14,7 +14,7 @@ module Fog attribute :is_admin, :aliases => :IsAdmin, :type => :boolean attribute :business_operations, :aliases => :BusinessOperations - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/server_configuration_option.rb b/lib/fog/ecloud/models/compute/server_configuration_option.rb index 32b9fb607..7e1cccd4c 100644 --- a/lib/fog/ecloud/models/compute/server_configuration_option.rb +++ b/lib/fog/ecloud/models/compute/server_configuration_option.rb @@ -7,7 +7,7 @@ module Fog attribute :disk, :aliases => :Disk attribute :customization, :aliases => :Customization - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/storage_usage_detail.rb b/lib/fog/ecloud/models/compute/storage_usage_detail.rb index 10f0870c5..0cd029179 100644 --- a/lib/fog/ecloud/models/compute/storage_usage_detail.rb +++ b/lib/fog/ecloud/models/compute/storage_usage_detail.rb @@ -6,7 +6,7 @@ module Fog attribute :disk_count, :aliases => :DiskCount attribute :allocated, :aliases => :Allocated - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/models/compute/support_ticket.rb b/lib/fog/ecloud/models/compute/support_ticket.rb index dbd63eb99..7e3d8ccda 100644 --- a/lib/fog/ecloud/models/compute/support_ticket.rb +++ b/lib/fog/ecloud/models/compute/support_ticket.rb @@ -19,7 +19,7 @@ module Fog attribute :solution, :aliases => :Solution attribute :history, :aliases => :History - + def id href.scan(/\d+/)[0] end diff --git a/lib/fog/ecloud/requests/compute/admin_edit_login_banner.rb b/lib/fog/ecloud/requests/compute/admin_edit_login_banner.rb index d5e537fa0..b55392872 100644 --- a/lib/fog/ecloud/requests/compute/admin_edit_login_banner.rb +++ b/lib/fog/ecloud/requests/compute/admin_edit_login_banner.rb @@ -18,13 +18,13 @@ module Fog private - + def build_login_banner_edit(data) xml = Builder::XmlMarkup.new xml.LoginBanner do xml.Display data[:display] xml.Text data[:text] if data[:text] - end + end end end end diff --git a/lib/fog/ecloud/requests/compute/admin_edit_password_complexity_rules.rb b/lib/fog/ecloud/requests/compute/admin_edit_password_complexity_rules.rb index 1bbba462a..9e5fa0d2c 100644 --- a/lib/fog/ecloud/requests/compute/admin_edit_password_complexity_rules.rb +++ b/lib/fog/ecloud/requests/compute/admin_edit_password_complexity_rules.rb @@ -22,7 +22,7 @@ module Fog private - + def build_password_complexity_rules_edit(data) xml = Builder::XmlMarkup.new xml.PasswordComplexityRules do @@ -66,7 +66,7 @@ module Fog if data[:description] xml.Description data[:description] end - end + end end end end diff --git a/lib/fog/ecloud/requests/compute/backup_internet_service_create.rb b/lib/fog/ecloud/requests/compute/backup_internet_service_create.rb index 5ef4766a4..a821068c1 100644 --- a/lib/fog/ecloud/requests/compute/backup_internet_service_create.rb +++ b/lib/fog/ecloud/requests/compute/backup_internet_service_create.rb @@ -8,7 +8,7 @@ module Fog validate_data([:name, :protocol, :enabled, :persistence], data) unless data[:persistence][:type] raise ArgumentError.new("Required data missing: :persistence[:type]") - end + end request( :body => generate_backup_internet_service_request(data), @@ -44,4 +44,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/backup_internet_service_edit.rb b/lib/fog/ecloud/requests/compute/backup_internet_service_edit.rb index 95d2233d9..81d5cd3a6 100644 --- a/lib/fog/ecloud/requests/compute/backup_internet_service_edit.rb +++ b/lib/fog/ecloud/requests/compute/backup_internet_service_edit.rb @@ -8,7 +8,7 @@ module Fog validate_data([:name, :protocol, :enabled, :persistence], data) unless data[:persistence][:type] raise ArgumentError.new("Required data missing: :persistence[:type]") - end + end request( :body => generate_backup_internet_service_request(data), @@ -44,4 +44,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/compute_pool_edit.rb b/lib/fog/ecloud/requests/compute/compute_pool_edit.rb index 2e865312f..f0a34b4b0 100644 --- a/lib/fog/ecloud/requests/compute/compute_pool_edit.rb +++ b/lib/fog/ecloud/requests/compute/compute_pool_edit.rb @@ -13,7 +13,7 @@ module Fog def build_compute_pool_body_edit(options) xml = Builder::XmlMarkup.new xml.ComputePool(:name => options[:name]) do - end + end end end diff --git a/lib/fog/ecloud/requests/compute/firewall_acls_create.rb b/lib/fog/ecloud/requests/compute/firewall_acls_create.rb index f324cad9e..8f814ec0b 100644 --- a/lib/fog/ecloud/requests/compute/firewall_acls_create.rb +++ b/lib/fog/ecloud/requests/compute/firewall_acls_create.rb @@ -50,7 +50,7 @@ module Fog if data[:destination][:external_ip_address] xml.ExternalIpAddress data[:external_ip_address] end - if data[:destination][:external_network] + if data[:destination][:external_network] xml.ExternalNetwork do xml.Address data[:destination][:external_network][:address] xml.Size data[:destination][:external_network][:size] @@ -76,4 +76,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/internet_service_edit.rb b/lib/fog/ecloud/requests/compute/internet_service_edit.rb index 95971a367..5692c2f9d 100644 --- a/lib/fog/ecloud/requests/compute/internet_service_edit.rb +++ b/lib/fog/ecloud/requests/compute/internet_service_edit.rb @@ -36,7 +36,7 @@ module Fog if options[:load_balancing_method] xml.LoadBalancingMethod options[:load_balancing_method] end - end + end end end diff --git a/lib/fog/ecloud/requests/compute/monitors_create_ecv.rb b/lib/fog/ecloud/requests/compute/monitors_create_ecv.rb index 92e957be3..95adaaf8c 100644 --- a/lib/fog/ecloud/requests/compute/monitors_create_ecv.rb +++ b/lib/fog/ecloud/requests/compute/monitors_create_ecv.rb @@ -37,4 +37,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/monitors_create_http.rb b/lib/fog/ecloud/requests/compute/monitors_create_http.rb index 291e39173..641459a71 100644 --- a/lib/fog/ecloud/requests/compute/monitors_create_http.rb +++ b/lib/fog/ecloud/requests/compute/monitors_create_http.rb @@ -41,4 +41,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/monitors_create_ping.rb b/lib/fog/ecloud/requests/compute/monitors_create_ping.rb index f2dba1eb1..978fa069a 100644 --- a/lib/fog/ecloud/requests/compute/monitors_create_ping.rb +++ b/lib/fog/ecloud/requests/compute/monitors_create_ping.rb @@ -32,4 +32,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/monitors_edit_ecv.rb b/lib/fog/ecloud/requests/compute/monitors_edit_ecv.rb index 9bb55b876..704a36f4a 100644 --- a/lib/fog/ecloud/requests/compute/monitors_edit_ecv.rb +++ b/lib/fog/ecloud/requests/compute/monitors_edit_ecv.rb @@ -37,4 +37,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/monitors_edit_http.rb b/lib/fog/ecloud/requests/compute/monitors_edit_http.rb index 519150512..02cbc7a48 100644 --- a/lib/fog/ecloud/requests/compute/monitors_edit_http.rb +++ b/lib/fog/ecloud/requests/compute/monitors_edit_http.rb @@ -41,4 +41,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/monitors_edit_ping.rb b/lib/fog/ecloud/requests/compute/monitors_edit_ping.rb index 206574b98..094e6edde 100644 --- a/lib/fog/ecloud/requests/compute/monitors_edit_ping.rb +++ b/lib/fog/ecloud/requests/compute/monitors_edit_ping.rb @@ -32,4 +32,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/node_service_edit.rb b/lib/fog/ecloud/requests/compute/node_service_edit.rb index d71ab22c9..93f7985be 100644 --- a/lib/fog/ecloud/requests/compute/node_service_edit.rb +++ b/lib/fog/ecloud/requests/compute/node_service_edit.rb @@ -17,7 +17,7 @@ module Fog if options[:description] xml.Description options[:description] end - end + end end end diff --git a/lib/fog/ecloud/requests/compute/rnat_associations_create_device.rb b/lib/fog/ecloud/requests/compute/rnat_associations_create_device.rb index 3f9a15cea..580a04644 100644 --- a/lib/fog/ecloud/requests/compute/rnat_associations_create_device.rb +++ b/lib/fog/ecloud/requests/compute/rnat_associations_create_device.rb @@ -29,4 +29,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/rnat_associations_edit_network.rb b/lib/fog/ecloud/requests/compute/rnat_associations_edit_network.rb index 926e64cb5..cce586f8f 100644 --- a/lib/fog/ecloud/requests/compute/rnat_associations_edit_network.rb +++ b/lib/fog/ecloud/requests/compute/rnat_associations_edit_network.rb @@ -28,4 +28,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/trusted_network_groups_create.rb b/lib/fog/ecloud/requests/compute/trusted_network_groups_create.rb index 7dd4834c3..9b1f2b3d1 100644 --- a/lib/fog/ecloud/requests/compute/trusted_network_groups_create.rb +++ b/lib/fog/ecloud/requests/compute/trusted_network_groups_create.rb @@ -10,7 +10,7 @@ module Fog unless (data[:hosts] || data[:networks]) raise ArgumentError.new("Required data missing: Either hosts or networks must be present") end - + request( :body => generate_create_trusted_network_groups_request(data), @@ -50,4 +50,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/trusted_network_groups_edit.rb b/lib/fog/ecloud/requests/compute/trusted_network_groups_edit.rb index a99e67acb..80fa4352e 100644 --- a/lib/fog/ecloud/requests/compute/trusted_network_groups_edit.rb +++ b/lib/fog/ecloud/requests/compute/trusted_network_groups_edit.rb @@ -10,7 +10,7 @@ module Fog unless (data[:hosts] || data[:networks]) raise ArgumentError.new("Required data missing: Either hosts or networks must be present") end - + request( :body => generate_edit_trusted_network_groups_request(data), @@ -50,4 +50,4 @@ module Fog end end end -end +end diff --git a/lib/fog/ecloud/requests/compute/virtual_machine_copy.rb b/lib/fog/ecloud/requests/compute/virtual_machine_copy.rb index 5882cfcb2..0b79dad62 100644 --- a/lib/fog/ecloud/requests/compute/virtual_machine_copy.rb +++ b/lib/fog/ecloud/requests/compute/virtual_machine_copy.rb @@ -21,7 +21,7 @@ module Fog ip = options[:ips][options[:network_uri].index(uri)] end {:href => uri, :name => network[:name], :ip => ip} - end + end options end @@ -70,7 +70,7 @@ module Fog options[:network_uri] = options[:network_uri].is_a?(String) ? [options[:network_uri]] : options[:network_uri] options[:network_uri].each do |uri| xml.NetworkAdapter do - xml.Network(:href => uri[:href], :name => uri[:name], :type => "application/vnd.tmrk.cloud.network") + xml.Network(:href => uri[:href], :name => uri[:name], :type => "application/vnd.tmrk.cloud.network") xml.IpAddress uri[:ip] end end @@ -83,7 +83,7 @@ module Fog end end end - end + end end xml.SshKey(:href => options[:ssh_key_uri]) end diff --git a/lib/fog/ecloud/requests/compute/virtual_machine_edit.rb b/lib/fog/ecloud/requests/compute/virtual_machine_edit.rb index 74bbffe01..ccab5f29b 100644 --- a/lib/fog/ecloud/requests/compute/virtual_machine_edit.rb +++ b/lib/fog/ecloud/requests/compute/virtual_machine_edit.rb @@ -23,7 +23,7 @@ module Fog end end end - end + end end end diff --git a/lib/fog/google/examples/metadata.rb b/lib/fog/google/examples/metadata.rb index 7b31f80c5..30a7b472d 100755 --- a/lib/fog/google/examples/metadata.rb +++ b/lib/fog/google/examples/metadata.rb @@ -12,7 +12,7 @@ def test disk.wait_for { disk.ready? } - server = connection.servers.create(defaults = { + server = connection.servers.create(defaults = { :name => name, :disks => [disk], :machine_type => "n1-standard-1", diff --git a/lib/fog/google/models/compute/images.rb b/lib/fog/google/models/compute/images.rb index d21a2c446..45682ba96 100644 --- a/lib/fog/google/models/compute/images.rb +++ b/lib/fog/google/models/compute/images.rb @@ -13,7 +13,7 @@ module Fog 'debian-cloud', 'centos-cloud', # RHEL removed from this list because not everyone has access to it. - # 'rhel-cloud', + # 'rhel-cloud', ] def all diff --git a/lib/fog/google/requests/compute/delete_snapshot.rb b/lib/fog/google/requests/compute/delete_snapshot.rb index ce12b9492..23475dc3b 100644 --- a/lib/fog/google/requests/compute/delete_snapshot.rb +++ b/lib/fog/google/requests/compute/delete_snapshot.rb @@ -6,7 +6,7 @@ module Fog def delete_snapshot(snapshot_name, zone_name) Fog::Mock.not_implemented - end + end end diff --git a/lib/fog/google/requests/storage/get_object_http_url.rb b/lib/fog/google/requests/storage/get_object_http_url.rb index 40546b1af..e6b0fbfa0 100644 --- a/lib/fog/google/requests/storage/get_object_http_url.rb +++ b/lib/fog/google/requests/storage/get_object_http_url.rb @@ -48,4 +48,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/google/requests/storage/get_object_https_url.rb b/lib/fog/google/requests/storage/get_object_https_url.rb index 821af7de5..07f7ad219 100644 --- a/lib/fog/google/requests/storage/get_object_https_url.rb +++ b/lib/fog/google/requests/storage/get_object_https_url.rb @@ -48,4 +48,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/google/requests/storage/put_bucket_acl.rb b/lib/fog/google/requests/storage/put_bucket_acl.rb index 70ae47d86..f168d38da 100644 --- a/lib/fog/google/requests/storage/put_bucket_acl.rb +++ b/lib/fog/google/requests/storage/put_bucket_acl.rb @@ -1,7 +1,7 @@ module Fog module Storage class Google - + class Mock def put_bucket_acl(bucket_name, acl) Fog::Mock.not_implemented diff --git a/lib/fog/google/requests/storage/put_object_acl.rb b/lib/fog/google/requests/storage/put_object_acl.rb index 69f320dd1..3dfd479c7 100644 --- a/lib/fog/google/requests/storage/put_object_acl.rb +++ b/lib/fog/google/requests/storage/put_object_acl.rb @@ -12,7 +12,7 @@ module Fog if %w(AllUsers AllAuthenticatedUsers).include?(scope['type']) "" else - "" + + "" + scope.to_a.select {|pair| pair[0] != 'type'}.map { |pair| tag(pair[0], pair[1]) }.join("\n") + "" end diff --git a/lib/fog/hp/README.md b/lib/fog/hp/README.md index 94b9e83a9..e42ff18e5 100755 --- a/lib/fog/hp/README.md +++ b/lib/fog/hp/README.md @@ -35,11 +35,11 @@ For working with the HP Cloud Extension to Fog, the following pre-requisites are ## Examples -Apart from the overall [Fog documentation](http://fog.io), we have HP Cloud specific examples that will help you in using the Ruby Fog bindings with HP Cloud services. +Apart from the overall [Fog documentation](http://fog.io), we have HP Cloud specific examples that will help you in using the Ruby Fog bindings with HP Cloud services. [Examples for using Fog with HP Cloud Services](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) -## Articles +## Articles In addition to the examples we have provided, for Compute, Object Storage, and other HP Cloud services, we wanted to give you a few additional tips and "how-tos' to make using your Ruby Fog bindings even easier. Take a look at the articles listed below to find out more! diff --git a/lib/fog/hp/compute.rb b/lib/fog/hp/compute.rb index ff821b7e1..9249668ee 100644 --- a/lib/fog/hp/compute.rb +++ b/lib/fog/hp/compute.rb @@ -192,7 +192,7 @@ module Fog ### A symbol is required, we should ensure that the value is loaded as a symbol auth_version = options[:hp_auth_version] || :v2 auth_version = auth_version.to_s.downcase.to_sym - + ### Pass the service name for compute via the options hash options[:hp_service_type] ||= "Compute" @hp_tenant_id = options[:hp_tenant_id] diff --git a/lib/fog/hp/compute_v2.rb b/lib/fog/hp/compute_v2.rb index fffd1f8d7..e6e8974e4 100644 --- a/lib/fog/hp/compute_v2.rb +++ b/lib/fog/hp/compute_v2.rb @@ -198,7 +198,7 @@ module Fog } ] } - + } end end diff --git a/lib/fog/hp/docs/connect.md b/lib/fog/hp/docs/connect.md index c7ed5c8ed..2c83243db 100755 --- a/lib/fog/hp/docs/connect.md +++ b/lib/fog/hp/docs/connect.md @@ -18,9 +18,9 @@ To connect to the HP Cloud, follow these steps: require 'rubygems' require 'fog' - + **Note**: If the `require 'rubygems'` command returns a value of `false`, enter IRB with the following command: - + irb -r 'rubygems' 3. Establish a connection to the desired HP Cloud service @@ -107,8 +107,8 @@ Use this parameter to set different timeout values. You can set the timeouts pa ... ... :connection_options => { - :connect_timeout => , - :read_timeout => , + :connect_timeout => , + :read_timeout => , :write_timeout => }) ### Proxy @@ -119,7 +119,7 @@ Use this parameter to specify a proxy URL for both HTTP and HTTPS connections. ... ... :connection_options => {:proxy => 'http://myproxyurl:4444'}) - + ### HTTPS/SSL By default, peer certificates are verified when you use secure socket layer (SSL) for HTTPS. Sometimes this does not work due to configurations in different operating systems, causing connection errors. To help avoid this, you can set HTTPS/SSL parameters. To set the path to the certificates: @@ -128,7 +128,7 @@ By default, peer certificates are verified when you use secure socket layer (SSL ... ... :connection_options => {:ssl_ca_path => "/path/to/certs"}) - + To set the path to a certificate file: conn = Fog::Compute.new( diff --git a/lib/fog/hp/docs/install.md b/lib/fog/hp/docs/install.md index 7be471c6f..3d3b340e2 100755 --- a/lib/fog/hp/docs/install.md +++ b/lib/fog/hp/docs/install.md @@ -5,14 +5,14 @@ Before you can begin working with the Ruby Fog bindings, you have to install the * [Ubuntu Installation](#ubuntu-installation) * [Mac OSX Installation](#mac-osx-installation) * [CentOS Installation](#centos-installation) -* [Uninstalling](#uninstalling) +* [Uninstalling](#uninstalling) To install and use HP Cloud Ruby bindings for Fog, please install the [latest release](http://fog.io) of Fog. ## Ubuntu Installation -If you plan on using the Ruby Fog binding on Ubuntu, we recommend you use Ubuntu versions 12.04 or 12.10. The Ruby Fog bindings may work on other versions, but are not supported. +If you plan on using the Ruby Fog binding on Ubuntu, we recommend you use Ubuntu versions 12.04 or 12.10. The Ruby Fog bindings may work on other versions, but are not supported. To install the Ruby Fog bindings on the Ubuntu operating system, follow these steps while logged in as the root user: @@ -41,7 +41,7 @@ See the [Connecting to the Service](https://github.com/fog/fog/blob/master/lib/f ## MacOS X Installation -Some Ruby packages require C/C++ compiler support. On the MacOS, if you haven't already installed XCode, we recommend that you install it to provide the needed C/C++ compiler for your system. +Some Ruby packages require C/C++ compiler support. On the MacOS, if you haven't already installed XCode, we recommend that you install it to provide the needed C/C++ compiler for your system. To install the Ruby Fog bindings on MacOS X, follow these steps while logged in as the root user: @@ -54,9 +54,9 @@ To install the Ruby Fog bindings on MacOS X, follow these steps while logged in 3. Add the Homebrew path to your $PATH environment variable. You can either do this via the CLI command line: export PATH=:/usr/local/sbin:$PATH - + (The default Homebrew installation location is the `/usr/local/sbin` directory.) Or you can add the Homebrew path (`/usr/local/sbin`) to your $PATH environment variable in your local `.profile` file. - + 4. Install RVM on your system: curl -L get.rvm.io | bash -s stable @@ -64,16 +64,16 @@ To install the Ruby Fog bindings on MacOS X, follow these steps while logged in **Note**: You can also install RVM using [Jewelry Box](https://unfiniti.com/software/mac/jewelrybox), a RVM graphical user interface (GUI) for Mac OSX. 5. Install the packages required by RVM; the following command lists the required packages: - + source ~/.rvm/scripts/rvm rvm requirements # install required packages - + 6. Install the required packages listed in Step 5: brew install - + Where `` are the packages that you need to install. - + 7. Install the `libksba` library: brew install libksba @@ -82,7 +82,7 @@ To install the Ruby Fog bindings on MacOS X, follow these steps while logged in rvm user all rvm install ruby-1.9.2 --with-gcc=clang - + 9. Use the Ruby version and make it the default: rvm use 1.9.2 --default @@ -96,14 +96,14 @@ See the [Connecting to the Service](https://github.com/fog/fog/blob/master/lib/f ## CentOS Installation -If you plan on using the Ruby Fog binding on CentOS, we recommend you use CentOS versions 6.2 or 6.3. The Ruby Fog bindings may work on other versions, but are not supported. +If you plan on using the Ruby Fog binding on CentOS, we recommend you use CentOS versions 6.2 or 6.3. The Ruby Fog bindings may work on other versions, but are not supported. To install the Ruby Fog bindings on CentOS, follow these steps while logged in as the root user: 1. Install Ruby and Ruby Dev: yum install -y ruby ruby-devel - + 2. Install Rubygems: yum install -y rubygems diff --git a/lib/fog/hp/examples/block_storage.md b/lib/fog/hp/examples/block_storage.md index 7da8fc618..670a964db 100755 --- a/lib/fog/hp/examples/block_storage.md +++ b/lib/fog/hp/examples/block_storage.md @@ -1,6 +1,6 @@ #Examples for working with HP Cloud Block Storage Service v12.12 -HP Cloud block storage provides support for volumes and snapshots. A volume can store boot images, user data or both. They provide customers with persistent and flexible permanent storage. You can think of it as list of USB devices, that can be plugged in anywhere at will. Volumes can be attached to server instances and mounted. +HP Cloud block storage provides support for volumes and snapshots. A volume can store boot images, user data or both. They provide customers with persistent and flexible permanent storage. You can think of it as list of USB devices, that can be plugged in anywhere at will. Volumes can be attached to server instances and mounted. Snapshots are saved volume images at specific moments in time. You can take a snapshot of a volume and then use that snapshot to create a new volume. @@ -90,7 +90,7 @@ This section discusses the volume operations you can perform using the model abs new_volume.id # returns the id of the volume new_volume.name # => "TestVolume" new_volume.status # returns the status of the volume e.g. creating, available - + 6. Create a new volume from an existing snapshot new_volume = conn.volumes.create( @@ -224,9 +224,9 @@ This section discusses the volume operations you can perform using the request a 7. Create a new bootable volume from an suitable single-part image - new_volume = conn.create_volume("TestBootVol", - "My Test Boot Volume", - 10, + new_volume = conn.create_volume("TestBootVol", + "My Test Boot Volume", + 10, {"imageRef" => "1111111"} ) new_volume.id # returns the id of the volume @@ -293,4 +293,4 @@ This section discusses the snapshot operations you can perform using the request conn.delete_snapshot(snapshot_id) --------- -[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) \ No newline at end of file +[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) diff --git a/lib/fog/hp/examples/block_storage_v2.md b/lib/fog/hp/examples/block_storage_v2.md index 6db34cdce..0740926e1 100755 --- a/lib/fog/hp/examples/block_storage_v2.md +++ b/lib/fog/hp/examples/block_storage_v2.md @@ -2,7 +2,7 @@ HP Cloud block storage provides support for volumes and snapshots. The latest HP Cloud deployment, version 13.5, takes advantage of more OpenStack functionality and the block storage service uses slightly different commands (often noted by *v2* in the commands) than the previous 12.12 version. Verify which version of HP Cloud you are working with. -A volume can store boot images, user data or both. They provide customers with persistent and flexible permanent storage. You can think of it as list of USB devices, that can be plugged in anywhere at will. Volumes can be attached to server instances and mounted. +A volume can store boot images, user data or both. They provide customers with persistent and flexible permanent storage. You can think of it as list of USB devices, that can be plugged in anywhere at will. Volumes can be attached to server instances and mounted. Snapshots are saved volume images at specific moments in time. You can take a snapshot of a volume and then use that snapshot to create a new volume. @@ -99,14 +99,14 @@ This section discusses the volume operations you can perform using the model abs 6. Create a volume from a volume snapshot: new_volume = conn.volumes.create( - :name => 'VolumeFromSnapshot', + :name => 'VolumeFromSnapshot', :snapshot_id => "") **Note**: The size of the volume you create from a snapshot, is the same as that of the snapshot. 7. Create a volume from another source volume: new_volume = conn.volumes.create( - :name => 'VolumeClone', + :name => 'VolumeClone', :source_volid => "") **Note**: The size of the volume you create from a source volume, is the same as that of the source volume. @@ -114,8 +114,8 @@ This section discusses the volume operations you can perform using the model abs # assuming we have a server server.volume_attachments.create( - :server_id => server.id, - :volume_id => "", + :server_id => server.id, + :volume_id => "", :device => "/dev/sdf") # => true **Note**: The device parameter is the mount point on the server instance to which the volume is attached (for example, `/dev/sdf`). @@ -126,7 +126,7 @@ This section discusses the volume operations you can perform using the model abs server.volume_attachments.all 10. Detach a volume from a server: - + # assuming we have a server att_vol = server.volume_attachments.get("") att_vol.destroy @@ -161,7 +161,7 @@ This section discusses the snapshot operations you can perform using the model a snapshot = conn.snapshots.all(:display_name => 'My Snapshot') snapshot.name # returns name of the snapshot - snapshot.description # returns the description of the snapshot + snapshot.description # returns the description of the snapshot snapshot.created_at # returns the date the snapshot was created snapshot.status # returns the state of the snapshot e.g., available @@ -169,7 +169,7 @@ This section discusses the snapshot operations you can perform using the model a snapshot = conn.snapshots.get("") snapshot.name # returns name of the volume - snapshot.description # returns the description of the snapshot + snapshot.description # returns the description of the snapshot snapshot.status # returns the state of the snapshot e.g., available snapshot.created_at # returns the date the snapshot was created snapshot.volume_id # returns the volume ID @@ -180,7 +180,7 @@ This section discusses the snapshot operations you can perform using the model a :volume_id => "", :name => "TestSnapshot", :description => "My Test Snapshot") - + snapshot.id # returns the id of the volume snapshot.name # => "TestVolume" snapshot.description # returns the description of the snapshot @@ -215,7 +215,7 @@ This section discusses the volume backup operations you can perform using the mo 3. Obtain the details of a volume backup by ID: volume = conn.volume_backups.get("") - + volume.name # returns the name of the volume backup volume.status # provides the status of the volume backup e.g., available volume.created_at # provides the date the backup was created @@ -291,19 +291,19 @@ This section discusses the volume operations you can perform using the request a 7. Create a new volume from an existing image: - conn.create_volume('display_name' => 'Test Volume 1', - 'display_description' => 'Test Volume from image', - 'size' => 10, + conn.create_volume('display_name' => 'Test Volume 1', + 'display_description' => 'Test Volume from image', + 'size' => 10, 'imageRef' => "") 8. Create a new volume from an existing snapshot: response = conn.create_volume( - 'display_name' => 'Test Volume 2', - 'display_description' => 'New Volume from Snapshot', + 'display_name' => 'Test Volume 2', + 'display_description' => 'New Volume from Snapshot', 'snapshot_id' => "") volume = response.body['volume'] - + volume['id'] # returns the id of the new volume volume['display_name'] # => "Test Volume 2" volume['size'] # => 1 @@ -314,16 +314,16 @@ This section discusses the volume operations you can perform using the request a 9. Create a new volume from an existing volume: conn.create_volume( - 'display_name' => 'Test Volume 3', - 'display_description' => 'Test volume from another image', + 'display_name' => 'Test Volume 3', + 'display_description' => 'Test volume from another image', 'source_volid' => "") 10. Create a new bootable volume from an suitable single-part image: conn.create_volume( - 'display_name' => "TestBootVol", - 'display_description' => "My Test Boot Volume", - 'size' => 10, + 'display_name' => "TestBootVol", + 'display_description' => "My Test Boot Volume", + 'size' => 10, 'imageRef' => "") **Note**: You can use a bootable volume to create a persistent server instance. @@ -352,7 +352,7 @@ This section discusses the volume operations you can perform using the request a 14. Update a volume: - conn.update_volume("", + conn.update_volume("", {'display_name' => 'Test Volume Update'}) 15. Delete an existing volume: @@ -392,7 +392,7 @@ This section discusses the snapshot operations you can perform using the request 5. Create a new snapshot: response = conn.create_snapshot("", - 'display_name' => 'Test Snapshot', + 'display_name' => 'Test Snapshot', 'display_description' => 'Test Snapshot from Vol Test') snapshot = response.body['snapshot'] snapshot['id'] # returns the id of the new volume @@ -443,4 +443,4 @@ This section discusses the volume backup operations you can perform using the re conn.delete_volume_backup("") --------- -[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) \ No newline at end of file +[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) diff --git a/lib/fog/hp/examples/cdn.md b/lib/fog/hp/examples/cdn.md index 0b02ba701..5cf492770 100755 --- a/lib/fog/hp/examples/cdn.md +++ b/lib/fog/hp/examples/cdn.md @@ -35,10 +35,10 @@ To update or modify the metadata for a CDN-enabled container, use the command Where _option_ can be any of the following: -* X-CDN-Enabled - cdn status for container -* X-CDN-URI - cdn url for this container -* 'X-TTL'<~String> - integer seconds before data expires, defaults to 86400 (1 day), in 900 (15 min.) to 1577836800 (50 years) -* X-Log-Retention +* X-CDN-Enabled - cdn status for container +* X-CDN-URI - cdn url for this container +* 'X-TTL'<~String> - integer seconds before data expires, defaults to 86400 (1 day), in 900 (15 min.) to 1577836800 (50 years) +* X-Log-Retention So for example, if you want to modify the X-TTL metadata information so that the value becomes 3600, the command would be: @@ -51,4 +51,4 @@ To CDN-disable container: conn.delete_container("fog-rocks") --------- -[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) \ No newline at end of file +[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) diff --git a/lib/fog/hp/examples/compute.md b/lib/fog/hp/examples/compute.md index 6cf6a8f71..24c770f6d 100755 --- a/lib/fog/hp/examples/compute.md +++ b/lib/fog/hp/examples/compute.md @@ -1,4 +1,4 @@ -# Examples for working with HP Cloud Compute Service v12.12 +# Examples for working with HP Cloud Compute Service v12.12 The HP Cloud Extensions to Ruby Fog libary provides Compute services support using two abstractions: a model layer and a request layer. Both layers are detailed below. The code samples on this page can be executed from within a Ruby console (IRB): @@ -33,7 +33,7 @@ This page discusses the following topics: ## Model Server Operations -1. List all available servers for an account: +1. List all available servers for an account: servers = conn.servers servers.size # returns no. of servers @@ -121,18 +121,18 @@ This page discusses the following topics: ) new_server.user_data = "This is some un-encoded user data" new_server.save - + The personalization options are: - + *config_drive* : Disk accessible to the server that contains a FAT filesystem. If `config_drive` parameter is set to `true` at the time of server creation, the configuration drive is created. - + *user_data_encoded* or *user_data* : Allows additional metadata to be inserted during server creation by supplying a Base64-encoded string in the `user_data_encoded` parameter, or by providing an unencoded string with the `user_data` attribute. Note that encoding the data on the client is faster and more efficient. - + *personality* : Allows files to be injected into the server instance after its creation. The file `contents` are Base64 encoded and injected into the location specified by `path`. - + **Note**: The above personalization options are not supported on Windows server instances. 7. Get console output: @@ -455,7 +455,7 @@ This page discusses the following topics: response = conn.create_server("My Windows Server", flavor_id, image_id) win_server = response.body['server'] server_id = win_server['id'] # returns the id of the new server - # Retrieve the encrypted password + # Retrieve the encrypted password conn.get_windows_password(server_id) # => "Im6ZJ8auyMRnkJ24KKWQvTgWDug1s ... y0uY1BcHLJ5OrkEPHhQoQntIKOoQ=\n" **Note**: You must retrieve the Windows password immediately after you create the Windows instance. Also, make sure you have a security rule defined to open RDP port 3389 so that you can connect to the Windows server. @@ -496,18 +496,18 @@ This page discusses the following topics: ) server = response.body['server'] server['id'] # returns the id of the new server - + The personalization options are: - + *config_drive* : Disk accessible to the server that contains a FAT filesystem. If `config_drive` parameter is set to `true` at the time of server creation, the configuration drive is created. - + *user_data_encoded* : Allows additional metadata to be inserted during server creation by supplying a Base64-encoded string in the `user_data_encoded` parameter. - + *personality* : Allows files to be injected into the server instance after its creation. The file `contents` are Base64 encoded and injected into the location specified by `path`. - + **Note**: The above personalization options are not supported on Windows server instances. 8. Update the name for a server: @@ -561,37 +561,37 @@ This page discusses the following topics: {'Meta1' => 'MetaValue1', 'Meta2' => 'MetaValue2'} } ) - response.body['server']['metadata'] + response.body['server']['metadata'] # => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"} 2. List the existing metadata: response = conn.list_metadata("servers", server_id) - response.body['metadata'] + response.body['metadata'] # => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"} 3. Set new values to the existing metadata: response = conn.set_metadata("servers", server_id, {"MetaNew1" => "MetaNewValue1"}) - response.body['metadata'] + response.body['metadata'] # => {"MetaNew1"=>"MetaNewValue1"} 4. Update the existing metadata: response = conn.update_metadata("servers", server_id, {"Meta2" => "MetaValue2"}) - response.body['metadata'] + response.body['metadata'] # => {"Meta2"=>"MetaValue2"} 5. Get a metadata item: response = conn.get_meta("servers", server_id, "Meta1") - response.body['meta'] + response.body['meta'] # => {"Meta1"=>"MetaValue1"} 6. Set a new metadata item or update an existing metadata item: response = conn.update_meta("servers", server_id, "Meta1", "MetaUpdated1") - response.body['meta'] + response.body['meta'] # => {"Meta1"=>"MetaUpdated1"} 7. Delete a metadata item: @@ -661,31 +661,31 @@ This page discusses the following topics: 2. List the existing metadata: response = conn.list_metadata("images", image_id) - response.body['metadata'] + response.body['metadata'] # => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"} 3. Set new values to the existing metadata: response = conn.set_metadata("images", image_id, {"MetaNew1" => "MetaNewValue1"}) - response.body['metadata'] + response.body['metadata'] # => {"MetaNew1"=>"MetaNewValue1"} 4. Update the existing metadata: response = conn.update_metadata("images", image_id, {"Meta2" => "MetaValue2"}) - response.body['metadata'] + response.body['metadata'] # => {"Meta2"=>"MetaValue2"} 5. Get a metadata item: response = conn.get_meta("images", image_id, "Meta1") - response.body['meta'] + response.body['meta'] # => {"Meta1"=>"MetaValue1"} 6. Update a metadata item: response = conn.update_meta("images", image_id, "Meta1", "MetaUpdated1") - response.body['meta'] + response.body['meta'] # => {"Meta1"=>"MetaUpdated1"} 7. Delete a metadata item: @@ -791,4 +791,4 @@ This page discusses the following topics: conn.release_address(address_id) # releases the ip address to the pool --------- -[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) \ No newline at end of file +[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) diff --git a/lib/fog/hp/examples/compute_v2.md b/lib/fog/hp/examples/compute_v2.md index 918e2059e..d752cb3bb 100755 --- a/lib/fog/hp/examples/compute_v2.md +++ b/lib/fog/hp/examples/compute_v2.md @@ -1,4 +1,4 @@ -# Examples for working with HP Cloud Compute Service v13.5 +# Examples for working with HP Cloud Compute Service v13.5 The latest HP Cloud deployment, version 13.5, takes advantage of more OpenStack functionality and the compute service uses slightly different commands (often noted by *v2* in the commands) than the previous 12.12 version. Verify which version of HP cloud you are working with. @@ -62,14 +62,14 @@ You can find the values the access key, secret key, and other values by clicking ## Model Server Operations -1. List all available servers for an account: +1. List all available servers for an account: servers = conn.servers servers.size # returns no. of servers # display servers in a tabular format conn.servers.table([:id, :name, :state, :created_at]) -2. List servers using a filter: +2. List servers using a filter: servers = conn.servers.all(:name => 'My Shiny Server') @@ -123,9 +123,9 @@ You can find the values the access key, secret key, and other values by clicking new_server = conn.servers.create( :name=> "My Sticky Server", :flavor_id => 104, - :block_device_mapping => [{ 'volume_size' => '', - 'volume_id' => "", - 'delete_on_termination' => '0', + :block_device_mapping => [{ 'volume_size' => '', + 'volume_id' => "", + 'delete_on_termination' => '0', 'device_name' => 'vda' }] ) @@ -158,20 +158,20 @@ You can find the values the access key, secret key, and other values by clicking ) new_server.user_data = "This is some un-encoded user data" new_server.save - + The personalization options are: - + *config_drive* : Disk accessible to the server that contains a FAT filesystem. If `config_drive` parameter is set to `true` at the time of server creation, the configuration drive is created. - + *user_data_encoded* or *user_data* : Allows additional metadata to be inserted during server creation by supplying a Base64-encoded string in the `user_data_encoded` parameter, or by providing an unencoded string with the `user_data` attribute. Note that encoding the data on the client is faster and more efficient. - + *personality* : Allows files to be injected into the server instance after its creation. The file `contents` are Base64 encoded and injected into the location specified by `path`. - + **Note**: The above personalization options are not supported on Windows server instances. - + 9. Create a new Windows server instance and retrieve the encrypted password: @@ -192,7 +192,7 @@ You can find the values the access key, secret key, and other values by clicking server = conn.servers.get("") server.console_output(10) # returns 10 lines of console output - + 11. Get VNC console: server = conn.servers.get("") @@ -237,7 +237,7 @@ You can find the values the access key, secret key, and other values by clicking server = conn.servers.get("") server.volume_attachements.get("") - + 3. List attached volumes for a server: server = conn.servers.get("") @@ -403,7 +403,7 @@ You can find the values the access key, secret key, and other values by clicking keypair.public_key # returns the public key of the keypair keypair.private_key # returns the private key of the keypair **Note**: Keypairs with a dot (.) are not allowed. - + 4. Export a keypair to a file: keypair = conn.key_pairs.create(:name => "mykey2") @@ -475,7 +475,7 @@ You can find the values the access key, secret key, and other values by clicking 2. List all available servers using a filter: response = conn.list_servers_detail(:name => 'My Shiny Server') - + 3. List all available servers with additional details: response = conn.list_servers_detail @@ -538,14 +538,14 @@ You can find the values the access key, secret key, and other values by clicking } ) - + 8. Create a new Windows server and retrieve the encrypted password: # Make sure to use a Windows image response = conn.create_server("My Windows Server", "", "") win_server = response.body['server'] server_id = win_server['id'] # returns the id of the new server - # Retrieve the encrypted password + # Retrieve the encrypted password conn.get_windows_password("") # => "Im6ZJ8auyMRnkJ24KKWQvTgWDug1s ... y0uY1BcHLJ5OrkEPHhQoQntIKOoQ=\n" **Note**: You must retrieve the Windows password immediately after you create the Windows instance. Also, make sure you have a security rule defined to open RDP port 3389 so that you can connect to the Windows server. @@ -586,18 +586,18 @@ You can find the values the access key, secret key, and other values by clicking ) server = response.body['server'] server['id'] # returns the id of the new server - + The personalization options are: - + *config_drive* : Disk accessible to the server that contains a FAT filesystem. If `config_drive` parameter is set to `true` at the time of server creation, the configuration drive is created. - + *user_data_encoded* : Allows additional metadata to be inserted during server creation by supplying a Base64-encoded string in the `user_data_encoded` parameter. - + *personality* : Allows files to be injected into the server instance after its creation. The file `contents` are Base64 encoded and injected into the location specified by `path`. - + **Note**: The above personalization options are not supported on Windows server instances. 11. Update the name for a server: @@ -646,37 +646,37 @@ You can find the values the access key, secret key, and other values by clicking {'Meta1' => 'MetaValue1', 'Meta2' => 'MetaValue2'} } ) - response.body['server']['metadata'] + response.body['server']['metadata'] # => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"} 2. List the existing metadata: response = conn.list_metadata("servers", "") - response.body['metadata'] + response.body['metadata'] # => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"} 3. Set new values to the existing metadata: response = conn.set_metadata("servers", "", {"MetaNew1" => "MetaNewValue1"}) - response.body['metadata'] + response.body['metadata'] # => {"MetaNew1"=>"MetaNewValue1"} 4. Update the existing metadata: response = conn.update_metadata("servers", "", {"Meta2" => "MetaValue2"}) - response.body['metadata'] + response.body['metadata'] # => {"Meta2"=>"MetaValue2"} 5. Get a metadata item: response = conn.get_meta("servers", "", "Meta1") - response.body['meta'] + response.body['meta'] # => {"Meta1"=>"MetaValue1"} 6. Set a new metadata item or update an existing metadata item: response = conn.update_meta("servers", "", "Meta1", "MetaUpdated1") - response.body['meta'] + response.body['meta'] # => {"Meta1"=>"MetaUpdated1"} 7. Delete a metadata item: @@ -746,31 +746,31 @@ You can find the values the access key, secret key, and other values by clicking 2. List the existing metadata: response = conn.list_metadata("images", "") - response.body['metadata'] + response.body['metadata'] # => {"Meta1"=>"MetaValue1", "Meta2"=>"MetaValue2"} 3. Set new values to the existing metadata: response = conn.set_metadata("images", "", {"MetaNew1" => "MetaNewValue1"}) - response.body['metadata'] + response.body['metadata'] # => {"MetaNew1"=>"MetaNewValue1"} 4. Update the existing metadata: response = conn.update_metadata("images", "", {"Meta2" => "MetaValue2"}) - response.body['metadata'] + response.body['metadata'] # => {"Meta2"=>"MetaValue2"} 5. Get a metadata item: response = conn.get_meta("images", "", "Meta1") - response.body['meta'] + response.body['meta'] # => {"Meta1"=>"MetaValue1"} 6. Update a metadata item: response = conn.update_meta("images", "", "Meta1", "MetaUpdated1") - response.body['meta'] + response.body['meta'] # => {"Meta1"=>"MetaUpdated1"} 7. Delete a metadata item: @@ -845,4 +845,4 @@ You can find the values the access key, secret key, and other values by clicking conn.release_address("") # releases the ip address to the pool --------- -[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) \ No newline at end of file +[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) diff --git a/lib/fog/hp/examples/networking.md b/lib/fog/hp/examples/networking.md index c7aeb67e7..9696d9059 100755 --- a/lib/fog/hp/examples/networking.md +++ b/lib/fog/hp/examples/networking.md @@ -1,5 +1,5 @@ #Examples for working with HP Cloud Networking Service -The HP Cloud provides networking support using two abstractions: a model layer and a request layer. Both layers are detailed below. +The HP Cloud provides networking support using two abstractions: a model layer and a request layer. Both layers are detailed below. **Note:** The networking functionality works with HP Cloud version 13.5 but is not available in version 12.12. @@ -171,10 +171,10 @@ You can find the values the access key, secret key, and other values by clicking # Removing the interface also deletes the auto-created port 7. Add a router interface using a port: - + # Add a router interface using the port you created network = router.add_interface(nil, "") - + # Port is updated with device_id and device_owner conn.ports.get("") @@ -206,7 +206,7 @@ You can find the values the access key, secret key, and other values by clicking conn.security_groups.create( :name => 'MySecurityGroup', :description => 'my security group description' - ) + ) **Note:** Two security group rules are created by default for every new security group that is created: one 'ingress' and one 'egress' rule. 5. Delete a security group: @@ -377,7 +377,7 @@ You can find the values the access key, secret key, and other values by clicking 7. Remove a router interface using a subnet: - conn.remove_router_interface("", "") + conn.remove_router_interface("", "") # Removes a port with no name using the subnet_id 8. Add a router interface using a port: @@ -388,12 +388,12 @@ You can find the values the access key, secret key, and other values by clicking 9. Remove a router interface using a port: - conn.remove_router_interface("router_id", nil, "port_id") + conn.remove_router_interface("router_id", nil, "port_id") 10. Delete a router: conn.delete_router("") - + ## Request Security Group Operations 1. List security groups: @@ -469,4 +469,4 @@ You can find the values the access key, secret key, and other values by clicking conn.delete_floating_IP("") --------- -[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) \ No newline at end of file +[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) diff --git a/lib/fog/hp/examples/object_storage.md b/lib/fog/hp/examples/object_storage.md index fb30c6f39..6394cac9b 100755 --- a/lib/fog/hp/examples/object_storage.md +++ b/lib/fog/hp/examples/object_storage.md @@ -1,6 +1,6 @@ # Examples for working with HP Cloud Object Storage Service -The HP Cloud Extensions to Ruby Fog libary provides Object Storage services support using two abstractions: a model layer and a request layer. Executing commands in both layers are detailed in this page. +The HP Cloud Extensions to Ruby Fog libary provides Object Storage services support using two abstractions: a model layer and a request layer. Executing commands in both layers are detailed in this page. The examples on this page can be executed from within a Ruby console (IRB): @@ -101,7 +101,7 @@ To grant access to an object or a container: mydir.save # share the url for access to container mydir.public_url # => "https://objects.xxxx.hpcloud.net:443/v1/1111111/rgtest2" - + myfile = mydir.files.get("sample.txt") # share the url for access to object myfile.public_url # => "https://objects.xxxx.hpcloud.net:443/v1/1111111/rgtest2/sample.txt" @@ -114,41 +114,41 @@ To grant access to an object or a container: sd.url # => "https://objects.xxxx.hpcloud.net:443/v1/1111111/rgtest2" sd.files - + **Note**: If the grantee does not have access, the system generates an exception of type `Fog::HP::Errors::Forbidden`. - + 2. Use the shared URLs to get the metadata for a container: sd = conn.shared_directories.head(mydir.public_url) - + **Note**: If the grantee does not have access, the system generates an exception of type `Fog::HP::Errors::Forbidden`. 3. Use the shared URLs to get the contents of a shared object: sd = conn.shared_directories.get(mydir.public_url) sf = sd.files.get('sample.txt') - + 4. Use the shared URLs to get the metadata for a shared object: sd = conn.shared_directories.get(mydir.public_url) sf = sd.files.head('sample.txt') - + 5. Use the shared URLs to put a new object or file into a shared container: sd = conn.shared_directories.get(mydir.public_url) sf = sd.files.create(:key => 'tiny2.txt', :body => "This is another text file.") - + **Note**: If the grantee does not have access, the system generates an exception of type `Fog::HP::Errors::Forbidden`. - + 6. Use the shared URLs to update an existing object or file in a shared container: sd = conn.shared_directories.get(mydir.public_url) sf = sd.files.new(:key => 'sample.txt') sf.body = "This is another text file." sf.save - + **Note**: If the grantee does not have access, the system generates an exception of type `Fog::HP::Errors::Forbidden`. - + 7. Use the shared URLs to delete an existing object or file from a shared container: sd = conn.shared_directories.get(mydir.public_url) @@ -194,7 +194,7 @@ Synchronizing containers creates a one-way association from containers to the sy # sync the source -> target dir_a.sync(target_dir_b, "boogieman") # => true dir_a.save # => true - + # sync the target -> source target_dir_b.sync(dir_a, "boogieman") # => true target_dir_b.save #=> true @@ -285,7 +285,7 @@ Synchronizing containers creates a one-way association from containers to the sy # creates a TempUrl to access sample.txt and access expires in 240 secs conn.get_object_temp_url("fog-rocks", "sample.txt", 240, "GET") - + 11. Delete a file from an existing container: conn.delete_object("fog-rocks", "sample.txt") @@ -295,12 +295,12 @@ Synchronizing containers creates a one-way association from containers to the sy # Note: a container needs to be empty before it can be deleted! conn.delete_container("fog-rocks") - + ### Using Object ACLs To use object ACLs in the request abstraction layer, you need to have already been granted permission to access the objects or containers. (See the section on [Using Object ACLs](#UsingObjectACLsModelLayer) in the Model Layer section above for information on granting access.) -1. Use the shared URLs to get the contents of a shared container: +1. Use the shared URLs to get the contents of a shared container: conn.get_shared_container(mydir.public_url) @@ -311,27 +311,27 @@ To use object ACLs in the request abstraction layer, you need to have already be conn.head_shared_container(mydir.public_url) **Note**: If the grantee does not have access, the system generates an exception of type `Fog::HP::Errors::Forbidden`. - + 3. Use the shared URLs to get the contents of a shared object: conn.get_shared_object(myfile.public_url) - + 4. Use the shared URLs to get the metadata for a shared object conn.head_shared_object(myfile.public_url) - + 5. Use the shared URLs to put a new object or file into a shared container: conn.put_shared_object(mydir.public_url, 'tiny.txt', File.read('tiny.txt')) - + **Note**: If the grantee does not have access, the system generates an exception of type `Fog::HP::Errors::Forbidden`. - + 6. Use the shared URLs to update an existing object or file in a shared container: conn.put_shared_object(mydir.public_url, 'sample.txt', "This text needed some update.") - + **Note**: If the grantee does not have access, the system generates an exception of type `Fog::HP::Errors::Forbidden`. - + 7. Use the shared URLs to delete an existing object or file from a shared container: conn.delete_shared_object(myfile.public_url) @@ -345,7 +345,7 @@ Synchronizing containers creates a one-way association from containers to the sy # create source and target containers conn.put_container('imp_stuff') conn.put_container('sync_archive') - + # create some objects in the source container conn.put_object('imp_stuff', 'imp_1.txt', "This is a small file but it is very important.") conn.put_object('imp_stuff', 'imp_2.txt', File.open('/path/to/file/imp_2.txt')) @@ -384,4 +384,4 @@ Synchronizing containers creates a one-way association from containers to the sy 'X-Container-Sync-Key' => 'boogieman'}) --------- -[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) \ No newline at end of file +[Documentation Home](https://github.com/fog/fog/blob/master/lib/fog/hp/README.md) | [Examples](https://github.com/fog/fog/blob/master/lib/fog/hp/examples/getting_started_examples.md) diff --git a/lib/fog/hp/models/storage/directory.rb b/lib/fog/hp/models/storage/directory.rb index 17024b263..a03f57c61 100644 --- a/lib/fog/hp/models/storage/directory.rb +++ b/lib/fog/hp/models/storage/directory.rb @@ -251,7 +251,7 @@ module Fog def save(new_options = {}) requires :key options = {} - #these are default/previous options + #these are default/previous options meta_hash = {} metadata.each { |meta| meta_hash.store(meta.key, meta.value) } if meta_hash @@ -267,7 +267,7 @@ module Fog options.merge!({'X-Container-Meta-Web-Error' => self.web_error}) unless self.web_error.nil? # get the metadata and merge them in - # merge user options at the end + # merge user options at the end options.merge!(new_options) service.put_container(key, options) diff --git a/lib/fog/hp/models/storage/file.rb b/lib/fog/hp/models/storage/file.rb index af1d2bfba..7c234bf86 100644 --- a/lib/fog/hp/models/storage/file.rb +++ b/lib/fog/hp/models/storage/file.rb @@ -61,9 +61,9 @@ module Fog end # Get a url for file. - # + # # required attributes: key - # + # # @param expires [String] number of seconds (since 1970-01-01 00:00) before url expires # @param options [Hash] # @return [String] url diff --git a/lib/fog/hp/models/storage/files.rb b/lib/fog/hp/models/storage/files.rb index 8ff76b08f..e628bb24b 100644 --- a/lib/fog/hp/models/storage/files.rb +++ b/lib/fog/hp/models/storage/files.rb @@ -71,9 +71,9 @@ module Fog "#{self.directory.public_url}/#{Fog::HP.escape(key)}" end end - + # Get a temporary http url for a file. - # + # # required attributes: key # @param key [String] the key of the file within the directory # @param expires [String] number of seconds (since 1970-01-01 00:00) before url expires @@ -82,9 +82,9 @@ module Fog def get_http_url(key, expires, options = {}) service.get_object_http_url(directory.key, key, expires, options) end - + # Get a temporary https url for a file. - # + # # required attributes: key # @param key [String] the key of the file within the directory # @param expires [String] number of seconds (since 1970-01-01 00:00) before url expires @@ -93,7 +93,7 @@ module Fog def get_https_url(key, expires, options = {}) service.get_object_https_url(directory.key, key, expires, options) end - + def get_cdn_url(key) requires :directory if self.directory.cdn_public_url diff --git a/lib/fog/hp/requests/block_storage/create_snapshot.rb b/lib/fog/hp/requests/block_storage/create_snapshot.rb index 0049a315c..eb117f77b 100644 --- a/lib/fog/hp/requests/block_storage/create_snapshot.rb +++ b/lib/fog/hp/requests/block_storage/create_snapshot.rb @@ -73,4 +73,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/create_volume.rb b/lib/fog/hp/requests/block_storage/create_volume.rb index e16705739..9ee592e34 100644 --- a/lib/fog/hp/requests/block_storage/create_volume.rb +++ b/lib/fog/hp/requests/block_storage/create_volume.rb @@ -84,4 +84,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/delete_snapshot.rb b/lib/fog/hp/requests/block_storage/delete_snapshot.rb index 3ff2c3b84..6b18f3a47 100644 --- a/lib/fog/hp/requests/block_storage/delete_snapshot.rb +++ b/lib/fog/hp/requests/block_storage/delete_snapshot.rb @@ -35,4 +35,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/delete_volume.rb b/lib/fog/hp/requests/block_storage/delete_volume.rb index cfc6d1476..00ff20287 100644 --- a/lib/fog/hp/requests/block_storage/delete_volume.rb +++ b/lib/fog/hp/requests/block_storage/delete_volume.rb @@ -35,4 +35,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/get_bootable_volume_details.rb b/lib/fog/hp/requests/block_storage/get_bootable_volume_details.rb index 42271c0f9..f77af01f7 100644 --- a/lib/fog/hp/requests/block_storage/get_bootable_volume_details.rb +++ b/lib/fog/hp/requests/block_storage/get_bootable_volume_details.rb @@ -56,4 +56,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/get_snapshot_details.rb b/lib/fog/hp/requests/block_storage/get_snapshot_details.rb index 3bd236792..beecefd1d 100644 --- a/lib/fog/hp/requests/block_storage/get_snapshot_details.rb +++ b/lib/fog/hp/requests/block_storage/get_snapshot_details.rb @@ -51,4 +51,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/get_volume_details.rb b/lib/fog/hp/requests/block_storage/get_volume_details.rb index 9049642e1..0eff5b6f9 100644 --- a/lib/fog/hp/requests/block_storage/get_volume_details.rb +++ b/lib/fog/hp/requests/block_storage/get_volume_details.rb @@ -55,4 +55,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/list_bootable_volumes.rb b/lib/fog/hp/requests/block_storage/list_bootable_volumes.rb index 699209880..8621aedb8 100644 --- a/lib/fog/hp/requests/block_storage/list_bootable_volumes.rb +++ b/lib/fog/hp/requests/block_storage/list_bootable_volumes.rb @@ -50,4 +50,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/list_snapshots.rb b/lib/fog/hp/requests/block_storage/list_snapshots.rb index 743d9cc83..b90a38e28 100644 --- a/lib/fog/hp/requests/block_storage/list_snapshots.rb +++ b/lib/fog/hp/requests/block_storage/list_snapshots.rb @@ -45,4 +45,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage/list_volumes.rb b/lib/fog/hp/requests/block_storage/list_volumes.rb index 3ce4ecd40..0f84c31b5 100644 --- a/lib/fog/hp/requests/block_storage/list_volumes.rb +++ b/lib/fog/hp/requests/block_storage/list_volumes.rb @@ -49,4 +49,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/create_snapshot.rb b/lib/fog/hp/requests/block_storage_v2/create_snapshot.rb index 56e2fdb3c..70e4ab0bb 100644 --- a/lib/fog/hp/requests/block_storage_v2/create_snapshot.rb +++ b/lib/fog/hp/requests/block_storage_v2/create_snapshot.rb @@ -73,4 +73,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/create_volume.rb b/lib/fog/hp/requests/block_storage_v2/create_volume.rb index cb8fabec2..e996dfcdd 100644 --- a/lib/fog/hp/requests/block_storage_v2/create_volume.rb +++ b/lib/fog/hp/requests/block_storage_v2/create_volume.rb @@ -87,4 +87,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/create_volume_backup.rb b/lib/fog/hp/requests/block_storage_v2/create_volume_backup.rb index 663f4f04b..4889bc4d9 100644 --- a/lib/fog/hp/requests/block_storage_v2/create_volume_backup.rb +++ b/lib/fog/hp/requests/block_storage_v2/create_volume_backup.rb @@ -80,4 +80,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/delete_snapshot.rb b/lib/fog/hp/requests/block_storage_v2/delete_snapshot.rb index de4406bbf..15cfd8b55 100644 --- a/lib/fog/hp/requests/block_storage_v2/delete_snapshot.rb +++ b/lib/fog/hp/requests/block_storage_v2/delete_snapshot.rb @@ -35,4 +35,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/delete_volume.rb b/lib/fog/hp/requests/block_storage_v2/delete_volume.rb index 7a2bd20da..b87ae8b20 100644 --- a/lib/fog/hp/requests/block_storage_v2/delete_volume.rb +++ b/lib/fog/hp/requests/block_storage_v2/delete_volume.rb @@ -35,4 +35,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/delete_volume_backup.rb b/lib/fog/hp/requests/block_storage_v2/delete_volume_backup.rb index 9c4aad76b..a57196028 100644 --- a/lib/fog/hp/requests/block_storage_v2/delete_volume_backup.rb +++ b/lib/fog/hp/requests/block_storage_v2/delete_volume_backup.rb @@ -35,4 +35,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/get_snapshot_details.rb b/lib/fog/hp/requests/block_storage_v2/get_snapshot_details.rb index a30255a1b..8ba252537 100644 --- a/lib/fog/hp/requests/block_storage_v2/get_snapshot_details.rb +++ b/lib/fog/hp/requests/block_storage_v2/get_snapshot_details.rb @@ -51,4 +51,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/get_volume_backup_details.rb b/lib/fog/hp/requests/block_storage_v2/get_volume_backup_details.rb index 7c7cdac28..279312ed4 100644 --- a/lib/fog/hp/requests/block_storage_v2/get_volume_backup_details.rb +++ b/lib/fog/hp/requests/block_storage_v2/get_volume_backup_details.rb @@ -52,4 +52,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/get_volume_details.rb b/lib/fog/hp/requests/block_storage_v2/get_volume_details.rb index c5f354e4a..468315618 100644 --- a/lib/fog/hp/requests/block_storage_v2/get_volume_details.rb +++ b/lib/fog/hp/requests/block_storage_v2/get_volume_details.rb @@ -55,4 +55,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/list_snapshots.rb b/lib/fog/hp/requests/block_storage_v2/list_snapshots.rb index e7f01a5ed..81ac53ba1 100644 --- a/lib/fog/hp/requests/block_storage_v2/list_snapshots.rb +++ b/lib/fog/hp/requests/block_storage_v2/list_snapshots.rb @@ -54,4 +54,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/list_snapshots_detail.rb b/lib/fog/hp/requests/block_storage_v2/list_snapshots_detail.rb index e31e47a91..8db74da96 100644 --- a/lib/fog/hp/requests/block_storage_v2/list_snapshots_detail.rb +++ b/lib/fog/hp/requests/block_storage_v2/list_snapshots_detail.rb @@ -51,4 +51,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb b/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb index d79f526ea..89054dde7 100644 --- a/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb +++ b/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb @@ -49,4 +49,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/list_volume_backups_detail.rb b/lib/fog/hp/requests/block_storage_v2/list_volume_backups_detail.rb index cf0095206..8ad031ce9 100644 --- a/lib/fog/hp/requests/block_storage_v2/list_volume_backups_detail.rb +++ b/lib/fog/hp/requests/block_storage_v2/list_volume_backups_detail.rb @@ -55,4 +55,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/list_volumes.rb b/lib/fog/hp/requests/block_storage_v2/list_volumes.rb index 65b295447..654dd518d 100644 --- a/lib/fog/hp/requests/block_storage_v2/list_volumes.rb +++ b/lib/fog/hp/requests/block_storage_v2/list_volumes.rb @@ -58,4 +58,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/list_volumes_detail.rb b/lib/fog/hp/requests/block_storage_v2/list_volumes_detail.rb index 4140233ff..cac7733c3 100644 --- a/lib/fog/hp/requests/block_storage_v2/list_volumes_detail.rb +++ b/lib/fog/hp/requests/block_storage_v2/list_volumes_detail.rb @@ -56,4 +56,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/restore_volume_backup.rb b/lib/fog/hp/requests/block_storage_v2/restore_volume_backup.rb index a05a98a97..e741e1f6e 100644 --- a/lib/fog/hp/requests/block_storage_v2/restore_volume_backup.rb +++ b/lib/fog/hp/requests/block_storage_v2/restore_volume_backup.rb @@ -94,4 +94,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/update_snapshot.rb b/lib/fog/hp/requests/block_storage_v2/update_snapshot.rb index 439c51682..8394e4071 100644 --- a/lib/fog/hp/requests/block_storage_v2/update_snapshot.rb +++ b/lib/fog/hp/requests/block_storage_v2/update_snapshot.rb @@ -66,4 +66,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/block_storage_v2/update_volume.rb b/lib/fog/hp/requests/block_storage_v2/update_volume.rb index bcb63db59..432ba8b44 100644 --- a/lib/fog/hp/requests/block_storage_v2/update_volume.rb +++ b/lib/fog/hp/requests/block_storage_v2/update_volume.rb @@ -67,4 +67,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/cdn/delete_container.rb b/lib/fog/hp/requests/cdn/delete_container.rb index 79570856f..3ff4be9fc 100644 --- a/lib/fog/hp/requests/cdn/delete_container.rb +++ b/lib/fog/hp/requests/cdn/delete_container.rb @@ -35,4 +35,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/compute/get_windows_password.rb b/lib/fog/hp/requests/compute/get_windows_password.rb index 564b4efb7..58aebbf15 100644 --- a/lib/fog/hp/requests/compute/get_windows_password.rb +++ b/lib/fog/hp/requests/compute/get_windows_password.rb @@ -40,4 +40,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/compute_v2/get_windows_password.rb b/lib/fog/hp/requests/compute_v2/get_windows_password.rb index 2e2c4b33c..956eb9d88 100644 --- a/lib/fog/hp/requests/compute_v2/get_windows_password.rb +++ b/lib/fog/hp/requests/compute_v2/get_windows_password.rb @@ -40,4 +40,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/dns/delete_domain.rb b/lib/fog/hp/requests/dns/delete_domain.rb index a52c17455..81acd27a8 100644 --- a/lib/fog/hp/requests/dns/delete_domain.rb +++ b/lib/fog/hp/requests/dns/delete_domain.rb @@ -34,4 +34,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/dns/delete_record.rb b/lib/fog/hp/requests/dns/delete_record.rb index a494ad1ae..ff868affa 100644 --- a/lib/fog/hp/requests/dns/delete_record.rb +++ b/lib/fog/hp/requests/dns/delete_record.rb @@ -33,4 +33,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/dns/update_domain.rb b/lib/fog/hp/requests/dns/update_domain.rb index 00e52cf96..0873522d3 100644 --- a/lib/fog/hp/requests/dns/update_domain.rb +++ b/lib/fog/hp/requests/dns/update_domain.rb @@ -59,4 +59,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/dns/update_record.rb b/lib/fog/hp/requests/dns/update_record.rb index fd37a3390..9b60886a4 100644 --- a/lib/fog/hp/requests/dns/update_record.rb +++ b/lib/fog/hp/requests/dns/update_record.rb @@ -67,4 +67,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/lb/delete_load_balancer.rb b/lib/fog/hp/requests/lb/delete_load_balancer.rb index 2bbc0965e..1b62f538a 100644 --- a/lib/fog/hp/requests/lb/delete_load_balancer.rb +++ b/lib/fog/hp/requests/lb/delete_load_balancer.rb @@ -33,4 +33,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/lb/get_load_balancer.rb b/lib/fog/hp/requests/lb/get_load_balancer.rb index 5137a0cb5..508615bb3 100644 --- a/lib/fog/hp/requests/lb/get_load_balancer.rb +++ b/lib/fog/hp/requests/lb/get_load_balancer.rb @@ -57,4 +57,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/lb/get_load_balancer_node.rb b/lib/fog/hp/requests/lb/get_load_balancer_node.rb index d207a31b3..7ed11bb7e 100644 --- a/lib/fog/hp/requests/lb/get_load_balancer_node.rb +++ b/lib/fog/hp/requests/lb/get_load_balancer_node.rb @@ -51,4 +51,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/lb/list_algorithms.rb b/lib/fog/hp/requests/lb/list_algorithms.rb index 73fa34aa2..8842b5fb0 100644 --- a/lib/fog/hp/requests/lb/list_algorithms.rb +++ b/lib/fog/hp/requests/lb/list_algorithms.rb @@ -29,4 +29,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/lb/list_limits.rb b/lib/fog/hp/requests/lb/list_limits.rb index 669f3b7c6..ea3476b90 100644 --- a/lib/fog/hp/requests/lb/list_limits.rb +++ b/lib/fog/hp/requests/lb/list_limits.rb @@ -37,4 +37,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/lb/list_load_balancer_virtual_ips.rb b/lib/fog/hp/requests/lb/list_load_balancer_virtual_ips.rb index 75bdb320a..9d2f18d92 100644 --- a/lib/fog/hp/requests/lb/list_load_balancer_virtual_ips.rb +++ b/lib/fog/hp/requests/lb/list_load_balancer_virtual_ips.rb @@ -41,4 +41,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/lb/list_load_balancers.rb b/lib/fog/hp/requests/lb/list_load_balancers.rb index c891c7c39..534dd64c2 100644 --- a/lib/fog/hp/requests/lb/list_load_balancers.rb +++ b/lib/fog/hp/requests/lb/list_load_balancers.rb @@ -38,4 +38,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/lb/list_protocols.rb b/lib/fog/hp/requests/lb/list_protocols.rb index b304b3647..e08307913 100644 --- a/lib/fog/hp/requests/lb/list_protocols.rb +++ b/lib/fog/hp/requests/lb/list_protocols.rb @@ -31,4 +31,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/add_router_interface.rb b/lib/fog/hp/requests/network/add_router_interface.rb index 04ec1abc7..99c0b864a 100644 --- a/lib/fog/hp/requests/network/add_router_interface.rb +++ b/lib/fog/hp/requests/network/add_router_interface.rb @@ -72,4 +72,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/create_network.rb b/lib/fog/hp/requests/network/create_network.rb index 07c7efa3b..c864adc27 100644 --- a/lib/fog/hp/requests/network/create_network.rb +++ b/lib/fog/hp/requests/network/create_network.rb @@ -65,4 +65,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/create_port.rb b/lib/fog/hp/requests/network/create_port.rb index f8449567d..1a3f08d6b 100644 --- a/lib/fog/hp/requests/network/create_port.rb +++ b/lib/fog/hp/requests/network/create_port.rb @@ -89,4 +89,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/create_router.rb b/lib/fog/hp/requests/network/create_router.rb index 49162756c..c4bb9963d 100644 --- a/lib/fog/hp/requests/network/create_router.rb +++ b/lib/fog/hp/requests/network/create_router.rb @@ -61,4 +61,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/create_subnet.rb b/lib/fog/hp/requests/network/create_subnet.rb index 70015a19b..76f808943 100644 --- a/lib/fog/hp/requests/network/create_subnet.rb +++ b/lib/fog/hp/requests/network/create_subnet.rb @@ -94,4 +94,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/delete_network.rb b/lib/fog/hp/requests/network/delete_network.rb index c88bbeb57..1ba2ee2db 100644 --- a/lib/fog/hp/requests/network/delete_network.rb +++ b/lib/fog/hp/requests/network/delete_network.rb @@ -31,4 +31,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/delete_port.rb b/lib/fog/hp/requests/network/delete_port.rb index d87c677d7..57bb69a98 100644 --- a/lib/fog/hp/requests/network/delete_port.rb +++ b/lib/fog/hp/requests/network/delete_port.rb @@ -31,4 +31,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/delete_router.rb b/lib/fog/hp/requests/network/delete_router.rb index db50318a5..96ce974a9 100644 --- a/lib/fog/hp/requests/network/delete_router.rb +++ b/lib/fog/hp/requests/network/delete_router.rb @@ -31,4 +31,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/delete_subnet.rb b/lib/fog/hp/requests/network/delete_subnet.rb index eea034216..08a9eeee5 100644 --- a/lib/fog/hp/requests/network/delete_subnet.rb +++ b/lib/fog/hp/requests/network/delete_subnet.rb @@ -31,4 +31,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/get_network.rb b/lib/fog/hp/requests/network/get_network.rb index 7aa65bdb3..a310f3c28 100644 --- a/lib/fog/hp/requests/network/get_network.rb +++ b/lib/fog/hp/requests/network/get_network.rb @@ -46,4 +46,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/get_port.rb b/lib/fog/hp/requests/network/get_port.rb index cbe1d40a3..73f6153b4 100644 --- a/lib/fog/hp/requests/network/get_port.rb +++ b/lib/fog/hp/requests/network/get_port.rb @@ -50,4 +50,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/get_router.rb b/lib/fog/hp/requests/network/get_router.rb index e7c310b89..b19c55777 100644 --- a/lib/fog/hp/requests/network/get_router.rb +++ b/lib/fog/hp/requests/network/get_router.rb @@ -43,4 +43,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/get_subnet.rb b/lib/fog/hp/requests/network/get_subnet.rb index 690f9f09c..2871a7d26 100644 --- a/lib/fog/hp/requests/network/get_subnet.rb +++ b/lib/fog/hp/requests/network/get_subnet.rb @@ -49,4 +49,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/list_networks.rb b/lib/fog/hp/requests/network/list_networks.rb index ac74859a8..4f2eb6ad5 100644 --- a/lib/fog/hp/requests/network/list_networks.rb +++ b/lib/fog/hp/requests/network/list_networks.rb @@ -45,4 +45,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/list_ports.rb b/lib/fog/hp/requests/network/list_ports.rb index 30c9380df..5b878ee94 100644 --- a/lib/fog/hp/requests/network/list_ports.rb +++ b/lib/fog/hp/requests/network/list_ports.rb @@ -49,4 +49,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/list_routers.rb b/lib/fog/hp/requests/network/list_routers.rb index 62d95f58b..c58fd5175 100644 --- a/lib/fog/hp/requests/network/list_routers.rb +++ b/lib/fog/hp/requests/network/list_routers.rb @@ -42,4 +42,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/list_subnets.rb b/lib/fog/hp/requests/network/list_subnets.rb index efa31ca0f..0aca735e4 100644 --- a/lib/fog/hp/requests/network/list_subnets.rb +++ b/lib/fog/hp/requests/network/list_subnets.rb @@ -48,4 +48,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/remove_router_interface.rb b/lib/fog/hp/requests/network/remove_router_interface.rb index 86d7d2491..69e283660 100644 --- a/lib/fog/hp/requests/network/remove_router_interface.rb +++ b/lib/fog/hp/requests/network/remove_router_interface.rb @@ -64,4 +64,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/update_port.rb b/lib/fog/hp/requests/network/update_port.rb index dba24c65b..0062c76ce 100644 --- a/lib/fog/hp/requests/network/update_port.rb +++ b/lib/fog/hp/requests/network/update_port.rb @@ -72,4 +72,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/update_router.rb b/lib/fog/hp/requests/network/update_router.rb index 221798a75..e9c748bf6 100644 --- a/lib/fog/hp/requests/network/update_router.rb +++ b/lib/fog/hp/requests/network/update_router.rb @@ -59,4 +59,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/network/update_subnet.rb b/lib/fog/hp/requests/network/update_subnet.rb index e4385e65f..16b359a92 100644 --- a/lib/fog/hp/requests/network/update_subnet.rb +++ b/lib/fog/hp/requests/network/update_subnet.rb @@ -69,4 +69,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/requests/storage/get_object_temp_url.rb b/lib/fog/hp/requests/storage/get_object_temp_url.rb index 019f6c298..9781f10a7 100644 --- a/lib/fog/hp/requests/storage/get_object_temp_url.rb +++ b/lib/fog/hp/requests/storage/get_object_temp_url.rb @@ -28,4 +28,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/simple_http_instrumentor.rb b/lib/fog/hp/simple_http_instrumentor.rb index f4fe29a77..f536b7316 100644 --- a/lib/fog/hp/simple_http_instrumentor.rb +++ b/lib/fog/hp/simple_http_instrumentor.rb @@ -56,4 +56,4 @@ module Excon end end -end \ No newline at end of file +end diff --git a/lib/fog/hp/storage.rb b/lib/fog/hp/storage.rb index eec582726..bcc0d94df 100644 --- a/lib/fog/hp/storage.rb +++ b/lib/fog/hp/storage.rb @@ -148,7 +148,7 @@ module Fog write_h = write_header.split(',') unless write_header.nil? return read_h, write_h end - + # Get an expiring object https url # # ==== Parameters @@ -162,7 +162,7 @@ module Fog def get_object_https_url(container, object, expires, options = {}) create_temp_url(container, object, expires, "GET", options.merge(:scheme => "https")) end - + # Get an expiring object http url # # ==== Parameters @@ -191,8 +191,8 @@ module Fog expiration_time = (Time.now + expires_secs.to_i).to_i create_temp_url(container, object, expiration_time, method, {}) end - - # creates a temporary url + + # creates a temporary url # # ==== Parameters # * container<~String> - Name of container containing object @@ -217,7 +217,7 @@ module Fog expires = expires.to_i scheme = options[:scheme] || @scheme - + # do not encode before signature generation, encode after sig_path = "#{@path}/#{container}/#{object}" encoded_path = "#{@path}/#{Fog::HP.escape(container)}/#{Fog::HP.escape(object)}" @@ -235,17 +235,17 @@ module Fog else # Only works with 1.9+ Not compatible with 1.8.7 #signed_string = Digest::HMAC.hexdigest(string_to_sign, @hp_secret_key, Digest::SHA1) - - # Compatible with 1.8.7 onwards + + # Compatible with 1.8.7 onwards hmac = OpenSSL::HMAC.new(@hp_secret_key, OpenSSL::Digest::SHA1.new) signed_string = hmac.update(string_to_sign).hexdigest - + signature = @hp_tenant_id.to_s + ":" + @hp_access_key.to_s + ":" + signed_string signature = Fog::HP.escape(signature) end - + # generate the temp url using the signature and expiry - "#{scheme}://#{@host}#{encoded_path}?temp_url_sig=#{signature}&temp_url_expires=#{expires}" + "#{scheme}://#{@host}#{encoded_path}?temp_url_sig=#{signature}&temp_url_expires=#{expires}" end end @@ -283,7 +283,7 @@ module Fog end @hp_secret_key = options[:hp_secret_key] @hp_tenant_id = options[:hp_tenant_id] - @os_account_meta_temp_url_key = options[:os_account_meta_temp_url_key] + @os_account_meta_temp_url_key = options[:os_account_meta_temp_url_key] end def data @@ -319,7 +319,7 @@ module Fog ### A symbol is required, we should ensure that the value is loaded as a symbol auth_version = options[:hp_auth_version] || :v2 auth_version = auth_version.to_s.downcase.to_sym - + ### Pass the service name for object storage to the authentication call options[:hp_service_type] ||= "Object Storage" @hp_tenant_id = options[:hp_tenant_id] diff --git a/lib/fog/ibm/requests/compute/create_instance.rb b/lib/fog/ibm/requests/compute/create_instance.rb index cec5d0e5c..7f9c29d2e 100644 --- a/lib/fog/ibm/requests/compute/create_instance.rb +++ b/lib/fog/ibm/requests/compute/create_instance.rb @@ -48,7 +48,7 @@ module Fog if options[:secondary_ip] options[:secondary_ip].split(',').map(&:strip).each_with_index do |n, idx| body_data.merge!({"secondary.ip.#{idx}" => n}) - end + end end request( :method => 'POST', diff --git a/lib/fog/internet_archive/models/storage/file.rb b/lib/fog/internet_archive/models/storage/file.rb index 44f1d0d1d..c83a4a1ee 100644 --- a/lib/fog/internet_archive/models/storage/file.rb +++ b/lib/fog/internet_archive/models/storage/file.rb @@ -10,7 +10,7 @@ module Fog extend Fog::Storage::IAAttributes::ClassMethods include Fog::Storage::IAAttributes::InstanceMethods - # @see AWS Object docs http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectOps.html + # @see AWS Object docs http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectOps.html # @note Chunk size to use for multipart uploads. # Use small chunk sizes to minimize memory. E.g. 5242880 = 5mb @@ -55,9 +55,9 @@ module Fog end # Get file's body if exists, else ' '. - # + # # @return [File] - # + # def body attributes[:body] ||= if last_modified && (file = collection.get(identity)) file.body @@ -68,33 +68,33 @@ module Fog # Set body attribute. - # + # # @param [File] new_body # @return [File] attributes[:body] - # + # def body=(new_body) attributes[:body] = new_body end # Get the file instance's directory. - # + # # @return [Fog::InternetArchive::Storage::Directory] - # + # def directory @directory end # Copy object from one bucket to other bucket. - # + # # required attributes: directory, key - # + # # @param target_directory_key [String] # @param target_file_key [String] # @param options [Hash] options for copy_object method # @return [String] Fog::InternetArchive::Files#head status of directory contents - # + # def copy(target_directory_key, target_file_key, options = {}) requires :directory, :key service.copy_object(directory.key, key, target_directory_key, target_file_key, options) @@ -104,12 +104,12 @@ module Fog # Destroy file via http DELETE. - # + # # required attributes: directory, key - # + # # @param options [Hash] # @return [Boolean] true if successful - # + # def destroy(options = {}) requires :directory, :key options['x-archive-cascade-delete'] = cascade_delete if cascade_delete @@ -140,12 +140,12 @@ module Fog # Set Access-Control-List permissions. - # + # # valid new_publics: public_read, private - # + # # @param [String] new_public - # @return [String] new_public - # + # @return [String] new_public + # def public=(new_public) 'public-read' end @@ -154,19 +154,19 @@ module Fog # Get publicly acessible url via http GET. # # required attributes: directory, key - # + # # @return [String] public url - # + # def public_url requires :directory, :key "http://#{Fog::InternetArchive::DOMAIN_NAME}/download/#{directory.key}/#{Fog::InternetArchive.escape(key)}".gsub('%2F','/') end # Save file with body as contents to directory.key with name key via http PUT - # + # # required attributes: body, directory, key - # - # @param [Hash] options + # + # @param [Hash] options # @option options [String] cache_control sets Cache-Control header. For example, 'No-cache' # @option options [String] content_disposition sets Content-Disposition HTTP header. For exampple, 'attachment; filename=testing.txt' # @option options [String] content_encoding sets Content-Encoding HTTP header. For example, 'x-gzip' @@ -176,7 +176,7 @@ module Fog # @option options [String] storage_class sets x-amz-storage-class HTTP header. Defaults to 'STANDARD'. Or, 'REDUCED_REDUNDANCY' # @option options [String] encryption sets HTTP encryption header. Set to 'AES256' to encrypt files at rest on S3 # @return [Boolean] true if no errors - # + # def save(options = {}) requires :body, :directory, :key if options != {} @@ -214,13 +214,13 @@ module Fog # Get a url for file. - # + # # required attributes: key - # + # # @param expires [String] number of seconds before url expires # @param options [Hash] # @return [String] url - # + # def url(expires, options = {}) requires :key collection.get_url(key, expires, options) diff --git a/lib/fog/internet_archive/models/storage/ia_attributes.rb b/lib/fog/internet_archive/models/storage/ia_attributes.rb index e27280682..fe565544d 100644 --- a/lib/fog/internet_archive/models/storage/ia_attributes.rb +++ b/lib/fog/internet_archive/models/storage/ia_attributes.rb @@ -18,7 +18,7 @@ module Fog # set_metadata_array_headers(:collections, options) def set_metadata_array_headers(array_attribute, options={}) attr_values = Array(self.send(array_attribute)) - opt_values = options.collect do |key,value| + opt_values = options.collect do |key,value| options.delete(key) if (key.to_s =~ /^x-(amz||archive)-meta(\d*)-#{array_attribute.to_s[0..-2]}/) end values = (attr_values + opt_values).compact.sort.uniq diff --git a/lib/fog/internet_archive/parsers/storage/get_bucket_lifecycle.rb b/lib/fog/internet_archive/parsers/storage/get_bucket_lifecycle.rb index 5c1cb8f8e..6ae5dac6b 100644 --- a/lib/fog/internet_archive/parsers/storage/get_bucket_lifecycle.rb +++ b/lib/fog/internet_archive/parsers/storage/get_bucket_lifecycle.rb @@ -36,7 +36,7 @@ module Fog end elsif @in_transition case name - when 'StorageClass', + when 'StorageClass', @transition['StorageClass'] = value when 'Date' @transition[name] = value @@ -56,7 +56,7 @@ module Fog when 'Rule' @response['Rules'] << @rule @rule = {} - end + end end end end diff --git a/lib/fog/internet_archive/requests/storage/abort_multipart_upload.rb b/lib/fog/internet_archive/requests/storage/abort_multipart_upload.rb index 3492bc7bd..6a1e3458c 100644 --- a/lib/fog/internet_archive/requests/storage/abort_multipart_upload.rb +++ b/lib/fog/internet_archive/requests/storage/abort_multipart_upload.rb @@ -2,7 +2,7 @@ module Fog module Storage class InternetArchive class Real - # + # # Abort a multipart upload # # @param [String] bucket_name Name of bucket to abort multipart upload on @@ -25,4 +25,4 @@ module Fog end # Real end # Storage end # InternetArchive -end # Fog \ No newline at end of file +end # Fog diff --git a/lib/fog/internet_archive/requests/storage/copy_object.rb b/lib/fog/internet_archive/requests/storage/copy_object.rb index e135210d4..ee5a95d4a 100644 --- a/lib/fog/internet_archive/requests/storage/copy_object.rb +++ b/lib/fog/internet_archive/requests/storage/copy_object.rb @@ -11,7 +11,7 @@ module Fog # @param source_object_name [String] Name of source object # @param target_bucket_name [String] Name of bucket to create copy in # @param target_object_name [String] Name for new copy of object - # + # # @param options [Hash]: # @option options [String] x-amz-metadata-directive Specifies whether to copy metadata from source or replace with data in request. Must be in ['COPY', 'REPLACE'] # @option options [String] x-amz-copy_source-if-match Copies object if its etag matches this value @@ -20,14 +20,14 @@ module Fog # @option options [Time] x-amz-copy_source-if-unmodified-since Copies object it it has not been modified since this time # @option options [String] x-amz-storage-class Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data # - # + # # @return [Excon::Response] # * body [Hash]: # * ETag [String] - etag of new object # * LastModified [Time] - date object was last modified # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html - # + # def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {}) headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{CGI.escape(source_object_name)}" }.merge!(options) request({ diff --git a/lib/fog/internet_archive/requests/storage/delete_bucket_policy.rb b/lib/fog/internet_archive/requests/storage/delete_bucket_policy.rb index cf4286b5a..9cf6d20ec 100644 --- a/lib/fog/internet_archive/requests/storage/delete_bucket_policy.rb +++ b/lib/fog/internet_archive/requests/storage/delete_bucket_policy.rb @@ -9,7 +9,7 @@ module Fog # # @return [Excon::Response] response: # * status [Integer] - 204 - # + # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html def delete_bucket_policy(bucket_name) diff --git a/lib/fog/internet_archive/requests/storage/delete_multiple_objects.rb b/lib/fog/internet_archive/requests/storage/delete_multiple_objects.rb index f795fc99c..f076892e3 100644 --- a/lib/fog/internet_archive/requests/storage/delete_multiple_objects.rb +++ b/lib/fog/internet_archive/requests/storage/delete_multiple_objects.rb @@ -30,7 +30,7 @@ module Fog # * Message [String] - Error description # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html - + def delete_multiple_objects(bucket_name, object_names, options = {}) data = "" data << "true" if options.delete(:quiet) diff --git a/lib/fog/internet_archive/requests/storage/get_bucket_website.rb b/lib/fog/internet_archive/requests/storage/get_bucket_website.rb index a2910cef5..f35973065 100644 --- a/lib/fog/internet_archive/requests/storage/get_bucket_website.rb +++ b/lib/fog/internet_archive/requests/storage/get_bucket_website.rb @@ -7,7 +7,7 @@ module Fog # Get website configuration for an S3 bucket # - # + # # @param bucket_name [String] name of bucket to get website configuration for # # @return [Excon::Response] response: diff --git a/lib/fog/internet_archive/requests/storage/head_object.rb b/lib/fog/internet_archive/requests/storage/head_object.rb index 852ee6987..628d4e2b6 100644 --- a/lib/fog/internet_archive/requests/storage/head_object.rb +++ b/lib/fog/internet_archive/requests/storage/head_object.rb @@ -7,21 +7,21 @@ module Fog # # @param bucket_name [String] Name of bucket to read from # @param object_name [String] Name of object to read - # @param options [Hash]: + # @param options [Hash]: # @option options [String] If-Match Returns object only if its etag matches this value, otherwise returns 412 (Precondition Failed). # @option options [Time] If-Modified-Since Returns object only if it has been modified since this time, otherwise returns 304 (Not Modified). # @option options [String] If-None-Match Returns object only if its etag differs from this value, otherwise returns 304 (Not Modified) # @option options [Time] If-Unmodified-Since Returns object only if it has not been modified since this time, otherwise returns 412 (Precodition Failed). # @option options [String] Range Range of object to download # - # @return [Excon::Response] response: + # @return [Excon::Response] response: # * body [String] Contents of object - # * headers [Hash]: + # * headers [Hash]: # * Content-Length [String] - Size of object contents # * Content-Type [String] - MIME type of object # * ETag [String] - Etag of object # * Last-Modified - [String] Last modified timestamp for object - # + # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectHEAD.html # def head_object(bucket_name, object_name, options={}) @@ -58,4 +58,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/internet_archive/requests/storage/initiate_multipart_upload.rb b/lib/fog/internet_archive/requests/storage/initiate_multipart_upload.rb index 6a25b62b8..b84d7d0ec 100644 --- a/lib/fog/internet_archive/requests/storage/initiate_multipart_upload.rb +++ b/lib/fog/internet_archive/requests/storage/initiate_multipart_upload.rb @@ -9,7 +9,7 @@ module Fog # # @param bucket_name [String] Name of bucket to create object in # @param object_name [String] Name of object to create - # @param options [Hash]: + # @param options [Hash]: # @option options [String] Cache-Control Caching behaviour # @option options [String] Content-Disposition Presentational information for the object # @option options [String] Content-Encoding Encoding of object data @@ -18,8 +18,8 @@ module Fog # @option options [String] x-amz-acl Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read'] # @option options [String] x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB. # - # @return [Excon::Response] response: - # * body [Hash]: + # @return [Excon::Response] response: + # * body [Hash]: # * Bucket [String] - Bucket where upload was initiated # * Key [String] - Object key where the upload was initiated # * UploadId [String] - Id for initiated multipart upload diff --git a/lib/fog/internet_archive/requests/storage/post_object_hidden_fields.rb b/lib/fog/internet_archive/requests/storage/post_object_hidden_fields.rb index 26bd9e98b..9d1b66a3a 100644 --- a/lib/fog/internet_archive/requests/storage/post_object_hidden_fields.rb +++ b/lib/fog/internet_archive/requests/storage/post_object_hidden_fields.rb @@ -22,7 +22,7 @@ module Fog # @option options x-amz-meta... meta data tags # # @see http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTForms.html - # + # def post_object_hidden_fields(options = {}) if options['policy'] options['policy'] = Base64.encode64(Fog::JSON.encode(options['policy'])).gsub("\n", "") diff --git a/lib/fog/internet_archive/requests/storage/put_bucket.rb b/lib/fog/internet_archive/requests/storage/put_bucket.rb index 200af852b..a447d5c3c 100644 --- a/lib/fog/internet_archive/requests/storage/put_bucket.rb +++ b/lib/fog/internet_archive/requests/storage/put_bucket.rb @@ -14,7 +14,7 @@ module Fog # * status [Integer] 200 # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUT.html - # + # def put_bucket(bucket_name, options = {}) if location_constraint = options.delete('LocationConstraint') data = diff --git a/lib/fog/internet_archive/requests/storage/put_bucket_acl.rb b/lib/fog/internet_archive/requests/storage/put_bucket_acl.rb index b7de7fb26..08ab7fe44 100644 --- a/lib/fog/internet_archive/requests/storage/put_bucket_acl.rb +++ b/lib/fog/internet_archive/requests/storage/put_bucket_acl.rb @@ -6,7 +6,7 @@ module Fog require 'fog/internet_archive/requests/storage/acl_utils' # Change access control list for an S3 bucket - # + # # @param bucket_name [String] name of bucket to modify # @param acl [Hash] # * Owner [Hash]: @@ -28,7 +28,7 @@ module Fog def put_bucket_acl(bucket_name, acl) data = "" headers = {} - + if acl.is_a?(Hash) data = Fog::Storage::InternetArchive.hash_to_acl(acl) else @@ -52,7 +52,7 @@ module Fog }) end end - + class Mock def put_bucket_acl(bucket_name, acl) if acl.is_a?(Hash) @@ -62,7 +62,7 @@ module Fog raise Excon::Errors::BadRequest.new('invalid x-amz-acl') end self.data[:acls][:bucket][bucket_name] = acl - end + end end end diff --git a/lib/fog/internet_archive/requests/storage/put_bucket_lifecycle.rb b/lib/fog/internet_archive/requests/storage/put_bucket_lifecycle.rb index 079044a23..7f5e28df9 100644 --- a/lib/fog/internet_archive/requests/storage/put_bucket_lifecycle.rb +++ b/lib/fog/internet_archive/requests/storage/put_bucket_lifecycle.rb @@ -11,28 +11,28 @@ module Fog # * ID [String] Unique identifier for the rule # * Prefix [String] Prefix identifying one or more objects to which the rule applies # * Enabled [Boolean] if rule is currently being applied - # * Expiration [Hash] Container for the object expiration rule. + # * Expiration [Hash] Container for the object expiration rule. # * Days [Integer] lifetime, in days, of the objects that are subject to the rule # * Date [Date] Indicates when the specific rule take effect. - # The date value must conform to the ISO 8601 format. The time is always midnight UTC. - # * Transition [Hash] Container for the transition rule that describes when objects transition + # The date value must conform to the ISO 8601 format. The time is always midnight UTC. + # * Transition [Hash] Container for the transition rule that describes when objects transition # to the Glacier storage class # * Days [Integer] lifetime, in days, of the objects that are subject to the rule # * Date [Date] Indicates when the specific rule take effect. - # The date value must conform to the ISO 8601 format. The time is always midnight UTC. + # The date value must conform to the ISO 8601 format. The time is always midnight UTC. # * StorageClass [String] Indicates the Amazon S3 storage class to which you want the object - # to transition to. + # to transition to. + # # - # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html - # + # def put_bucket_lifecycle(bucket_name, lifecycle) builder = Nokogiri::XML::Builder.new do LifecycleConfiguration { lifecycle['Rules'].each do |rule| Rule { ID rule['ID'] - Prefix rule['Prefix'] + Prefix rule['Prefix'] Status rule['Enabled'] ? 'Enabled' : 'Disabled' unless (rule['Expiration'] or rule['Transition']) Expiration { Days rule['Days'] } diff --git a/lib/fog/internet_archive/requests/storage/put_object.rb b/lib/fog/internet_archive/requests/storage/put_object.rb index 7e1b7793e..06c2e9957 100644 --- a/lib/fog/internet_archive/requests/storage/put_object.rb +++ b/lib/fog/internet_archive/requests/storage/put_object.rb @@ -25,7 +25,7 @@ module Fog # * ETag [String] etag of new object # # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html - + def put_object(bucket_name, object_name, data, options = {}) data = Fog::Storage.parse_data(data) headers = data[:headers].merge!(options) diff --git a/lib/fog/internet_archive/requests/storage/put_object_acl.rb b/lib/fog/internet_archive/requests/storage/put_object_acl.rb index c7163039d..c6c6093db 100644 --- a/lib/fog/internet_archive/requests/storage/put_object_acl.rb +++ b/lib/fog/internet_archive/requests/storage/put_object_acl.rb @@ -31,7 +31,7 @@ module Fog query = {'acl' => nil} data = "" headers = {} - + if acl.is_a?(Hash) data = Fog::Storage::InternetArchive.hash_to_acl(acl) else @@ -44,7 +44,7 @@ module Fog headers['Content-MD5'] = Base64.encode64(Digest::MD5.digest(data)).strip headers['Content-Type'] = 'application/json' headers['Date'] = Fog::Time.now.to_date_header - + request({ :body => data, :expects => 200, @@ -56,7 +56,7 @@ module Fog }) end end - + class Mock def put_object_acl(bucket_name, object_name, acl, options = {}) if acl.is_a?(Hash) @@ -66,7 +66,7 @@ module Fog raise Excon::Errors::BadRequest.new('invalid x-amz-acl') end self.data[:acls][:object][bucket_name][object_name] = acl - end + end end end diff --git a/lib/fog/internet_archive/requests/storage/sync_clock.rb b/lib/fog/internet_archive/requests/storage/sync_clock.rb index 3c79b65a3..7137b0e95 100644 --- a/lib/fog/internet_archive/requests/storage/sync_clock.rb +++ b/lib/fog/internet_archive/requests/storage/sync_clock.rb @@ -25,4 +25,4 @@ module Fog end # Mock end # Storage end # InternetArchive -end # Fog \ No newline at end of file +end # Fog diff --git a/lib/fog/libvirt/models/compute/README.md b/lib/fog/libvirt/models/compute/README.md index 33f665482..e681b7372 100644 --- a/lib/fog/libvirt/models/compute/README.md +++ b/lib/fog/libvirt/models/compute/README.md @@ -1,5 +1,5 @@ This model implements the connection with a libvirt URI. -A libvirt URI can either be local or remote. +A libvirt URI can either be local or remote. To learn more on the specific libvirt URI syntax see: diff --git a/lib/fog/libvirt/models/compute/templates/network.xml.erb b/lib/fog/libvirt/models/compute/templates/network.xml.erb index 977557f5d..91493dd7e 100644 --- a/lib/fog/libvirt/models/compute/templates/network.xml.erb +++ b/lib/fog/libvirt/models/compute/templates/network.xml.erb @@ -3,4 +3,4 @@ - \ No newline at end of file + diff --git a/lib/fog/libvirt/models/compute/templates/pool.xml.erb b/lib/fog/libvirt/models/compute/templates/pool.xml.erb index e70137e11..816916a5d 100644 --- a/lib/fog/libvirt/models/compute/templates/pool.xml.erb +++ b/lib/fog/libvirt/models/compute/templates/pool.xml.erb @@ -3,4 +3,4 @@ <%= path %> - \ No newline at end of file + diff --git a/lib/fog/libvirt/requests/compute/mock_files/domain.xml b/lib/fog/libvirt/requests/compute/mock_files/domain.xml index 043e46ad5..7720f1ffb 100644 --- a/lib/fog/libvirt/requests/compute/mock_files/domain.xml +++ b/lib/fog/libvirt/requests/compute/mock_files/domain.xml @@ -37,4 +37,4 @@ - \ No newline at end of file + diff --git a/lib/fog/linode/compute.rb b/lib/fog/linode/compute.rb index 8715781c3..eda77b8f0 100644 --- a/lib/fog/linode/compute.rb +++ b/lib/fog/linode/compute.rb @@ -35,7 +35,7 @@ module Fog request :linode_disk_list request :linode_disk_delete request :linode_disk_createfromdistribution - request :linode_disk_createfromstackscript + request :linode_disk_createfromstackscript request :linode_ip_list request :linode_ip_addprivate request :linode_config_list @@ -48,7 +48,7 @@ module Fog request :linode_shutdown request :linode_update request :stackscript_list - # request :linode_resize + # request :linode_resize class Mock diff --git a/lib/fog/linode/models/compute/flavor.rb b/lib/fog/linode/models/compute/flavor.rb index bbf0db041..d41c62c33 100644 --- a/lib/fog/linode/models/compute/flavor.rb +++ b/lib/fog/linode/models/compute/flavor.rb @@ -9,11 +9,11 @@ module Fog attribute :name attribute :ram attribute :price - + def cores 4 # linode always has 4 cores end - + def bits 0 # these are determined by images you select not the hardware end diff --git a/lib/fog/linode/requests/compute/stackscript_list.rb b/lib/fog/linode/requests/compute/stackscript_list.rb index 9275dc1da..b98119d60 100644 --- a/lib/fog/linode/requests/compute/stackscript_list.rb +++ b/lib/fog/linode/requests/compute/stackscript_list.rb @@ -11,12 +11,12 @@ module Fog # ==== Returns # * response<~Excon::Response>: # * body<~Array>: - # TODO: docs + # TODO: docs def stackscript_list(script_id=nil) options = {} if script_id options.merge!(:stackScriptID => script_id) - end + end result = request( :expects => 200, :method => 'GET', diff --git a/lib/fog/openstack/CHANGELOG.md b/lib/fog/openstack/CHANGELOG.md index 4ccd5c5b3..72e1da6e4 100644 --- a/lib/fog/openstack/CHANGELOG.md +++ b/lib/fog/openstack/CHANGELOG.md @@ -43,5 +43,5 @@ ## Compute -* create_server and the Server model where updated to allow booting a VM +* create_server and the Server model where updated to allow booting a VM with NICs (net_id, port_id, fixed_ip). diff --git a/lib/fog/openstack/docs/getting_started.md b/lib/fog/openstack/docs/getting_started.md index 8392b523c..d6ef6bdcb 100644 --- a/lib/fog/openstack/docs/getting_started.md +++ b/lib/fog/openstack/docs/getting_started.md @@ -6,7 +6,7 @@ This document explains how to get started using Fog with [OpenStack](http://open ### Ruby -Fog officially supports Ruby 2.0.0, 1.9.3, 1.9.2, and 1.8.7 (also known as Matz Ruby Interpreter or MRI). While not officially supported, fog has been known to work with Rubinus and JRuby. +Fog officially supports Ruby 2.0.0, 1.9.3, 1.9.2, and 1.8.7 (also known as Matz Ruby Interpreter or MRI). While not officially supported, fog has been known to work with Rubinus and JRuby. Ruby 2.0.0 is suggested for new projects. For information on installing Ruby please refer to the [Ruby download page](http://www.ruby-lang.org/en/downloads/). @@ -23,8 +23,8 @@ Bundler helps manage gem dependencies and is recommended for new projects. For m To install Fog via RubyGems run the following command: $ gem install fog - -To install Fog via Bundler add `gem 'fog'` to your `Gemfile`. This is a sample `Gemfile` to install Fog: + +To install Fog via Bundler add `gem 'fog'` to your `Gemfile`. This is a sample `Gemfile` to install Fog: ```ruby source 'https://rubygems.org' @@ -44,7 +44,7 @@ Start by executing the following command: irb -Once `irb` has launched you will need to require the Fog library. +Once `irb` has launched you will need to require the Fog library. If using Ruby 1.8.x execute the following command: diff --git a/lib/fog/openstack/docs/storage.md b/lib/fog/openstack/docs/storage.md index 457b43671..bb0aa1442 100644 --- a/lib/fog/openstack/docs/storage.md +++ b/lib/fog/openstack/docs/storage.md @@ -1,6 +1,6 @@ # Storage -This document explains how to get started using OpenStack Swift with Fog. +This document explains how to get started using OpenStack Swift with Fog. ## Starting irb console diff --git a/lib/fog/openstack/examples/identity/basics.rb b/lib/fog/openstack/examples/identity/basics.rb index 498f9b70a..a0579e7d8 100644 --- a/lib/fog/openstack/examples/identity/basics.rb +++ b/lib/fog/openstack/examples/identity/basics.rb @@ -63,7 +63,7 @@ tenant = keystone.tenants.find { |t| t.name == 'rubiojr@example.net' } # Destroy the tenant tenant.destroy -# Find the recently created user +# Find the recently created user user = keystone.users.find { |u| u.name == 'rubiojr@example.net' } # Destroy the user user.destroy diff --git a/lib/fog/openstack/examples/network/network_subnets_routers.rb b/lib/fog/openstack/examples/network/network_subnets_routers.rb index 2487e586e..1d4b33e1e 100644 --- a/lib/fog/openstack/examples/network/network_subnets_routers.rb +++ b/lib/fog/openstack/examples/network/network_subnets_routers.rb @@ -19,13 +19,13 @@ def create_tenant_network( tenant_name, network = Fog::Network[:openstack] id = Fog::Identity[:openstack] - + tenant = id.tenants.find { |t| t.name == tenant_name } # Create a router for the tenant router = network.routers.create :name => router_name, :tenant_id => tenant.id, - :external_gateway_info => { + :external_gateway_info => { 'network_id' => external_net.id } diff --git a/lib/fog/openstack/examples/storage/set-account-quota.rb b/lib/fog/openstack/examples/storage/set-account-quota.rb index 65aee59ce..17cb6a9b0 100644 --- a/lib/fog/openstack/examples/storage/set-account-quota.rb +++ b/lib/fog/openstack/examples/storage/set-account-quota.rb @@ -7,11 +7,11 @@ require 'pp' # # Uses the account impersonation feature recently added to the # OpenStack Storage service in Fog (See https://github.com/fog/fog/pull/1632). -# +# # Should be available in Fog 1.10.0+1. # -# Setting account quotas is only supported in Swift 1.8.0+ -# using the brand new account_quota middleware introduced in +# Setting account quotas is only supported in Swift 1.8.0+ +# using the brand new account_quota middleware introduced in # OpenStack Grizzly (currently unreleased as of 2013/04/03). # # https://github.com/openstack/swift/blob/master/swift/common/middleware/account_quotas.py @@ -23,7 +23,7 @@ password = 'secret' Excon.defaults[:ssl_verify_peer] = false -# +# # We are going to use the Identity (Keystone) service # to retrieve the list of tenants available and find # the tenant we want to set the quotas for. @@ -50,14 +50,14 @@ id.tenants.each do |t| puts "Changing account to #{t.name}" st.change_account "AUTH_#{t.id}" - # Now we're adding the required header to the demo@test.lan + # Now we're adding the required header to the demo@test.lan # tenant account, limiting the account bytes to 1048576 (1MB) # # Uploading more than 1MB will return 413: Request Entity Too Large st.request :method => 'POST', :headers => { 'X-Account-Meta-Quota-Bytes' => '1048576' } - # We can list the account details to verify the new + # We can list the account details to verify the new # header has been added pp st.request :method => 'HEAD' end diff --git a/lib/fog/openstack/models/network/lb_health_monitor.rb b/lib/fog/openstack/models/network/lb_health_monitor.rb index d47f4ac35..34dea547e 100644 --- a/lib/fog/openstack/models/network/lb_health_monitor.rb +++ b/lib/fog/openstack/models/network/lb_health_monitor.rb @@ -65,4 +65,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/models/network/lb_health_monitors.rb b/lib/fog/openstack/models/network/lb_health_monitors.rb index e482320cb..f18374cd7 100644 --- a/lib/fog/openstack/models/network/lb_health_monitors.rb +++ b/lib/fog/openstack/models/network/lb_health_monitors.rb @@ -31,4 +31,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/models/network/lb_member.rb b/lib/fog/openstack/models/network/lb_member.rb index f8feb7b3e..10e115887 100644 --- a/lib/fog/openstack/models/network/lb_member.rb +++ b/lib/fog/openstack/models/network/lb_member.rb @@ -50,4 +50,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/models/network/lb_members.rb b/lib/fog/openstack/models/network/lb_members.rb index f890d097f..15014b667 100644 --- a/lib/fog/openstack/models/network/lb_members.rb +++ b/lib/fog/openstack/models/network/lb_members.rb @@ -31,4 +31,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/models/network/lb_pools.rb b/lib/fog/openstack/models/network/lb_pools.rb index 743c981e0..ea57ec269 100644 --- a/lib/fog/openstack/models/network/lb_pools.rb +++ b/lib/fog/openstack/models/network/lb_pools.rb @@ -31,4 +31,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/models/network/lb_vips.rb b/lib/fog/openstack/models/network/lb_vips.rb index 2baa41f18..72d72a409 100644 --- a/lib/fog/openstack/models/network/lb_vips.rb +++ b/lib/fog/openstack/models/network/lb_vips.rb @@ -31,4 +31,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/models/network/router.rb b/lib/fog/openstack/models/network/router.rb index 047320e83..00ecc80c4 100644 --- a/lib/fog/openstack/models/network/router.rb +++ b/lib/fog/openstack/models/network/router.rb @@ -5,8 +5,8 @@ module Fog class OpenStack # The Layer-3 Networking Extensions (router) # - # A logical entity for forwarding packets across internal - # subnets and NATting them on external networks through + # A logical entity for forwarding packets across internal + # subnets and NATting them on external networks through # an appropriate external gateway. # # @see http://docs.openstack.org/api/openstack-network/2.0/content/router_ext.html diff --git a/lib/fog/openstack/models/storage/file.rb b/lib/fog/openstack/models/storage/file.rb index eda96eb2e..ec075ae30 100644 --- a/lib/fog/openstack/models/storage/file.rb +++ b/lib/fog/openstack/models/storage/file.rb @@ -66,13 +66,13 @@ module Fog end # Get a url for file. - # + # # required attributes: key - # + # # @param expires [String] number of seconds (since 1970-01-01 00:00) before url expires # @param options [Hash] # @return [String] url - # + # def url(expires, options = {}) requires :directory, :key self.service.create_temp_url(directory.key, key, expires, "GET", options) diff --git a/lib/fog/openstack/requests/compute/add_security_group.rb b/lib/fog/openstack/requests/compute/add_security_group.rb index a5e91e0a0..6d76ec203 100644 --- a/lib/fog/openstack/requests/compute/add_security_group.rb +++ b/lib/fog/openstack/requests/compute/add_security_group.rb @@ -21,4 +21,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/compute/get_host_details.rb b/lib/fog/openstack/requests/compute/get_host_details.rb index ba8d73166..ba1be1315 100644 --- a/lib/fog/openstack/requests/compute/get_host_details.rb +++ b/lib/fog/openstack/requests/compute/get_host_details.rb @@ -27,7 +27,7 @@ module Fog "cpu" => 12, "disk_gb" => 1608 } - }, + }, { "resource" => { "project" => "(used_now)", "memory_mb" => 1753, @@ -35,7 +35,7 @@ module Fog "cpu" => 3, "disk_gb" => 33 } - }, + }, { "resource" => { "project" => "(used_max)", "memory_mb" => 7168, @@ -64,7 +64,7 @@ module Fog } response - + end diff --git a/lib/fog/openstack/requests/compute/list_address_pools.rb b/lib/fog/openstack/requests/compute/list_address_pools.rb index cfc75fc5c..bd24b990f 100644 --- a/lib/fog/openstack/requests/compute/list_address_pools.rb +++ b/lib/fog/openstack/requests/compute/list_address_pools.rb @@ -19,7 +19,7 @@ module Fog def list_address_pools response = Excon::Response.new response.status = 200 - response.body = { + response.body = { 'floating_ip_pools' => [ { 'name' => 'nova' } ] diff --git a/lib/fog/openstack/requests/compute/list_usages.rb b/lib/fog/openstack/requests/compute/list_usages.rb index 6289e025b..249c3cbbd 100644 --- a/lib/fog/openstack/requests/compute/list_usages.rb +++ b/lib/fog/openstack/requests/compute/list_usages.rb @@ -27,9 +27,9 @@ module Fog response.body = {"tenant_usages"=>[{ "total_memory_mb_usage" => 0.00036124444444444445, "total_vcpus_usage" => 7.055555555555556e-07, - "start" => "2012-03-06 05:05:56.349001", + "start" => "2012-03-06 05:05:56.349001", "tenant_id" => "b97c8abba0c44a0987c63b858a4823e5", - "stop" => "2012-03-06 05:05:56.349255", + "stop" => "2012-03-06 05:05:56.349255", "total_hours" => 7.055555555555556e-07, "total_local_gb_usage" => 0.0 } diff --git a/lib/fog/openstack/requests/compute/remove_security_group.rb b/lib/fog/openstack/requests/compute/remove_security_group.rb index 3c226f58f..58ace3f2e 100644 --- a/lib/fog/openstack/requests/compute/remove_security_group.rb +++ b/lib/fog/openstack/requests/compute/remove_security_group.rb @@ -21,4 +21,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/compute/set_metadata.rb b/lib/fog/openstack/requests/compute/set_metadata.rb index 4b3d1a78b..48b5de76e 100644 --- a/lib/fog/openstack/requests/compute/set_metadata.rb +++ b/lib/fog/openstack/requests/compute/set_metadata.rb @@ -22,13 +22,13 @@ module Fog if collection_name == "images" then if not list_images_detail.body['images'].detect {|_| _['id'] == parent_id} raise Fog::Compute::OpenStack::NotFound - end + end end if collection_name == "servers" then if not list_servers_detail.body['servers'].detect {|_| _['id'] == parent_id} raise Fog::Compute::OpenStack::NotFound - end + end end response = Excon::Response.new diff --git a/lib/fog/openstack/requests/compute/update_metadata.rb b/lib/fog/openstack/requests/compute/update_metadata.rb index cbec99044..93d260eea 100644 --- a/lib/fog/openstack/requests/compute/update_metadata.rb +++ b/lib/fog/openstack/requests/compute/update_metadata.rb @@ -22,13 +22,13 @@ module Fog if collection_name == "images" then if not list_images_detail.body['images'].detect {|_| _['id'] == parent_id} raise Fog::Compute::OpenStack::NotFound - end + end end if collection_name == "servers" then if not list_servers_detail.body['servers'].detect {|_| _['id'] == parent_id} raise Fog::Compute::OpenStack::NotFound - end + end end #FIXME join w/ existing metadata here diff --git a/lib/fog/openstack/requests/identity/list_users.rb b/lib/fog/openstack/requests/identity/list_users.rb index 71a7c0a86..ba27a97ca 100644 --- a/lib/fog/openstack/requests/identity/list_users.rb +++ b/lib/fog/openstack/requests/identity/list_users.rb @@ -21,8 +21,8 @@ module Fog |user| user['tenantId'] == tenant_id } end - - + + Excon::Response.new( :body => { 'users' => users }, :status => 200 diff --git a/lib/fog/openstack/requests/network/associate_lb_health_monitor.rb b/lib/fog/openstack/requests/network/associate_lb_health_monitor.rb index db9885ebf..b5aaad22b 100644 --- a/lib/fog/openstack/requests/network/associate_lb_health_monitor.rb +++ b/lib/fog/openstack/requests/network/associate_lb_health_monitor.rb @@ -36,4 +36,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/create_lb_health_monitor.rb b/lib/fog/openstack/requests/network/create_lb_health_monitor.rb index 3a003c2a2..a76a8deeb 100644 --- a/lib/fog/openstack/requests/network/create_lb_health_monitor.rb +++ b/lib/fog/openstack/requests/network/create_lb_health_monitor.rb @@ -53,4 +53,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/create_lb_member.rb b/lib/fog/openstack/requests/network/create_lb_member.rb index cc67d5b8d..1f24d39b0 100644 --- a/lib/fog/openstack/requests/network/create_lb_member.rb +++ b/lib/fog/openstack/requests/network/create_lb_member.rb @@ -50,4 +50,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/create_lb_pool.rb b/lib/fog/openstack/requests/network/create_lb_pool.rb index c8d1ef4a0..f62fbf537 100644 --- a/lib/fog/openstack/requests/network/create_lb_pool.rb +++ b/lib/fog/openstack/requests/network/create_lb_pool.rb @@ -57,4 +57,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/create_lb_vip.rb b/lib/fog/openstack/requests/network/create_lb_vip.rb index 6ce272ae3..700c06caf 100644 --- a/lib/fog/openstack/requests/network/create_lb_vip.rb +++ b/lib/fog/openstack/requests/network/create_lb_vip.rb @@ -57,4 +57,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/create_network.rb b/lib/fog/openstack/requests/network/create_network.rb index 08902d2fd..bbbbfb270 100644 --- a/lib/fog/openstack/requests/network/create_network.rb +++ b/lib/fog/openstack/requests/network/create_network.rb @@ -7,9 +7,9 @@ module Fog data = { 'network' => {} } vanilla_options = [ - :name, - :shared, - :admin_state_up, + :name, + :shared, + :admin_state_up, :tenant_id ] @@ -30,8 +30,8 @@ module Fog :provider_physical_network ] - # Map Fog::Network::OpenStack::Network - # model attributes to OpenStack provider attributes + # Map Fog::Network::OpenStack::Network + # model attributes to OpenStack provider attributes aliases = { :provider_network_type => 'provider:network_type', # Not applicable to the "local" or "gre" network types diff --git a/lib/fog/openstack/requests/network/create_port.rb b/lib/fog/openstack/requests/network/create_port.rb index 71ea5686b..9741f9c5a 100644 --- a/lib/fog/openstack/requests/network/create_port.rb +++ b/lib/fog/openstack/requests/network/create_port.rb @@ -49,4 +49,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/create_router.rb b/lib/fog/openstack/requests/network/create_router.rb index 23af14b00..38696abab 100644 --- a/lib/fog/openstack/requests/network/create_router.rb +++ b/lib/fog/openstack/requests/network/create_router.rb @@ -11,7 +11,7 @@ module Fog } vanilla_options = [ - :admin_state_up, + :admin_state_up, :tenant_id, :network_id, :external_gateway_info, diff --git a/lib/fog/openstack/requests/network/create_subnet.rb b/lib/fog/openstack/requests/network/create_subnet.rb index 7d207d2d7..ed05ae3e2 100644 --- a/lib/fog/openstack/requests/network/create_subnet.rb +++ b/lib/fog/openstack/requests/network/create_subnet.rb @@ -53,4 +53,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/delete_lb_health_monitor.rb b/lib/fog/openstack/requests/network/delete_lb_health_monitor.rb index a50c70944..26031c1de 100644 --- a/lib/fog/openstack/requests/network/delete_lb_health_monitor.rb +++ b/lib/fog/openstack/requests/network/delete_lb_health_monitor.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/delete_lb_member.rb b/lib/fog/openstack/requests/network/delete_lb_member.rb index 1258cf711..15daea0d3 100644 --- a/lib/fog/openstack/requests/network/delete_lb_member.rb +++ b/lib/fog/openstack/requests/network/delete_lb_member.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/delete_lb_pool.rb b/lib/fog/openstack/requests/network/delete_lb_pool.rb index 5e5987eec..0db85dae2 100644 --- a/lib/fog/openstack/requests/network/delete_lb_pool.rb +++ b/lib/fog/openstack/requests/network/delete_lb_pool.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/delete_lb_vip.rb b/lib/fog/openstack/requests/network/delete_lb_vip.rb index fe251729d..42ec3e8b9 100644 --- a/lib/fog/openstack/requests/network/delete_lb_vip.rb +++ b/lib/fog/openstack/requests/network/delete_lb_vip.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/delete_network.rb b/lib/fog/openstack/requests/network/delete_network.rb index 70ec48f4b..65edd1eb4 100644 --- a/lib/fog/openstack/requests/network/delete_network.rb +++ b/lib/fog/openstack/requests/network/delete_network.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/delete_port.rb b/lib/fog/openstack/requests/network/delete_port.rb index 0b578242c..f89a925c3 100644 --- a/lib/fog/openstack/requests/network/delete_port.rb +++ b/lib/fog/openstack/requests/network/delete_port.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/delete_subnet.rb b/lib/fog/openstack/requests/network/delete_subnet.rb index 2d902a44e..ba52aab08 100644 --- a/lib/fog/openstack/requests/network/delete_subnet.rb +++ b/lib/fog/openstack/requests/network/delete_subnet.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/disassociate_lb_health_monitor.rb b/lib/fog/openstack/requests/network/disassociate_lb_health_monitor.rb index 24d1124b5..8167a806b 100644 --- a/lib/fog/openstack/requests/network/disassociate_lb_health_monitor.rb +++ b/lib/fog/openstack/requests/network/disassociate_lb_health_monitor.rb @@ -28,4 +28,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/get_lb_health_monitor.rb b/lib/fog/openstack/requests/network/get_lb_health_monitor.rb index 7fba189bb..6dee9bfdb 100644 --- a/lib/fog/openstack/requests/network/get_lb_health_monitor.rb +++ b/lib/fog/openstack/requests/network/get_lb_health_monitor.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/get_lb_member.rb b/lib/fog/openstack/requests/network/get_lb_member.rb index 4b3b73cd1..4e686aa7c 100644 --- a/lib/fog/openstack/requests/network/get_lb_member.rb +++ b/lib/fog/openstack/requests/network/get_lb_member.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/get_lb_pool.rb b/lib/fog/openstack/requests/network/get_lb_pool.rb index 3ac05d5af..45e5c9beb 100644 --- a/lib/fog/openstack/requests/network/get_lb_pool.rb +++ b/lib/fog/openstack/requests/network/get_lb_pool.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/get_lb_pool_stats.rb b/lib/fog/openstack/requests/network/get_lb_pool_stats.rb index 73899b327..f360b48fc 100644 --- a/lib/fog/openstack/requests/network/get_lb_pool_stats.rb +++ b/lib/fog/openstack/requests/network/get_lb_pool_stats.rb @@ -32,4 +32,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/get_lb_vip.rb b/lib/fog/openstack/requests/network/get_lb_vip.rb index aabd133e7..0d68ad16e 100644 --- a/lib/fog/openstack/requests/network/get_lb_vip.rb +++ b/lib/fog/openstack/requests/network/get_lb_vip.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/get_port.rb b/lib/fog/openstack/requests/network/get_port.rb index c7c5b4de0..0a06defa6 100644 --- a/lib/fog/openstack/requests/network/get_port.rb +++ b/lib/fog/openstack/requests/network/get_port.rb @@ -45,4 +45,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/get_subnet.rb b/lib/fog/openstack/requests/network/get_subnet.rb index dfb9f059a..f1ba33049 100644 --- a/lib/fog/openstack/requests/network/get_subnet.rb +++ b/lib/fog/openstack/requests/network/get_subnet.rb @@ -46,4 +46,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/list_lb_health_monitors.rb b/lib/fog/openstack/requests/network/list_lb_health_monitors.rb index 60a12040c..6dabfcf7d 100644 --- a/lib/fog/openstack/requests/network/list_lb_health_monitors.rb +++ b/lib/fog/openstack/requests/network/list_lb_health_monitors.rb @@ -24,4 +24,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/list_lb_members.rb b/lib/fog/openstack/requests/network/list_lb_members.rb index 730531ae1..a1d33999d 100644 --- a/lib/fog/openstack/requests/network/list_lb_members.rb +++ b/lib/fog/openstack/requests/network/list_lb_members.rb @@ -24,4 +24,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/list_lb_pools.rb b/lib/fog/openstack/requests/network/list_lb_pools.rb index 871024863..4aabc5b7d 100644 --- a/lib/fog/openstack/requests/network/list_lb_pools.rb +++ b/lib/fog/openstack/requests/network/list_lb_pools.rb @@ -24,4 +24,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/list_lb_vips.rb b/lib/fog/openstack/requests/network/list_lb_vips.rb index 50a3ed22b..d9ae0debe 100644 --- a/lib/fog/openstack/requests/network/list_lb_vips.rb +++ b/lib/fog/openstack/requests/network/list_lb_vips.rb @@ -24,4 +24,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/list_networks.rb b/lib/fog/openstack/requests/network/list_networks.rb index 42c6b8663..d90be2712 100644 --- a/lib/fog/openstack/requests/network/list_networks.rb +++ b/lib/fog/openstack/requests/network/list_networks.rb @@ -23,4 +23,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/list_ports.rb b/lib/fog/openstack/requests/network/list_ports.rb index 7064356c9..e137f7cea 100644 --- a/lib/fog/openstack/requests/network/list_ports.rb +++ b/lib/fog/openstack/requests/network/list_ports.rb @@ -24,4 +24,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/list_subnets.rb b/lib/fog/openstack/requests/network/list_subnets.rb index 6abd9f2a5..111a693a3 100644 --- a/lib/fog/openstack/requests/network/list_subnets.rb +++ b/lib/fog/openstack/requests/network/list_subnets.rb @@ -24,4 +24,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/set_tenant.rb b/lib/fog/openstack/requests/network/set_tenant.rb index 70d535758..022535ec4 100644 --- a/lib/fog/openstack/requests/network/set_tenant.rb +++ b/lib/fog/openstack/requests/network/set_tenant.rb @@ -18,4 +18,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/update_lb_health_monitor.rb b/lib/fog/openstack/requests/network/update_lb_health_monitor.rb index 4561c077e..fdea25735 100644 --- a/lib/fog/openstack/requests/network/update_lb_health_monitor.rb +++ b/lib/fog/openstack/requests/network/update_lb_health_monitor.rb @@ -42,4 +42,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/update_lb_member.rb b/lib/fog/openstack/requests/network/update_lb_member.rb index 94e3e72ef..24d1d856f 100644 --- a/lib/fog/openstack/requests/network/update_lb_member.rb +++ b/lib/fog/openstack/requests/network/update_lb_member.rb @@ -38,4 +38,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/update_lb_pool.rb b/lib/fog/openstack/requests/network/update_lb_pool.rb index cf65f5899..86298acb0 100644 --- a/lib/fog/openstack/requests/network/update_lb_pool.rb +++ b/lib/fog/openstack/requests/network/update_lb_pool.rb @@ -39,4 +39,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/update_lb_vip.rb b/lib/fog/openstack/requests/network/update_lb_vip.rb index eac4ac604..1eb02a7d5 100644 --- a/lib/fog/openstack/requests/network/update_lb_vip.rb +++ b/lib/fog/openstack/requests/network/update_lb_vip.rb @@ -41,4 +41,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/update_port.rb b/lib/fog/openstack/requests/network/update_port.rb index a34e9ce7c..a8de157a6 100644 --- a/lib/fog/openstack/requests/network/update_port.rb +++ b/lib/fog/openstack/requests/network/update_port.rb @@ -41,4 +41,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/network/update_router.rb b/lib/fog/openstack/requests/network/update_router.rb index 7d2b1d72e..9045df751 100644 --- a/lib/fog/openstack/requests/network/update_router.rb +++ b/lib/fog/openstack/requests/network/update_router.rb @@ -6,8 +6,8 @@ module Fog # Update Router # - # Beyond the name and the administrative state, the only - # parameter which can be updated with this operation is + # Beyond the name and the administrative state, the only + # parameter which can be updated with this operation is # the external gateway. # # router = Fog::Network[:openstack].routers.first @@ -24,7 +24,7 @@ module Fog # @see http://docs.openstack.org/api/openstack-network/2.0/content/router_update.html def update_router(router_id, options = {}) data = { 'router' => {} } - + vanilla_options = [:name, :admin_state_up] egi = options[:external_gateway_info] @@ -54,7 +54,7 @@ module Fog class Mock def update_router(router_id, options = {}) response = Excon::Response.new - router = list_routers.body['routers'].detect do |_| + router = list_routers.body['routers'].detect do |_| _['id'] == router_id end if router diff --git a/lib/fog/openstack/requests/network/update_subnet.rb b/lib/fog/openstack/requests/network/update_subnet.rb index 1810ea38e..6e3597bf9 100644 --- a/lib/fog/openstack/requests/network/update_subnet.rb +++ b/lib/fog/openstack/requests/network/update_subnet.rb @@ -41,4 +41,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/storage/get_object_http_url.rb b/lib/fog/openstack/requests/storage/get_object_http_url.rb index 390896e60..32c533c22 100644 --- a/lib/fog/openstack/requests/storage/get_object_http_url.rb +++ b/lib/fog/openstack/requests/storage/get_object_http_url.rb @@ -10,4 +10,4 @@ # * body<~String> - url for object def get_object_http_url(container, object, expires, options = {}) create_temp_url(container, object, expires, "GET", options.merge(:scheme => "http")) -end \ No newline at end of file +end diff --git a/lib/fog/openstack/requests/storage/get_object_https_url.rb b/lib/fog/openstack/requests/storage/get_object_https_url.rb index ee151602e..dbc2c1e1e 100644 --- a/lib/fog/openstack/requests/storage/get_object_https_url.rb +++ b/lib/fog/openstack/requests/storage/get_object_https_url.rb @@ -17,8 +17,8 @@ module Fog def get_object_https_url(container, object, expires, options = {}) create_temp_url(container, object, expires, "GET", options.merge(:scheme => "https")) end - - # creates a temporary url + + # creates a temporary url # # ==== Parameters # * container<~String> - Name of container containing object @@ -37,15 +37,15 @@ module Fog def create_temp_url(container, object, expires, method, options = {}) raise ArgumentError, "Insufficient parameters specified." unless (container && object && expires && method) raise ArgumentError, "Storage must my instantiated with the :openstack_temp_url_key option" if @openstack_temp_url_key.nil? - + scheme = options[:scheme] || @scheme - + # POST not allowed allowed_methods = %w{GET PUT HEAD} unless allowed_methods.include?(method) raise ArgumentError.new("Invalid method '#{method}' specified. Valid methods are: #{allowed_methods.join(', ')}") end - + expires = expires.to_i object_path_escaped = "#{@path}/#{Fog::OpenStack.escape(container)}/#{Fog::OpenStack.escape(object,"/")}" @@ -57,7 +57,7 @@ module Fog "#{scheme}://#{@host}#{object_path_escaped}?temp_url_sig=#{sig}&temp_url_expires=#{expires}" end - + private def sig_to_hex(str) diff --git a/lib/fog/openstack/requests/volume/delete_volume.rb b/lib/fog/openstack/requests/volume/delete_volume.rb index 6b7ce70a7..c0c06ff18 100644 --- a/lib/fog/openstack/requests/volume/delete_volume.rb +++ b/lib/fog/openstack/requests/volume/delete_volume.rb @@ -1,5 +1,5 @@ module Fog - module Volume + module Volume class OpenStack class Real diff --git a/lib/fog/openstack/requests/volume/get_snapshot_details.rb b/lib/fog/openstack/requests/volume/get_snapshot_details.rb index ebfc13df9..b86dbe61b 100644 --- a/lib/fog/openstack/requests/volume/get_snapshot_details.rb +++ b/lib/fog/openstack/requests/volume/get_snapshot_details.rb @@ -1,5 +1,5 @@ module Fog - module Volume + module Volume class OpenStack class Real diff --git a/lib/fog/openvz/README.md b/lib/fog/openvz/README.md index 638ed80f9..93ab7fd36 100644 --- a/lib/fog/openvz/README.md +++ b/lib/fog/openvz/README.md @@ -88,7 +88,7 @@ Note: ## Requests ### Passing parameters The server request are in essence a passthrough to __vzctl__. -Just provide the options as a hash in key,value pairs. +Just provide the options as a hash in key,value pairs. If it's just a switch (like --save), use a key and a boolean(true). The following command in plain cli-vzctl: diff --git a/lib/fog/ovirt/models/compute/server.rb b/lib/fog/ovirt/models/compute/server.rb index 252b2df42..b7278da05 100644 --- a/lib/fog/ovirt/models/compute/server.rb +++ b/lib/fog/ovirt/models/compute/server.rb @@ -28,7 +28,7 @@ module Fog attribute :volumes attribute :raw attribute :quota - + def ready? !(status =~ /down/i) end diff --git a/lib/fog/ovirt/requests/compute/add_interface.rb b/lib/fog/ovirt/requests/compute/add_interface.rb index 92c096ad8..675311db4 100644 --- a/lib/fog/ovirt/requests/compute/add_interface.rb +++ b/lib/fog/ovirt/requests/compute/add_interface.rb @@ -20,4 +20,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/ovirt/requests/compute/add_volume.rb b/lib/fog/ovirt/requests/compute/add_volume.rb index 4d61734e8..264a07c48 100644 --- a/lib/fog/ovirt/requests/compute/add_volume.rb +++ b/lib/fog/ovirt/requests/compute/add_volume.rb @@ -20,4 +20,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/ovirt/requests/compute/get_api_version.rb b/lib/fog/ovirt/requests/compute/get_api_version.rb index 3a4799bd1..52643b499 100644 --- a/lib/fog/ovirt/requests/compute/get_api_version.rb +++ b/lib/fog/ovirt/requests/compute/get_api_version.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/ovirt/requests/compute/get_template.rb b/lib/fog/ovirt/requests/compute/get_template.rb index 409537311..73622dc15 100644 --- a/lib/fog/ovirt/requests/compute/get_template.rb +++ b/lib/fog/ovirt/requests/compute/get_template.rb @@ -15,4 +15,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/ovirt/requests/compute/mock_files/cluster.xml b/lib/fog/ovirt/requests/compute/mock_files/cluster.xml index 51006eca0..395766b69 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/cluster.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/cluster.xml @@ -17,4 +17,4 @@ migrate_highly_available - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/clusters.xml b/lib/fog/ovirt/requests/compute/mock_files/clusters.xml index 0235f0313..3421392dc 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/clusters.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/clusters.xml @@ -36,4 +36,4 @@ migrate_highly_available - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/data_centers.xml b/lib/fog/ovirt/requests/compute/mock_files/data_centers.xml index cda1053dc..4df00c47a 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/data_centers.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/data_centers.xml @@ -14,4 +14,4 @@ up - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/nics.xml b/lib/fog/ovirt/requests/compute/mock_files/nics.xml index 90b8738e8..501fd28cc 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/nics.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/nics.xml @@ -7,4 +7,4 @@ virtio - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/quotas.xml b/lib/fog/ovirt/requests/compute/mock_files/quotas.xml index 3b39cda9c..0de4753e5 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/quotas.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/quotas.xml @@ -4,4 +4,4 @@ Automatic generated Quota for Data Center Datacenter1 - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/storage_domains.xml b/lib/fog/ovirt/requests/compute/mock_files/storage_domains.xml index 7eca19304..fd0d5d88e 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/storage_domains.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/storage_domains.xml @@ -33,4 +33,4 @@ 75161927680 v1 - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/template.xml b/lib/fog/ovirt/requests/compute/mock_files/template.xml index 64543bed6..77620332a 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/template.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/template.xml @@ -36,4 +36,4 @@ true - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/templates.xml b/lib/fog/ovirt/requests/compute/mock_files/templates.xml index 4a3e7e4f8..65c27b7ce 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/templates.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/templates.xml @@ -107,4 +107,4 @@ true - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/vms.xml b/lib/fog/ovirt/requests/compute/mock_files/vms.xml index 0467e66e8..1137656d3 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/vms.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/vms.xml @@ -149,4 +149,4 @@ true - \ No newline at end of file + diff --git a/lib/fog/ovirt/requests/compute/mock_files/volumes.xml b/lib/fog/ovirt/requests/compute/mock_files/volumes.xml index 8b3e817bd..8f45d4bf6 100644 --- a/lib/fog/ovirt/requests/compute/mock_files/volumes.xml +++ b/lib/fog/ovirt/requests/compute/mock_files/volumes.xml @@ -37,4 +37,4 @@ false false - \ No newline at end of file + diff --git a/lib/fog/rackspace/docs/compute_v2.md b/lib/fog/rackspace/docs/compute_v2.md index 5f61c0638..c71519282 100644 --- a/lib/fog/rackspace/docs/compute_v2.md +++ b/lib/fog/rackspace/docs/compute_v2.md @@ -10,7 +10,7 @@ Start by executing the following command: irb -Once `irb` has launched you need to require the Fog library. +Once `irb` has launched you need to require the Fog library. If using Ruby 1.8.x execute: @@ -108,7 +108,7 @@ Fog supports passing additional connection parameters to its underlying HTTP lib ## Fog Abstractions -Fog provides both a **model** and **request** abstraction. The request abstraction provides the most efficient interface and the model abstraction wraps the request abstraction to provide a convenient `ActiveModel` like interface. +Fog provides both a **model** and **request** abstraction. The request abstraction provides the most efficient interface and the model abstraction wraps the request abstraction to provide a convenient `ActiveModel` like interface. ### Request Layer @@ -131,7 +131,7 @@ To request a list of flavors: This returns in the following `Excon::Response`: - [{"id"=>"2", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/2", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/2", "rel"=>"bookmark"}], "name"=>"512MB Standard Instance"}, {"id"=>"3", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/3", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/3", "rel"=>"bookmark"}], "name"=>"1GB Standard Instance"}, {"id"=>"4", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/4", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/4", "rel"=>"bookmark"}], "name"=>"2GB Standard Instance"}, {"id"=>"5", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/5", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/5", "rel"=>"bookmark"}], "name"=>"4GB Standard Instance"}, {"id"=>"6", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/6", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/6", "rel"=>"bookmark"}], "name"=>"8GB Standard Instance"}, {"id"=>"7", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/7", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/7", "rel"=>"bookmark"}], "name"=>"15GB Standard Instance"}, {"id"=>"8", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/8", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/8", "rel"=>"bookmark"}], "name"=>"30GB Standard Instance"}]}, @headers={"Date"=>"Mon, 21 Jan 2013 16:14:45 GMT", "Content-Length"=>"1697", "Content-Type"=>"application/json", "X-Compute-Request-Id"=>"req-0a1e8532-19b3-4993-8b48-cf2d9efe078c", "Server"=>"Jetty(8.0.y.z-SNAPSHOT)"}, @status=200> + [{"id"=>"2", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/2", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/2", "rel"=>"bookmark"}], "name"=>"512MB Standard Instance"}, {"id"=>"3", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/3", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/3", "rel"=>"bookmark"}], "name"=>"1GB Standard Instance"}, {"id"=>"4", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/4", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/4", "rel"=>"bookmark"}], "name"=>"2GB Standard Instance"}, {"id"=>"5", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/5", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/5", "rel"=>"bookmark"}], "name"=>"4GB Standard Instance"}, {"id"=>"6", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/6", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/6", "rel"=>"bookmark"}], "name"=>"8GB Standard Instance"}, {"id"=>"7", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/7", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/7", "rel"=>"bookmark"}], "name"=>"15GB Standard Instance"}, {"id"=>"8", "links"=>[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/flavors/8", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/flavors/8", "rel"=>"bookmark"}], "name"=>"30GB Standard Instance"}]}, @headers={"Date"=>"Mon, 21 Jan 2013 16:14:45 GMT", "Content-Length"=>"1697", "Content-Type"=>"application/json", "X-Compute-Request-Id"=>"req-0a1e8532-19b3-4993-8b48-cf2d9efe078c", "Server"=>"Jetty(8.0.y.z-SNAPSHOT)"}, @status=200> To view the status of the response: @@ -180,7 +180,7 @@ Here is a summary of common model methods: destroy - Destroys object.
+ Destroys object.
Note: this is a non-blocking call and object deletion might not be instantaneous. @@ -272,8 +272,8 @@ This returns an `Fog::Compute::RackspaceV2::Image` instance: metadata={"os_distro"=>"ubuntu", "com.rackspace__1__visible_core"=>"1", "com.rackspace__1__build_rackconnect"=>"1", "auto_disk_config"=>"True", "com.rackspace__1__options"=>"0", "image_type"=>"base", "org.openstack__1__os_version"=>"12.10", "os_version"=>"12.10", "rax_options"=>"0", "com.rackspace__1__visible_rackconnect"=>"1", "org.openstack__1__os_distro"=>"org.ubuntu", "com.rackspace__1__visible_managed"=>"1", "com.rackspace__1__build_core"=>"1", "arch"=>"x86-64", "os_type"=>"linux", "org.openstack__1__architecture"=>"x64", "com.rackspace__1__build_managed"=>"1"}, disk_config="AUTO", links=[{"href"=>"https://ord.servers.api.rackspacecloud.com/v2/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "rel"=>"self"}, {"href"=>"https://ord.servers.api.rackspacecloud.com/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "rel"=>"bookmark"}, {"href"=>"https://ord.images.api.rackspacecloud.com/772045/images/8a3a9f96-b997-46fd-b7a8-a9e740796ffd", "type"=>"application/vnd.openstack.image", "rel"=>"alternate"}] - > - + > + ## List Flavors To retrieve a list of available flavors: @@ -386,7 +386,7 @@ This returns a `Fog::Compute::RackspaceV2::Server` instance: image_id="33e21646-43ed-407e-9dbf-7c7873fccd9a" >, ... - + ## Create Server If you are interested in creating a server utilizing ssh key authenication, you are recommended to use [bootstrap](#bootstrap) method. @@ -421,7 +421,7 @@ This will return a `Fog::Compute::RackspaceV2::Server` instance: addresses=nil, flavor_id=2, image_id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001" - > + > Notice that your server contains several `nil` attributes. To see the latest status, reload the instance as follows: @@ -449,10 +449,10 @@ You can see that the server is currently 17% built: addresses={"public"=>[{"version"=>4, "addr"=>"198.61.209.78"}, {"version"=>6, "addr"=>"2001:4800:7810:0512:0fe1:75e8:ff04:94e4"}], "private"=>[{"version"=>4, "addr"=>"10.181.13.198"}]}, flavor_id="2", image_id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001" - > - + > + You will be unable to perform any actions to this server until it reaches an `ACTIVE` state. Since this is true for most server actions, Fog provides the convenience method `wait_for`. - + Fog can wait for the server to become ready as follows: server.wait_for { ready? } @@ -588,7 +588,7 @@ Rebuild removes all data on the server and replaces it with the specified image. To rebuild a server: - image = service.images.first + image = service.images.first server.rebuild image.id Additionally, the `rebuild` method will take a second parameter containing a hash with the following values: @@ -616,7 +616,7 @@ Additionally, the `rebuild` method will take a second parameter containing a has :metadata - Hash containing server metadata + Hash containing server metadata :personality @@ -634,10 +634,10 @@ Resizing a server allows you to change the resources dedicated to the server. To resize a server: - flavor_id = service.flavor[2].id + flavor_id = service.flavor[2].id server.resize flavor_id #flavor_id should be your desired flavor -During the resize process the server will have a state of `RESIZE`. Once a server has completed resizing it will be in a `VERIFY_RESIZE` state. +During the resize process the server will have a state of `RESIZE`. Once a server has completed resizing it will be in a `VERIFY_RESIZE` state. You can use Fog's `wait_for` method to wait for this state as follows: @@ -674,14 +674,14 @@ During the imaging process, the image state will be `SAVING`. The image is ready ## List Attached Volumes To list Cloud Block Volumes attached to server: - server.attachments + server.attachments ## Attach Volume To attach volume using the volume id: server.attach_volume "0e7a706c-340d-48b3-802d-192850387f93" -If the volume id is unknown you can look it up using the Cloud Block Storage service. Start by creating a `cbs_service` similar to our Compute Service: +If the volume id is unknown you can look it up using the Cloud Block Storage service. Start by creating a `cbs_service` similar to our Compute Service: cbs_service = Fog::Rackspace::BlockStorage.new({ :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username diff --git a/lib/fog/rackspace/docs/getting_started.md b/lib/fog/rackspace/docs/getting_started.md index 8f4c24f4e..969180b01 100644 --- a/lib/fog/rackspace/docs/getting_started.md +++ b/lib/fog/rackspace/docs/getting_started.md @@ -6,7 +6,7 @@ This document explains how to get started using Fog with the [Rackspace Cloud](h ### Ruby -Fog officially supports Ruby 1.9.3, 1.9.2, and 1.8.7 (also known as Matz Ruby Interpreter or MRI). While not officially supported, fog has been known to work with Rubinus and JRuby. +Fog officially supports Ruby 1.9.3, 1.9.2, and 1.8.7 (also known as Matz Ruby Interpreter or MRI). While not officially supported, fog has been known to work with Rubinus and JRuby. Ruby 1.9.3 is suggested for new projects. For information on installing Ruby please refer to the [Ruby download page](http://www.ruby-lang.org/en/downloads/). @@ -31,8 +31,8 @@ You will use the credentials when you explore fog services in the [Next Steps](# To install Fog via RubyGems run the following command: $ gem install fog - -To install Fog via Bundler add `gem 'fog'` to your `Gemfile`. This is a sample `Gemfile` to install Fog: + +To install Fog via Bundler add `gem 'fog'` to your `Gemfile`. This is a sample `Gemfile` to install Fog: source 'https://rubygems.org' @@ -50,7 +50,7 @@ Start by executing the following command: irb -Once `irb` has launched you will need to require the Fog library. +Once `irb` has launched you will need to require the Fog library. If using Ruby 1.8.x execute the following command: diff --git a/lib/fog/rackspace/docs/storage.md b/lib/fog/rackspace/docs/storage.md index e7d821038..aadefeb05 100644 --- a/lib/fog/rackspace/docs/storage.md +++ b/lib/fog/rackspace/docs/storage.md @@ -9,7 +9,7 @@ Start by executing the following command: irb -Once `irb` has launched you need to require the Fog library. +Once `irb` has launched you need to require the Fog library. If using Ruby 1.8.x execute: @@ -141,7 +141,7 @@ Fog supports passing additional connection parameters to its underlying HTTP lib ## Fog Abstractions -Fog provides both a **model** and **request** abstraction. The request abstraction provides the most efficient interface and the model abstraction wraps the request abstraction to provide a convenient `ActiveModel` like interface. +Fog provides both a **model** and **request** abstraction. The request abstraction provides the most efficient interface and the model abstraction wraps the request abstraction to provide a convenient `ActiveModel` like interface. ### Request Layer @@ -172,7 +172,7 @@ To request a view account details: This returns in the following `Excon::Response`: - #"2563554", "Date"=>"Thu, 21 Feb 2013 21:57:02 GMT", "X-Account-Meta-Temp-Url-Key"=>"super_secret_key", "X-Timestamp"=>"1354552916.82056", "Content-Length"=>"0", "Content-Type"=>"application/json; charset=utf-8", "X-Trans-Id"=>"txe934924374a744c8a6c40dd8f29ab94a", "Accept-Ranges"=>"bytes", "X-Account-Container-Count"=>"7", "X-Account-Object-Count"=>"5"}, @status=204, @body=""> + #"2563554", "Date"=>"Thu, 21 Feb 2013 21:57:02 GMT", "X-Account-Meta-Temp-Url-Key"=>"super_secret_key", "X-Timestamp"=>"1354552916.82056", "Content-Length"=>"0", "Content-Type"=>"application/json; charset=utf-8", "X-Trans-Id"=>"txe934924374a744c8a6c40dd8f29ab94a", "Accept-Ranges"=>"bytes", "X-Account-Container-Count"=>"7", "X-Account-Object-Count"=>"5"}, @status=204, @body=""> To view the status of the response: @@ -186,7 +186,7 @@ To view response headers: This will return: - {"X-Account-Bytes-Used"=>"2563554", "Date"=>"Thu, 21 Feb 2013 21:57:02 GMT", "X-Account-Meta-Temp-Url-Key"=>"super_secret_key", "X-Timestamp"=>"1354552916.82056", "Content-Length"=>"0", "Content-Type"=>"application/json; charset=utf-8", "X-Trans-Id"=>"txe934924374a744c8a6c40dd8f29ab94a", "Accept-Ranges"=>"bytes", "X-Account-Container-Count"=>"7", "X-Account-Object-Count"=>"5"} + {"X-Account-Bytes-Used"=>"2563554", "Date"=>"Thu, 21 Feb 2013 21:57:02 GMT", "X-Account-Meta-Temp-Url-Key"=>"super_secret_key", "X-Timestamp"=>"1354552916.82056", "Content-Length"=>"0", "Content-Type"=>"application/json; charset=utf-8", "X-Trans-Id"=>"txe934924374a744c8a6c40dd8f29ab94a", "Accept-Ranges"=>"bytes", "X-Account-Container-Count"=>"7", "X-Account-Object-Count"=>"5"} To learn more about `Fog::Storage` request methods refer to [rdoc](http://rubydoc.info/gems/fog/Fog/Storage/Rackspace/Real). To learn more about Excon refer to [Excon GitHub repo](https://github.com/geemus/excon). @@ -217,7 +217,7 @@ Here is a summary of common model methods: destroy - Destroys object.
+ Destroys object.
Note: this is a non-blocking call and object deletion might not be instantaneous. @@ -276,7 +276,7 @@ This returns a `Fog::Storage::Rackspace::Directory` instance: bytes=434266, count=1, cdn_cname=nil - > + > ## Create Directory @@ -508,8 +508,8 @@ This returns a `Fog::Storage::Rackspace::Account` instance: container_count=13, bytes_used=2563554, object_count=5 - > - + > + ## Examples Example code using Cloud Files can be found [here](https://github.com/fog/fog/tree/master/lib/fog/rackspace/examples). diff --git a/lib/fog/rackspace/examples/README.md b/lib/fog/rackspace/examples/README.md index 2c39d6391..9f84fc990 100644 --- a/lib/fog/rackspace/examples/README.md +++ b/lib/fog/rackspace/examples/README.md @@ -22,7 +22,7 @@ For more information please refer to the [Getting Started with Fog and the Racks ## Credentials -Examples will prompt for Rackspace Open Cloud credentials. Prompts can be skipped by creating a `.fog` file in the user's home directory. This is an example of a `.fog` file for the Rackspace Open Cloud: +Examples will prompt for Rackspace Open Cloud credentials. Prompts can be skipped by creating a `.fog` file in the user's home directory. This is an example of a `.fog` file for the Rackspace Open Cloud: default: rackspace_username: RACKSPACE_USERNAME @@ -44,4 +44,4 @@ To execute scripts without `bundler`: Your feedback is appreciated! If you have specific issues with the **fog** SDK, developers should file an [issue via Github](https://github.com/fog/fog/issues). -For general feedback and support requests, send an email to: . \ No newline at end of file +For general feedback and support requests, send an email to: . diff --git a/lib/fog/rackspace/examples/auto_scale/add_policy.rb b/lib/fog/rackspace/examples/auto_scale/add_policy.rb index feafb8de4..c67680a92 100644 --- a/lib/fog/rackspace/examples/auto_scale/add_policy.rb +++ b/lib/fog/rackspace/examples/auto_scale/add_policy.rb @@ -65,4 +65,4 @@ change = get_user_input_as_int "Enter change increment" group.policies.create :name => policy_name, :cooldown => cooldown, :type => 'webhook', :change => change -puts "\nPolicy #{policy_name} was successfully added to group" \ No newline at end of file +puts "\nPolicy #{policy_name} was successfully added to group" diff --git a/lib/fog/rackspace/examples/auto_scale/delete_webhook.rb b/lib/fog/rackspace/examples/auto_scale/delete_webhook.rb index 7376ce441..afba4bf67 100644 --- a/lib/fog/rackspace/examples/auto_scale/delete_webhook.rb +++ b/lib/fog/rackspace/examples/auto_scale/delete_webhook.rb @@ -88,4 +88,4 @@ webhook = select_webhook(webhooks) # delete webhook webhook.destroy -puts "Webhook '#{webhook.name} was destroyed" \ No newline at end of file +puts "Webhook '#{webhook.name} was destroyed" diff --git a/lib/fog/rackspace/examples/block_storage/create_snapshot.rb b/lib/fog/rackspace/examples/block_storage/create_snapshot.rb index 426354e04..f435de5f0 100644 --- a/lib/fog/rackspace/examples/block_storage/create_snapshot.rb +++ b/lib/fog/rackspace/examples/block_storage/create_snapshot.rb @@ -12,7 +12,7 @@ end def select_server(servers) abort "\nThere are not any servers in the Chicago region. Try running create_server.rb\n\n" if servers.empty? - + puts "\nSelect Server For Volume Detachment:\n\n" servers.each_with_index do |server, i| puts "\t #{i}. #{server.name} [#{server.public_ip_address}]" @@ -24,7 +24,7 @@ end def select_attachment(attachments) abort "\nThis server does not contain any volumes in the Chicago region. Try running server_attachments.rb\n\n" if attachments.empty? - + puts "\nSelect Volume To Detach:\n\n" attachments.each_with_index do |attachment, i| puts "\t #{i}. #{attachment.device}" @@ -96,7 +96,7 @@ puts "Now Creating Snapshot #{snapshot_name}" snapshot = cbs_service.snapshots.create :display_name => snapshot_name, :volume_id => attachment.volume_id begin - # Check every 5 seconds to see if snapshot is in the available state (ready?). + # Check every 5 seconds to see if snapshot is in the available state (ready?). # If the available has not been built in 5 minutes (600 seconds) an exception will be raised. snapshot.wait_for(600, 5) do print "." diff --git a/lib/fog/rackspace/examples/block_storage/delete_volume.rb b/lib/fog/rackspace/examples/block_storage/delete_volume.rb index f94c11f89..5ad174e3d 100644 --- a/lib/fog/rackspace/examples/block_storage/delete_volume.rb +++ b/lib/fog/rackspace/examples/block_storage/delete_volume.rb @@ -12,7 +12,7 @@ end def select_volume(volumes) abort "\nThere are not any volumes to delete in the Chicago region. Try running create_volume.rb\n\n" if volumes.empty? - + puts "\nSelect Volume:\n\n" volumes.each_with_index do |volume, i| puts "\t #{i}. #{volume.display_name}" diff --git a/lib/fog/rackspace/examples/compute_v2/bootstrap_server.rb b/lib/fog/rackspace/examples/compute_v2/bootstrap_server.rb index 96c4885ec..942d0d8be 100644 --- a/lib/fog/rackspace/examples/compute_v2/bootstrap_server.rb +++ b/lib/fog/rackspace/examples/compute_v2/bootstrap_server.rb @@ -12,7 +12,7 @@ def get_user_input(prompt) gets.chomp end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -54,7 +54,7 @@ ssh_key = generate_ssh_key # reload flavor in order to retrieve all of its attributes flavor.reload -puts "\nNow creating server '#{server_name}' the following with specifications:\n" +puts "\nNow creating server '#{server_name}' the following with specifications:\n" puts "\t* #{flavor.ram} MB RAM" puts "\t* #{flavor.disk} GB" puts "\t* #{flavor.vcpus} CPU(s)" @@ -63,8 +63,8 @@ puts "\n" begin # bootstrap server - server = service.servers.bootstrap :name => server_name, - :flavor_id => flavor.id, + server = service.servers.bootstrap :name => server_name, + :flavor_id => flavor.id, :image_id => image.id, :private_key => ssh_key.private_key, :public_key => ssh_key.ssh_public_key @@ -85,12 +85,12 @@ begin else puts "An error occured, please try again" end - + rescue Fog::Errors::TimeoutError puts "[TIMEOUT]\n\n" - + puts "This server is currently #{server.progress}% into the build process and is taking longer to complete than expected." - puts "You can continute to monitor the build process through the web console at https://mycloud.rackspace.com/\n\n" + puts "You can continute to monitor the build process through the web console at https://mycloud.rackspace.com/\n\n" end puts "To delete the server please execute the delete_server.rb script\n\n" diff --git a/lib/fog/rackspace/examples/compute_v2/create_image.rb b/lib/fog/rackspace/examples/compute_v2/create_image.rb index 36a570375..2c93e2d16 100644 --- a/lib/fog/rackspace/examples/compute_v2/create_image.rb +++ b/lib/fog/rackspace/examples/compute_v2/create_image.rb @@ -17,12 +17,12 @@ def select_server(servers) servers.each_with_index do |server, i| puts "\t #{i}. #{server.name} [#{server.public_ip_address}]" end - + selected_str = get_user_input "\nEnter Server Number" servers[selected_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -54,7 +54,7 @@ image_name = get_user_input "Enter Image Name" # creates image for server server.create_image image_name - + puts "\nImage #{image_name} is being created for server #{server.name}.\n\n" puts "To delete the image please execute the delete_image.rb script\n\n" diff --git a/lib/fog/rackspace/examples/compute_v2/create_server.rb b/lib/fog/rackspace/examples/compute_v2/create_server.rb index 342507937..e6a2ba80d 100644 --- a/lib/fog/rackspace/examples/compute_v2/create_server.rb +++ b/lib/fog/rackspace/examples/compute_v2/create_server.rb @@ -11,7 +11,7 @@ def get_user_input(prompt) gets.chomp end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -42,8 +42,8 @@ image = service.images.find {|image| image.name =~ /Ubuntu/} server_name = get_user_input "\nEnter Server Name" # create server -server = service.servers.create :name => server_name, - :flavor_id => flavor.id, +server = service.servers.create :name => server_name, + :flavor_id => flavor.id, :image_id => image.id, :metadata => { 'fog_sample' => 'true'}, :personality => [{ @@ -54,7 +54,7 @@ server = service.servers.create :name => server_name, # reload flavor in order to retrieve all of its attributes flavor.reload -puts "\nNow creating server '#{server.name}' the following with specifications:\n" +puts "\nNow creating server '#{server.name}' the following with specifications:\n" puts "\t* #{flavor.ram} MB RAM" puts "\t* #{flavor.disk} GB" puts "\t* #{flavor.vcpus} CPU(s)" @@ -63,24 +63,24 @@ puts "\t* #{image.name}" puts "\n" begin - # Check every 5 seconds to see if server is in the active state (ready?). + # Check every 5 seconds to see if server is in the active state (ready?). # If the server has not been built in 5 minutes (600 seconds) an exception will be raised. server.wait_for(600, 5) do print "." STDOUT.flush ready? end - + puts "[DONE]\n\n" puts "The server has been successfully created, to login onto the server:\n\n" puts "\t ssh #{server.username}@#{server.public_ip_address}\n\n" - + rescue Fog::Errors::TimeoutError puts "[TIMEOUT]\n\n" - + puts "This server is currently #{server.progress}% into the build process and is taking longer to complete than expected." - puts "You can continute to monitor the build process through the web console at https://mycloud.rackspace.com/\n\n" + puts "You can continute to monitor the build process through the web console at https://mycloud.rackspace.com/\n\n" end puts "The #{server.username} password is #{server.password}\n\n" diff --git a/lib/fog/rackspace/examples/compute_v2/delete_image.rb b/lib/fog/rackspace/examples/compute_v2/delete_image.rb index c499118b6..0d9f3cc16 100644 --- a/lib/fog/rackspace/examples/compute_v2/delete_image.rb +++ b/lib/fog/rackspace/examples/compute_v2/delete_image.rb @@ -18,11 +18,11 @@ def select_image(snapshot_images) puts "\t #{i}. #{image.name}" end - delete_str = get_user_input "\nEnter Image Number" + delete_str = get_user_input "\nEnter Image Number" snapshot_images[delete_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -46,9 +46,9 @@ service = Fog::Compute.new({ # retrieve list of images images = service.images -# select all of the snapshot type images. base images are not user deletable +# select all of the snapshot type images. base images are not user deletable snapshot_images = images.select do |image| - image.metadata["image_type"] == "snapshot" + image.metadata["image_type"] == "snapshot" end # prompt user for image to delete diff --git a/lib/fog/rackspace/examples/compute_v2/delete_network.rb b/lib/fog/rackspace/examples/compute_v2/delete_network.rb index a5f8efd78..b2b4ee85d 100644 --- a/lib/fog/rackspace/examples/compute_v2/delete_network.rb +++ b/lib/fog/rackspace/examples/compute_v2/delete_network.rb @@ -75,4 +75,4 @@ wait_for_server_deletion(server) network = service.networks.find {|n| n.label == 'my_private_net'} delete_network(network) -puts "The network '#{network.label}' has been successfully deleted" \ No newline at end of file +puts "The network '#{network.label}' has been successfully deleted" diff --git a/lib/fog/rackspace/examples/compute_v2/delete_server.rb b/lib/fog/rackspace/examples/compute_v2/delete_server.rb index f5177e45f..0d21ab36e 100644 --- a/lib/fog/rackspace/examples/compute_v2/delete_server.rb +++ b/lib/fog/rackspace/examples/compute_v2/delete_server.rb @@ -22,7 +22,7 @@ def select_server(servers) servers[delete_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") diff --git a/lib/fog/rackspace/examples/compute_v2/detach_volume.rb b/lib/fog/rackspace/examples/compute_v2/detach_volume.rb index 877a5985d..763275578 100644 --- a/lib/fog/rackspace/examples/compute_v2/detach_volume.rb +++ b/lib/fog/rackspace/examples/compute_v2/detach_volume.rb @@ -34,7 +34,7 @@ def select_attachment(attachments) attachments[delete_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -81,13 +81,13 @@ puts "\n" delete_confirm = get_user_input "Would You Like To Destroy Volume #{volume.display_name} (y/n)" if delete_confirm.downcase == 'y' # wait for server to finish detaching before attempting to delete - volume.wait_for(600) do + volume.wait_for(600) do print "." STDOUT.flush ready? && attachments.empty? end - + volume.destroy - + puts "\n\nThe Volume Has been Destroyed" end diff --git a/lib/fog/rackspace/examples/compute_v2/resize_server.rb b/lib/fog/rackspace/examples/compute_v2/resize_server.rb index f625a28ba..4b9b06532 100644 --- a/lib/fog/rackspace/examples/compute_v2/resize_server.rb +++ b/lib/fog/rackspace/examples/compute_v2/resize_server.rb @@ -10,7 +10,7 @@ def get_user_input(prompt) gets.chomp end -def select_flavor(flavors, server) +def select_flavor(flavors, server) puts "\nSelect New Flavor Size:\n\n" flavors.each_with_index do |flavor, i| next if server.flavor_id == flavor.id @@ -33,7 +33,7 @@ def select_server(servers) servers[selected_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -72,10 +72,10 @@ server.resize selected_flavor.id puts "\n" # wait for the resize process to start -server.wait_for { ready?('RESIZE') } +server.wait_for { ready?('RESIZE') } begin - # Check every 5 seconds to see if server is in the VERIFY_RESIZE state. + # Check every 5 seconds to see if server is in the VERIFY_RESIZE state. # If the server has not been built in 5 minutes (600 seconds) an exception will be raised. server.wait_for(1200, 5) do print "." @@ -83,7 +83,7 @@ begin ready?('VERIFY_RESIZE', ['ACTIVE', 'ERROR']) end puts "[DONE]\n\n" - + puts "Server Has Been Successfully Resized!" action = get_user_input "Press 'C' To Confirm Or 'R' to Revert Resize (R/C)" @@ -97,10 +97,10 @@ begin else puts "\nUnrecognized Input. Exiting." end - + rescue Fog::Errors::TimeoutError puts "[TIMEOUT]\n\n" - + puts "This server is currently #{server.progress}% into the resize process and is taking longer to complete than expected." - puts "You can continute to monitor the build process through the web console at https://mycloud.rackspace.com/\n\n" + puts "You can continute to monitor the build process through the web console at https://mycloud.rackspace.com/\n\n" end diff --git a/lib/fog/rackspace/examples/compute_v2/server_attachments.rb b/lib/fog/rackspace/examples/compute_v2/server_attachments.rb index 10174ff1f..041e7cedb 100644 --- a/lib/fog/rackspace/examples/compute_v2/server_attachments.rb +++ b/lib/fog/rackspace/examples/compute_v2/server_attachments.rb @@ -22,7 +22,7 @@ def select_server(servers) servers[delete_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") diff --git a/lib/fog/rackspace/examples/compute_v2/server_metadata.rb b/lib/fog/rackspace/examples/compute_v2/server_metadata.rb index 27fed6891..a79deb0a1 100644 --- a/lib/fog/rackspace/examples/compute_v2/server_metadata.rb +++ b/lib/fog/rackspace/examples/compute_v2/server_metadata.rb @@ -5,7 +5,7 @@ require 'rubygems' #required for Ruby 1.8.x require './lib/fog' -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -40,13 +40,13 @@ flavor = service.flavors.first image = service.images.find {|image| image.name =~ /Ubuntu/} #create server -server = service.servers.create :name => 'meta-cumulus', - :flavor_id => flavor.id, +server = service.servers.create :name => 'meta-cumulus', + :flavor_id => flavor.id, :image_id => image.id, :metadata => { 'color' => 'red'} puts "Waiting for server to be created\n" -server.wait_for(600, 5) do +server.wait_for(600, 5) do print "." STDOUT.flush ready? diff --git a/lib/fog/rackspace/examples/queues/list_messages.rb b/lib/fog/rackspace/examples/queues/list_messages.rb index a451d30c6..ce485520b 100644 --- a/lib/fog/rackspace/examples/queues/list_messages.rb +++ b/lib/fog/rackspace/examples/queues/list_messages.rb @@ -61,4 +61,4 @@ puts "\n\nThe following messages are in the '#{queue.name}' queue:\n\n" queue.messages.each do |message| puts message.inspect -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/examples/storage/create_cdn_directory.rb b/lib/fog/rackspace/examples/storage/create_cdn_directory.rb index 6cd407128..9cbd0e745 100644 --- a/lib/fog/rackspace/examples/storage/create_cdn_directory.rb +++ b/lib/fog/rackspace/examples/storage/create_cdn_directory.rb @@ -10,7 +10,7 @@ def get_user_input(prompt) gets.chomp end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -29,7 +29,7 @@ service = Fog::Storage.new({ :rackspace_api_key => rackspace_api_key, :rackspace_region => :ord #Use Chicago Region }) - + # prompt for directory name directory_name = get_user_input "\nEnter name of directory to create" @@ -41,4 +41,4 @@ directory.reload puts "\nDirectory #{directory.key} was created." puts "To delete the container please execute the delete_directory.rb script\n\n" - + diff --git a/lib/fog/rackspace/examples/storage/create_private_directory.rb b/lib/fog/rackspace/examples/storage/create_private_directory.rb index 951cf0e93..439f59751 100644 --- a/lib/fog/rackspace/examples/storage/create_private_directory.rb +++ b/lib/fog/rackspace/examples/storage/create_private_directory.rb @@ -10,7 +10,7 @@ def get_user_input(prompt) gets.chomp end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -29,8 +29,8 @@ service = Fog::Storage.new({ :rackspace_api_key => rackspace_api_key, :rackspace_region => :ord #Use Chicago Region }) - - + + # prompt for directory name directory_name = get_user_input "\nEnter name of directory to create" @@ -42,5 +42,5 @@ directory.reload puts "\n Directory #{directory.key} was created." puts "To delete the container please execute the delete_directory.rb script\n\n" - - \ No newline at end of file + + diff --git a/lib/fog/rackspace/examples/storage/delete_directory.rb b/lib/fog/rackspace/examples/storage/delete_directory.rb index 1d96a179d..507310a7a 100644 --- a/lib/fog/rackspace/examples/storage/delete_directory.rb +++ b/lib/fog/rackspace/examples/storage/delete_directory.rb @@ -22,7 +22,7 @@ def select_directory(directories) directories[delete_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -41,17 +41,17 @@ service = Fog::Storage.new({ :rackspace_api_key => rackspace_api_key, :rackspace_region => :ord #Use Chicago Region }) - -# retrieve directories + +# retrieve directories directories = service.directories - + # prompt for directory directory = select_directory(directories) puts "\nNow deleting #{directory.key}" # delete files if necessary -directory.files.each do |f| +directory.files.each do |f| puts "\tDeleting file #{f.key}" f.destroy end @@ -59,4 +59,4 @@ end # delete directory directory.destroy -puts "\tDone\n\n" +puts "\tDone\n\n" diff --git a/lib/fog/rackspace/examples/storage/delete_file.rb b/lib/fog/rackspace/examples/storage/delete_file.rb index c8ebff166..56c67db46 100644 --- a/lib/fog/rackspace/examples/storage/delete_file.rb +++ b/lib/fog/rackspace/examples/storage/delete_file.rb @@ -32,7 +32,7 @@ def select_file(files) files[delete_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -51,10 +51,10 @@ service = Fog::Storage.new({ :rackspace_api_key => rackspace_api_key, :rackspace_region => :ord #Use Chicago Region }) - + # retrieve directories with files directories = service.directories.select {|s| s.count > 0} - + # prompt for directory directory = select_directory(directories) diff --git a/lib/fog/rackspace/examples/storage/download_file.rb b/lib/fog/rackspace/examples/storage/download_file.rb index b2fa1af9b..f96f4b14a 100644 --- a/lib/fog/rackspace/examples/storage/download_file.rb +++ b/lib/fog/rackspace/examples/storage/download_file.rb @@ -32,7 +32,7 @@ def select_file(files) files[delete_str.to_i] end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -51,10 +51,10 @@ service = Fog::Storage.new({ :rackspace_api_key => rackspace_api_key, :rackspace_region => :ord #Use Chicago Region }) - + # retrieve directories with files directories = service.directories.select {|s| s.count > 0} - + # prompt for directory directory = select_directory(directories) diff --git a/lib/fog/rackspace/examples/storage/lorem.txt b/lib/fog/rackspace/examples/storage/lorem.txt index e8b7adfc7..cee7a927c 100644 --- a/lib/fog/rackspace/examples/storage/lorem.txt +++ b/lib/fog/rackspace/examples/storage/lorem.txt @@ -1 +1 @@ -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. diff --git a/lib/fog/rackspace/examples/storage/storage_metadata.rb b/lib/fog/rackspace/examples/storage/storage_metadata.rb index aeac0a579..698867b5b 100644 --- a/lib/fog/rackspace/examples/storage/storage_metadata.rb +++ b/lib/fog/rackspace/examples/storage/storage_metadata.rb @@ -5,7 +5,7 @@ require 'rubygems' #required for Ruby 1.8.x require 'fog' -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -31,14 +31,14 @@ service = Fog::Storage.new({ :rackspace_api_key => rackspace_api_key, :rackspace_region => :ord #Use Chicago Region }) - + # create directory puts "Creating directory 'metadata-tester'" directory = service.directories.create :key => "metadata-tester" # initial metadata -puts "Initial Container Metadata\n" +puts "Initial Container Metadata\n" print_metadata directory # adding metadata @@ -59,7 +59,7 @@ upload_file = File.join(File.dirname(__FILE__), "lorem.txt") file = directory.files.create :key => 'sample.txt', :body => File.open(upload_file, "r") # initial metadata -puts "Initial File Metadata\n" +puts "Initial File Metadata\n" print_metadata file # adding metadata diff --git a/lib/fog/rackspace/examples/storage/upload_file.rb b/lib/fog/rackspace/examples/storage/upload_file.rb index 86fd3c785..6ccb8baf2 100644 --- a/lib/fog/rackspace/examples/storage/upload_file.rb +++ b/lib/fog/rackspace/examples/storage/upload_file.rb @@ -10,7 +10,7 @@ def get_user_input(prompt) gets.chomp end -# Use username defined in ~/.fog file, if absent prompt for username. +# Use username defined in ~/.fog file, if absent prompt for username. # For more details on ~/.fog refer to http://fog.io/about/getting_started.html def rackspace_username Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username") @@ -29,7 +29,7 @@ service = Fog::Storage.new({ :rackspace_api_key => rackspace_api_key, :rackspace_region => :ord #Use Chicago Region }) - + # prompt for directory name directory_name = get_user_input "\nEnter name of directory to create" @@ -42,4 +42,4 @@ file = directory.files.create :key => 'sample.txt', :body => File.open(upload_fi puts "You should be able to view this file via CDN at #{file.public_url}" puts "To delete the container and associated file please execute the delete_directory.rb script\n\n" - + diff --git a/lib/fog/rackspace/examples/storage/upload_large_files.rb b/lib/fog/rackspace/examples/storage/upload_large_files.rb index 4f452cf51..29d5a69f5 100644 --- a/lib/fog/rackspace/examples/storage/upload_large_files.rb +++ b/lib/fog/rackspace/examples/storage/upload_large_files.rb @@ -100,4 +100,4 @@ You should now be able to download #{segment_name} from the cloud control panel end end -NOTE \ No newline at end of file +NOTE diff --git a/lib/fog/rackspace/identity.rb b/lib/fog/rackspace/identity.rb index 742c8deb5..798d18ff6 100644 --- a/lib/fog/rackspace/identity.rb +++ b/lib/fog/rackspace/identity.rb @@ -71,7 +71,7 @@ module Fog class Real < Fog::Rackspace::Service include Common - + def initialize(options={}) apply_options(options) @connection = Fog::Connection.new(@uri.to_s, @persistent, @connection_options) diff --git a/lib/fog/rackspace/mock_data.rb b/lib/fog/rackspace/mock_data.rb index 140f5519f..060a38fc6 100644 --- a/lib/fog/rackspace/mock_data.rb +++ b/lib/fog/rackspace/mock_data.rb @@ -1,9 +1,9 @@ module Fog module Rackspace module MockData - + NOT_FOUND_ID = "NOT-FOUND" - + def data @@data ||= Hash.new do |hash, key| hash[key] = begin @@ -194,7 +194,7 @@ module Fog #Autoscale :autoscale_groups => {} } - + # seed with initial data mock_data[:flavors][flavor_id] = flavor mock_data[:images][image_id] = image diff --git a/lib/fog/rackspace/models/auto_scale/group.rb b/lib/fog/rackspace/models/auto_scale/group.rb index bb5a93407..eb5ef721a 100644 --- a/lib/fog/rackspace/models/auto_scale/group.rb +++ b/lib/fog/rackspace/models/auto_scale/group.rb @@ -7,7 +7,7 @@ module Fog module Rackspace class AutoScale class Group < Fog::Model - + # @!attribute [r] id # @return [String] The autoscale group's id identity :id @@ -16,8 +16,8 @@ module Fog # @return [Array] group links. attribute :links - # Gets the group configuration for this autoscale group. The configuration describes the - # minimum number of entities in the group, the maximum number of entities in the group, + # Gets the group configuration for this autoscale group. The configuration describes the + # minimum number of entities in the group, the maximum number of entities in the group, # the global cooldown time for the group, and other metadata. # # @return [Fog::Rackspace::AutoScale::GroupConfiguration] group_config if found @@ -47,8 +47,8 @@ module Fog end end - # Gets the launch configuration for this autoscale group. The launch configuration describes - # the details of how to create a server, from what image to create a server, which load balancers + # Gets the launch configuration for this autoscale group. The launch configuration describes + # the details of how to create a server, from what image to create a server, which load balancers # to join the server to, which networks to add the server to, and other metadata. # # @return [Fog::Rackspace::AutoScale::LaunchConfiguration] group_config if found @@ -78,8 +78,8 @@ module Fog end end - # For the specified autoscaling group, this operation returns a list of the scaling policies - # that are available to the group. Each policy is described in terms of an ID, name, type, + # For the specified autoscaling group, this operation returns a list of the scaling policies + # that are available to the group. Each policy is described in terms of an ID, name, type, # adjustment, cooldown time, and links. # # @return [Fog::Rackspace::AutoScale::Policies] policies @@ -91,7 +91,7 @@ module Fog # Creates group # * requires attributes: :launch_config, :group_config, :policies - # + # # @return [Boolean] returns true if group is being created # # @raise [Fog::Rackspace::AutoScale:::NotFound] - HTTP 404 @@ -100,7 +100,7 @@ module Fog # @raise [Fog::Rackspace::AutoScale:::ServiceError] # # @see Groups#create - # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/POST_createGroup_v1.0__tenantId__groups_Groups.html + # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/POST_createGroup_v1.0__tenantId__groups_Groups.html def save requires :launch_config, :group_config, :policies raise Fog::Errors::Error.new("You should update launch_config and group_config directly") if persisted? @@ -111,7 +111,7 @@ module Fog } group_config_hash = { 'name' => group_config.name, - 'cooldown' => group_config.cooldown, + 'cooldown' => group_config.cooldown, 'maxEntities' => group_config.max_entities, 'minEntities' => group_config.min_entities } @@ -155,7 +155,7 @@ module Fog end # This operation pauses all execution of autoscaling policies. - # + # # @note NOT IMPLEMENTED YET # @return [Boolean] returns true if paused # @@ -172,7 +172,7 @@ module Fog end # This operation resumes all execution of autoscaling policies. - # + # # @note NOT IMPLEMENTED YET # @return [Boolean] returns true if resumed # @@ -204,4 +204,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/auto_scale/group_builder.rb b/lib/fog/rackspace/models/auto_scale/group_builder.rb index bdaf231bb..905cdd0d5 100644 --- a/lib/fog/rackspace/models/auto_scale/group_builder.rb +++ b/lib/fog/rackspace/models/auto_scale/group_builder.rb @@ -82,4 +82,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/auto_scale/group_config.rb b/lib/fog/rackspace/models/auto_scale/group_config.rb index 700cd2735..88553fe93 100644 --- a/lib/fog/rackspace/models/auto_scale/group_config.rb +++ b/lib/fog/rackspace/models/auto_scale/group_config.rb @@ -10,7 +10,7 @@ module Fog attribute :group # @!attribute [r] name - # @return [String] The name of the group + # @return [String] The name of the group attribute :name # @!attribute [r] cooldown @@ -40,7 +40,7 @@ module Fog # # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/PUT_putGroupConfig_v1.0__tenantId__groups__groupId__config_Configurations.html def update - + options = {} options['name'] = name unless name.nil? options['cooldown'] = cooldown unless cooldown.nil? @@ -76,4 +76,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/auto_scale/groups.rb b/lib/fog/rackspace/models/auto_scale/groups.rb index ff87da1d0..5fe9ea987 100644 --- a/lib/fog/rackspace/models/auto_scale/groups.rb +++ b/lib/fog/rackspace/models/auto_scale/groups.rb @@ -16,7 +16,7 @@ module Fog # @raise [Fog::Rackspace::AutoScale:::BadRequest] - HTTP 400 # @raise [Fog::Rackspace::AutoScale:::InternalServerError] - HTTP 500 # @raise [Fog::Rackspace::AutoScale:::ServiceError] - # + # # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/GET_getGroups_v1.0__tenantId__groups_Groups.html def all data = service.list_groups.body['groups'] @@ -32,9 +32,9 @@ module Fog # @raise [Fog::Rackspace::AutoScale:::BadRequest] - HTTP 400 # @raise [Fog::Rackspace::AutoScale:::InternalServerError] - HTTP 500 # @raise [Fog::Rackspace::AutoScale:::ServiceError] - # + # # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/GET_getGroupManifest_v1.0__tenantId__groups__groupId__Groups.html - def get(group_id) + def get(group_id) data = service.get_group(group_id).body['group'] new(data) rescue Fog::Rackspace::AutoScale::NotFound diff --git a/lib/fog/rackspace/models/auto_scale/launch_config.rb b/lib/fog/rackspace/models/auto_scale/launch_config.rb index 37e775816..23871d5ba 100644 --- a/lib/fog/rackspace/models/auto_scale/launch_config.rb +++ b/lib/fog/rackspace/models/auto_scale/launch_config.rb @@ -28,7 +28,7 @@ module Fog # # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/PUT_putLaunchConfig_v1.0__tenantId__groups__groupId__launch_Configurations.html def update - + options = {} options['type'] = type unless type.nil? options['args'] = args unless args.nil? @@ -61,4 +61,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/auto_scale/policies.rb b/lib/fog/rackspace/models/auto_scale/policies.rb index 975e02167..5f77f2b8f 100644 --- a/lib/fog/rackspace/models/auto_scale/policies.rb +++ b/lib/fog/rackspace/models/auto_scale/policies.rb @@ -18,7 +18,7 @@ module Fog # @raise [Fog::Rackspace::AutoScale:::BadRequest] - HTTP 400 # @raise [Fog::Rackspace::AutoScale:::InternalServerError] - HTTP 500 # @raise [Fog::Rackspace::AutoScale:::ServiceError] - # + # # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/GET_getPolicies_v1.0__tenantId__groups__groupId__policies_Policies.html def all data = service.list_policies(group.id).body['policies'] @@ -34,7 +34,7 @@ module Fog # @raise [Fog::Rackspace::AutoScale:::BadRequest] - HTTP 400 # @raise [Fog::Rackspace::AutoScale:::InternalServerError] - HTTP 500 # @raise [Fog::Rackspace::AutoScale:::ServiceError] - # + # # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/GET_getPolicy_v1.0__tenantId__groups__groupId__policies__policyId__Policies.html def get(policy_id) data = service.get_policy(group.id, policy_id).body['policy'] @@ -51,7 +51,7 @@ module Fog # @raise [Fog::Rackspace::AutoScale:::BadRequest] - HTTP 400 # @raise [Fog::Rackspace::AutoScale:::InternalServerError] - HTTP 500 # @raise [Fog::Rackspace::AutoScale:::ServiceError] - # + # # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/POST_createPolicies_v1.0__tenantId__groups__groupId__policies_Policies.html def create(attributes = {}) super(attributes) @@ -64,4 +64,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/auto_scale/policy.rb b/lib/fog/rackspace/models/auto_scale/policy.rb index 06772b555..56d8d625d 100644 --- a/lib/fog/rackspace/models/auto_scale/policy.rb +++ b/lib/fog/rackspace/models/auto_scale/policy.rb @@ -7,7 +7,7 @@ module Fog class Policy < Fog::Model # @!attribute [r] id - # @return [String] The policy id + # @return [String] The policy id identity :id # @!attribute [r] group @@ -90,7 +90,7 @@ module Fog # Creates policy # * requires attributes: :name, :type, :cooldown - # + # # @return [Boolean] returns true if policy is being created # # @raise [Fog::Rackspace::AutoScale:::NotFound] - HTTP 404 @@ -219,4 +219,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/auto_scale/webhook.rb b/lib/fog/rackspace/models/auto_scale/webhook.rb index a08029e83..8da6e53b3 100644 --- a/lib/fog/rackspace/models/auto_scale/webhook.rb +++ b/lib/fog/rackspace/models/auto_scale/webhook.rb @@ -6,13 +6,13 @@ module Fog class Webhook < Fog::Model # @!attribute [r] id - # @return [String] The webhook id + # @return [String] The webhook id identity :id # @!attribute [r] group # @return [String] The associated group attribute :group - + # @!attribute [r] policy # @return [String] The associated policy attribute :policy @@ -31,7 +31,7 @@ module Fog # Create webhook # * requires attribute: :name - # + # # @return [Boolean] returns true if webhook is being created # # @raise [Fog::Rackspace::AutoScale:::NotFound] - HTTP 404 @@ -40,7 +40,7 @@ module Fog # @raise [Fog::Rackspace::AutoScale:::ServiceError] # # @see Webhooks#create - # @see + # @see def create requires :name @@ -108,11 +108,11 @@ module Fog # @return [String] the URL def execution_url requires :links - link = links.find { |l| l['rel'] == 'capability' } + link = links.find { |l| l['rel'] == 'capability' } link['href'] rescue nil end end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/auto_scale/webhooks.rb b/lib/fog/rackspace/models/auto_scale/webhooks.rb index d7b8638e8..c1c166268 100644 --- a/lib/fog/rackspace/models/auto_scale/webhooks.rb +++ b/lib/fog/rackspace/models/auto_scale/webhooks.rb @@ -33,7 +33,7 @@ module Fog # @raise [Fog::Rackspace::AutoScale:::BadRequest] - HTTP 400 # @raise [Fog::Rackspace::AutoScale:::InternalServerError] - HTTP 500 # @raise [Fog::Rackspace::AutoScale:::ServiceError] - # + # # @see http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/GET_getWebhook_v1.0__tenantId__groups__groupId__policies__policyId__webhooks__webhookId__Webhooks.html def get(webhook_id) data = service.get_webhook(group.id, policy.id, webhook_id).body['webhook'] @@ -60,4 +60,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/compute_v2/attachment.rb b/lib/fog/rackspace/models/compute_v2/attachment.rb index 89e1a0dc2..4bdb8baab 100644 --- a/lib/fog/rackspace/models/compute_v2/attachment.rb +++ b/lib/fog/rackspace/models/compute_v2/attachment.rb @@ -4,17 +4,17 @@ module Fog module Compute class RackspaceV2 class Attachment < Fog::Model - + # @!attribute [r] server_id - # @return [String] The server id + # @return [String] The server id attribute :server_id, :aliases => 'serverId' - + # @!attribute [r] volume_id - # @return [String] The volume id + # @return [String] The volume id attribute :volume_id, :aliases => 'volumeId' - + # @!attribute [r] device - # @return [String]device name of the device /dev/xvd[a-p] + # @return [String]device name of the device /dev/xvd[a-p] attribute :device def initialize(new_attributes = {}) @@ -22,8 +22,8 @@ module Fog server_id = server.id if server #server id should come from collection self end - - # Attaches volume to volume to server. + + # Attaches volume to volume to server. # Requires :server_id, :volume_id, and device to be populated # @return [Boolean] true if volume is attaching # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 @@ -51,7 +51,7 @@ module Fog true end alias :detach :destroy - + private def server collection.server diff --git a/lib/fog/rackspace/models/compute_v2/flavor.rb b/lib/fog/rackspace/models/compute_v2/flavor.rb index a03422db2..538a0607d 100644 --- a/lib/fog/rackspace/models/compute_v2/flavor.rb +++ b/lib/fog/rackspace/models/compute_v2/flavor.rb @@ -4,28 +4,28 @@ module Fog module Compute class RackspaceV2 class Flavor < Fog::Model - + # @!attribute [r] id # @return [String] The flavor id identity :id - + # @!attribute [r] name # @return [String] flavor name attribute :name - + # @!attribute [r] rame - # @return [Fixnum] ram in MB + # @return [Fixnum] ram in MB attribute :ram - + # @!attribute [r] disk - # @return [String] disk space in GB + # @return [String] disk space in GB attribute :disk - + # @!attribute [r] vcpus - # @return [Fixnum] number of virtual CPUs + # @return [Fixnum] number of virtual CPUs attribute :vcpus - + # @!attribute [r] links # @return [Array] flavor links. attribute :links diff --git a/lib/fog/rackspace/models/compute_v2/flavors.rb b/lib/fog/rackspace/models/compute_v2/flavors.rb index bebf3e938..9c6f5a763 100644 --- a/lib/fog/rackspace/models/compute_v2/flavors.rb +++ b/lib/fog/rackspace/models/compute_v2/flavors.rb @@ -28,7 +28,7 @@ module Fog # @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500 # @raise [Fog::Compute::RackspaceV2::ServiceError] # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Flavor_Details-d1e4317.html - def get(flavor_id) + def get(flavor_id) data = service.get_flavor(flavor_id).body['flavor'] new(data) rescue Fog::Compute::RackspaceV2::NotFound diff --git a/lib/fog/rackspace/models/compute_v2/image.rb b/lib/fog/rackspace/models/compute_v2/image.rb index 03e90c5ae..74e98a25b 100644 --- a/lib/fog/rackspace/models/compute_v2/image.rb +++ b/lib/fog/rackspace/models/compute_v2/image.rb @@ -17,59 +17,59 @@ module Fog # @!attribute [r] name # @return [String] The image name. attribute :name - - # @!attribute [r] created - # @return [String] The time stamp for the creation date. + + # @!attribute [r] created + # @return [String] The time stamp for the creation date. attribute :created - + # @!attribute [r] updated - # @return [String] The time stamp for the last update. + # @return [String] The time stamp for the last update. attribute :updated - + # @!attribute [r] state - # @return [String] image status. + # @return [String] image status. attribute :state, :aliases => 'status' # @!attribute [r] user_id - # @return [String] The user Id. + # @return [String] The user Id. attribute :user_id - + # @!attribute [r] tenant_id - # @return [String] The tenant Id. + # @return [String] The tenant Id. attribute :tenant_id - + # @!attribute [r] progress - # @return [Fixnum] The build completion progress, as a percentage. Value is from 0 to 100. + # @return [Fixnum] The build completion progress, as a percentage. Value is from 0 to 100. attribute :progress - + attribute :minDisk attribute :minRam - + # @!attribute [rw] disk_config # @return [String] The disk configuration value. # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_extensions.html#diskconfig_attribute - # + # # The disk configuration value. - # * AUTO - The server is built with a single partition the size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. - # This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3 file system. + # * AUTO - The server is built with a single partition the size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. + # This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3 file system. # This is the default setting for applicable Rackspace base images. # - # * MANUAL - The server is built using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, - # the remaining disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, - # and so on, and enables you to manage the disk configuration. + # * MANUAL - The server is built using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, + # the remaining disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, + # and so on, and enables you to manage the disk configuration. attribute :disk_config, :aliases => 'OS-DCF:diskConfig' # @!attribute [r] links # @return [Array] image links. attribute :links - + def initialize(attributes={}) @service = attributes[:service] super end - + # Image metadata - # @return [Fog::Compute::RackspaceV2::Metadata] Collection of Fog::Compute::RackspaceV2::Metadatum objects containing metadata key value pairs. + # @return [Fog::Compute::RackspaceV2::Metadata] Collection of Fog::Compute::RackspaceV2::Metadatum objects containing metadata key value pairs. def metadata @metadata ||= begin Fog::Compute::RackspaceV2::Metadata.new({ @@ -78,7 +78,7 @@ module Fog }) end end - + # Set server metadata # @param [Hash] hash contains key value pairs def metadata=(hash={}) @@ -101,7 +101,7 @@ module Fog end state == ready_state end - + # Destroy image # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 diff --git a/lib/fog/rackspace/models/compute_v2/images.rb b/lib/fog/rackspace/models/compute_v2/images.rb index 24ba0814c..9dcacf39b 100644 --- a/lib/fog/rackspace/models/compute_v2/images.rb +++ b/lib/fog/rackspace/models/compute_v2/images.rb @@ -5,34 +5,34 @@ module Fog module Compute class RackspaceV2 class Images < Fog::Collection - + # @!attribute [rw] name # @return [String] Given a string value x, filters the list of images by image name. attribute :name - + # @!attribute [rw] status # @return [String] Given a string value x, filters the list of images by status. # @note Possible values are ACTIVE, DELETED, ERROR, SAVING, and UNKNOWN. attribute :status - + # @!attribute [rw] marker # @return [String] Given a string value x, return object names greater in value than the specified marker. # @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/List_Large_Number_of_Objects-d1e1521.html attribute :marker - + # @!attribute [rw] limit # @return [Integer] For an integer value n, limits the number of results to at most n values. # @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/List_Large_Number_of_Objects-d1e1521.html attribute :limit - + # @!attribute [rw] type - # @return [String] Given a string value x, filters the list of images by type. + # @return [String] Given a string value x, filters the list of images by type. # @note Valid values are BASE and SNAPSHOT attribute :type model Fog::Compute::RackspaceV2::Image - # Returns list of images + # Returns list of images # @return [Fog::Compute::RackspaceV2::Images] Retrieves a list images. # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 # @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400 diff --git a/lib/fog/rackspace/models/compute_v2/meta_parent.rb b/lib/fog/rackspace/models/compute_v2/meta_parent.rb index db139cf1e..4c996abe8 100644 --- a/lib/fog/rackspace/models/compute_v2/meta_parent.rb +++ b/lib/fog/rackspace/models/compute_v2/meta_parent.rb @@ -3,7 +3,7 @@ module Fog class RackspaceV2 module MetaParent - # Parent of metadata + # Parent of metadata # @return [#parent] parent of metadata def parent @parent diff --git a/lib/fog/rackspace/models/compute_v2/metadata.rb b/lib/fog/rackspace/models/compute_v2/metadata.rb index 2508cef15..ac2d057b0 100644 --- a/lib/fog/rackspace/models/compute_v2/metadata.rb +++ b/lib/fog/rackspace/models/compute_v2/metadata.rb @@ -36,18 +36,18 @@ module Fog # @raise [Fog::Compute::RackspaceV2::ServiceError] def get(key) requires :parent - data = service.get_metadata_item(collection_name, parent.id, key).body["meta"] + data = service.get_metadata_item(collection_name, parent.id, key).body["meta"] datum = data.first new(:key => datum[0], :value => datum[1]) rescue Fog::Compute::RackspaceV2::NotFound - nil + nil end - + # Retrieve specific value for key from Metadata. # * If key is of type String, this method will return the value of the metadatum # * If key is of type Fixnum, this method will return a Fog::Compute::RackspaceV2::Metadatum object (legacy) # @param [#key] key - # @return [#value] + # @return [#value] def [](key) return super(key) if key.is_a?(Integer) return nil unless key @@ -59,9 +59,9 @@ module Fog # * If key is of type String, this method will set/add the value to Metadata # * If key is of type Fixnum, this method will set a Fog::Compute::RackspaceV2::Metadatum object (legacy) # @param [#key] key - # @return [String] + # @return [String] def []=(key, value) - return super(key,value) if key.is_a?(Integer) + return super(key,value) if key.is_a?(Integer) return nil unless key datum = self.find {|datum| datum.key == key || datum.key == key.to_sym } if datum @@ -71,7 +71,7 @@ module Fog end value end - + # Saves the current metadata on server # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 # @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400 @@ -79,7 +79,7 @@ module Fog # @raise [Fog::Compute::RackspaceV2::ServiceError] def save requires :parent - service.set_metadata(collection_name, parent.id, to_hash) + service.set_metadata(collection_name, parent.id, to_hash) end # Creates new metadata @@ -96,7 +96,7 @@ module Fog hash.each_pair {|k,v| metas << {:key => k, :value => v} } load(metas) end - + # Converts metadata object to hash # @return [Hash] hash of metadata key value pairs def to_hash diff --git a/lib/fog/rackspace/models/compute_v2/server.rb b/lib/fog/rackspace/models/compute_v2/server.rb index a63742fb3..e339007ba 100644 --- a/lib/fog/rackspace/models/compute_v2/server.rb +++ b/lib/fog/rackspace/models/compute_v2/server.rb @@ -30,31 +30,31 @@ module Fog # @!attribute [rw] name # @return [String] The server name. attribute :name - - # @!attribute [r] created + + # @!attribute [r] created # @return [String] The time stamp for the creation date. attribute :created - + # @!attribute [r] updated # @return [String] The time stamp for the last update. attribute :updated - + # @!attribute [r] host Id # The host Id. - # The compute provisioning algorithm has an anti-affinity property that attempts to spread customer VMs across hosts. - # Under certain situations, VMs from the same customer might be placed on the same host. + # The compute provisioning algorithm has an anti-affinity property that attempts to spread customer VMs across hosts. + # Under certain situations, VMs from the same customer might be placed on the same host. # hostId represents the host your server runs on and can be used to determine this scenario if it is relevant to your application. - # HostId is unique per account and is not globally unique. - # @return [String] host id. + # HostId is unique per account and is not globally unique. + # @return [String] host id. attribute :host_id, :aliases => 'hostId' # @!attribute [r] state - # @return [String] server status. + # @return [String] server status. # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Servers-d1e2078.html#server_status attribute :state, :aliases => 'status' # @!attribute [r] state_ext - # @return [String] server (extended) status. + # @return [String] server (extended) status. # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Servers-d1e2078.html#server_status attribute :state_ext, :aliases => 'OS-EXT-STS:task_state' @@ -65,15 +65,15 @@ module Fog # @!attribute [r] user_id # @return [String] The user Id. attribute :user_id - + # @!attribute [r] tenant_id # @return [String] The tenant Id. attribute :tenant_id - + # @!attribute [r] links # @return [Array] Server links. attribute :links - + # @!attribute [rw] personality # @note This attribute is only used for server creation. This field will be nil on subsequent retrievals. # @return [Hash] Hash containing data to inject into the file system of the cloud server instance during server creation. @@ -84,30 +84,30 @@ module Fog # @see #create # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Personality-d1e2543.html attribute :personality - + # @!attribute [rw] ipv4_address # @return [String] The public IP version 4 access address. - # @note This field will populate once the server is ready to use. + # @note This field will populate once the server is ready to use. # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Primary_Addresses-d1e2558.html attribute :ipv4_address, :aliases => 'accessIPv4' - + # @!attribute [rw] ipv6_address # @return [String] The public IP version 6 access address. # @note This field will populate once the server is ready to use. - # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Primary_Addresses-d1e2558.html + # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Primary_Addresses-d1e2558.html attribute :ipv6_address, :aliases => 'accessIPv6' - + # @!attribute [rw] disk_config # @return [String] The disk configuration value. # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_extensions.html#diskconfig_attribute - # + # # The disk configuration value. - # * AUTO - The server is built with a single partition the size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. - # This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3 file system. + # * AUTO - The server is built with a single partition the size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. + # This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3 file system. # This is the default setting for applicable Rackspace base images. # - # * MANUAL - The server is built using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, - # the remaining disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, + # * MANUAL - The server is built using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, + # the remaining disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, # and so on, and enables you to manage the disk configuration. attribute :disk_config, :aliases => 'OS-DCF:diskConfig' @@ -116,36 +116,36 @@ module Fog # @return [Boolean] whether a read-only configuration drive is attached # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/config_drive_ext.html attribute :config_drive - + # @!attribute [r] bandwidth # @return [Array] The amount of bandwidth used for the specified audit period. # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_extensions.html#bandwidth_extension attribute :bandwidth, :aliases => 'rax-bandwidth:bandwidth' - + # @!attribute [r] address # @return [Hash] IP addresses allocated for server by network - # @example - # { + # @example + # { # "public" => [ - # {"version"=>4, "addr"=>"166.78.105.63"}, + # {"version"=>4, "addr"=>"166.78.105.63"}, # {"version"=>6, "addr"=>"2001:4801:7817:0072:0fe1:75e8:ff10:61a9"} - # ], + # ], # "private"=> [{"version"=>4, "addr"=>"10.177.18.209"}] # } attribute :addresses - + # @!attribute [r] flavor_id - # @return [String] The flavor Id. + # @return [String] The flavor Id. # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Flavors-d1e4188.html attribute :flavor_id, :aliases => 'flavor', :squash => 'id' - + # @!attribute [r] image_id # @return [String] The image Id. # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Images-d1e4435.html attribute :image_id, :aliases => 'image', :squash => 'id' # @!attribute [r] password - # @return [String] Password for system adminstrator account. + # @return [String] Password for system adminstrator account. # @note This value is ONLY populated on server creation. attr_reader :password @@ -225,7 +225,7 @@ module Fog # @raise [Fog::Compute::RackspaceV2::ServiceError] # @note You should use servers.create to create servers instead calling this method directly # @see Servers#create - # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/CreateServers.html + # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/CreateServers.html # # * State Transitions # * BUILD -> ACTIVE @@ -318,7 +318,7 @@ module Fog @image ||= service.images.get(image_id) end - # Creates Image from server. Once complete, a new image is available that you can use to rebuild or create servers. + # Creates Image from server. Once complete, a new image is available that you can use to rebuild or create servers. # @param name [String] name of image to create # @param options [Hash]: # @option options [Hash] metadata hash of containing metadata key value pairs. @@ -344,7 +344,7 @@ module Fog end # Attached Cloud Block Volumes - # @return [Fog::Compute::RackspaceV2::Attachments] attached Cloud Block Volumes + # @return [Fog::Compute::RackspaceV2::Attachments] attached Cloud Block Volumes # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 # @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400 # @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500 @@ -438,7 +438,7 @@ module Fog true end - # Resize existing server to a different flavor, in essence, scaling the server up or down. The original server is saved for a period of time to allow rollback if there is a problem. All resizes should be tested and explicitly confirmed, at which time the original server is removed. All resizes are automatically confirmed after 24 hours if they are not confirmed or reverted. + # Resize existing server to a different flavor, in essence, scaling the server up or down. The original server is saved for a period of time to allow rollback if there is a problem. All resizes should be tested and explicitly confirmed, at which time the original server is removed. All resizes are automatically confirmed after 24 hours if they are not confirmed or reverted. # @param [String] flavor_id to resize # @return [Boolean] returns true if resize is in process # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 @@ -548,7 +548,7 @@ module Fog # # * Status Transition: # * ACTIVE -> PASSWORD -> ACTIVE - # * ACTIVE -> PASSWORD -> ERROR (on error) + # * ACTIVE -> PASSWORD -> ERROR (on error) def change_admin_password(password) requires :identity service.change_server_password(identity, password) @@ -586,7 +586,7 @@ module Fog end def password_lock - "passwd -l #{username}" unless attributes[:no_passwd_lock] + "passwd -l #{username}" unless attributes[:no_passwd_lock] end end end diff --git a/lib/fog/rackspace/models/compute_v2/servers.rb b/lib/fog/rackspace/models/compute_v2/servers.rb index 6ca881c77..e567b0ae9 100644 --- a/lib/fog/rackspace/models/compute_v2/servers.rb +++ b/lib/fog/rackspace/models/compute_v2/servers.rb @@ -9,7 +9,7 @@ module Fog model Fog::Compute::RackspaceV2::Server - # Returns list of servers + # Returns list of servers # @return [Fog::Compute::RackspaceV2::Servers] Retrieves a list servers. # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 # @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400 diff --git a/lib/fog/rackspace/models/dns/zones.rb b/lib/fog/rackspace/models/dns/zones.rb index 51335a5da..59bc84d2e 100644 --- a/lib/fog/rackspace/models/dns/zones.rb +++ b/lib/fog/rackspace/models/dns/zones.rb @@ -11,7 +11,7 @@ module Fog model Fog::DNS::Rackspace::Zone # List all domains. Return by default a maximum of 100 items - # @param [Hash] options Options to pass to the underlying API call + # @param [Hash] options Options to pass to the underlying API call # @option options [String] :name search for domains containing the given substring # @option options [Integer] :limit number of records to return # @option options [Integer] :offset starting offset of records to return @@ -22,7 +22,7 @@ module Fog load(body['domains']) end - + alias :each_zone_this_page :each def each return self unless block_given? diff --git a/lib/fog/rackspace/models/identity/service_catalog.rb b/lib/fog/rackspace/models/identity/service_catalog.rb index 2b10512ee..0e54553d8 100644 --- a/lib/fog/rackspace/models/identity/service_catalog.rb +++ b/lib/fog/rackspace/models/identity/service_catalog.rb @@ -5,12 +5,12 @@ module Fog class Identity class ServiceCatalog < Fog::Model attr_reader :catalog - + def initialize(attributes) @service = attributes.delete(:service) @catalog = attributes.delete(:catalog) || {} end - + def services catalog.collect {|s| s["name"]} end @@ -22,7 +22,7 @@ module Fog h["endpoints"].select {|e| e[key]} end - + def display_service_regions(service_name, service_net=false) endpoints = get_endpoints(service_name, service_net) regions = endpoints.collect do |e| @@ -30,7 +30,7 @@ module Fog end regions.join(", ") end - + def get_endpoint(service_name, region=nil, service_net=false) service_region = region_key(region) @@ -54,19 +54,19 @@ module Fog raise "Unknown region :#{region} for service #{service_name}. Please use one of the following regions: #{display_service_regions(service_name)}" end - + def reload @service.authenticate @catalog = @service.service_catalog.catalog self end - + def self.from_response(service, hash) ServiceCatalog.new :service => service, :catalog => hash["access"]["serviceCatalog"] end private - + def network_type_key(service_net) service_net ? "internalURL" : "publicURL" end @@ -74,12 +74,12 @@ module Fog def matching_region?(h, region) region_key(h["region"]) == region end - + def region_key(region) return region.to_s.upcase if region.is_a? Symbol (region.nil? || region.empty?) ? "GLOBAL" : region.to_s.upcase end - + end end end diff --git a/lib/fog/rackspace/models/queues/claims.rb b/lib/fog/rackspace/models/queues/claims.rb index a84bcafef..83802b360 100644 --- a/lib/fog/rackspace/models/queues/claims.rb +++ b/lib/fog/rackspace/models/queues/claims.rb @@ -54,7 +54,7 @@ module Fog new(data) rescue Fog::Rackspace::Queues::NotFound nil - # HACK - This has been escalated to the Rackspace Queues team, as this + # HACK - This has been escalated to the Rackspace Queues team, as this # behavior is not normal HTTP behavior. rescue Fog::Rackspace::Queues::ServiceError nil diff --git a/lib/fog/rackspace/models/queues/messages.rb b/lib/fog/rackspace/models/queues/messages.rb index a87de7d35..375e8fab2 100644 --- a/lib/fog/rackspace/models/queues/messages.rb +++ b/lib/fog/rackspace/models/queues/messages.rb @@ -69,7 +69,7 @@ module Fog new(data) rescue Fog::Rackspace::Queues::NotFound nil - # HACK - This has been escalated to the Rackspace Queues team, as this + # HACK - This has been escalated to the Rackspace Queues team, as this # behavior is not normal HTTP behavior. rescue Fog::Rackspace::Queues::ServiceError nil diff --git a/lib/fog/rackspace/models/queues/queues.rb b/lib/fog/rackspace/models/queues/queues.rb index ba54ac4b5..3b835eaa2 100644 --- a/lib/fog/rackspace/models/queues/queues.rb +++ b/lib/fog/rackspace/models/queues/queues.rb @@ -34,7 +34,7 @@ module Fog # @raise [Fog::Rackspace::Queues::ServiceError] # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/GET_checkQueueExists__version__queues__queue_name__queue-operations-dle001.html def get(queue_name) - #204 no content is returned on success. That's why no data is passed + #204 no content is returned on success. That's why no data is passed # from the GET to the constructor. service.get_queue(queue_name) new({:name => queue_name}) diff --git a/lib/fog/rackspace/models/storage/account.rb b/lib/fog/rackspace/models/storage/account.rb index 656ae20be..1826f58e2 100644 --- a/lib/fog/rackspace/models/storage/account.rb +++ b/lib/fog/rackspace/models/storage/account.rb @@ -21,8 +21,8 @@ module Fog # @!attribute [r] object_count # @return [Integer] The total number of objects in the account - attribute :object_count, :aliases => 'X-Account-Object-Count', :type => :integer - + attribute :object_count, :aliases => 'X-Account-Object-Count', :type => :integer + # Saves account settings (meta_temp_url_key) # @return [Boolean] returns true if successfully updated # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 @@ -33,7 +33,7 @@ module Fog service.post_set_meta_temp_url_key meta_temp_url_key true end - + # Reload account with latest data from Cloud Files # @return [Fog::Storage::Rackspace::Account] returns itself # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 @@ -47,4 +47,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/models/storage/directories.rb b/lib/fog/rackspace/models/storage/directories.rb index ad651dd40..91f6a3fc6 100644 --- a/lib/fog/rackspace/models/storage/directories.rb +++ b/lib/fog/rackspace/models/storage/directories.rb @@ -46,11 +46,11 @@ module Fog directory.merge_attributes(key => value) end end - + directory.metadata = Metadata.from_headers(directory, data.headers) directory.files.merge_attributes(options) directory.files.instance_variable_set(:@loaded, true) - + data.body.each do |file| directory.files << directory.files.new(file) end diff --git a/lib/fog/rackspace/models/storage/directory.rb b/lib/fog/rackspace/models/storage/directory.rb index 05546dd74..b17742eac 100644 --- a/lib/fog/rackspace/models/storage/directory.rb +++ b/lib/fog/rackspace/models/storage/directory.rb @@ -26,7 +26,7 @@ module Fog # @note This value does not persist and will need to be specified each time a directory is created or retrieved # @see Directories#get attribute :cdn_cname - + # @!attribute [w] public # Required for compatibility with other Fog providers. Not Used. attr_writer :public @@ -45,7 +45,7 @@ module Fog end attributes[:metadata] end - + # Retrieve directory metadata # @return [Fog::Storage::Rackspace::Metadata] metadata key value pairs. def metadata @@ -100,7 +100,7 @@ module Fog end @public end - + # Reload directory with latest data from Cloud Files # @return [Fog::Storage::Rackspace::Directory] returns itself # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 @@ -113,7 +113,7 @@ module Fog @files = nil super end - + # Returns the public url for the directory. # If the directory has not been published to the CDN, this method will return nil as it is not publically accessible. This method will return the approprate # url in the following order: @@ -132,7 +132,7 @@ module Fog return urls[:ssl_uri] if service.ssl? cdn_cname || urls[:uri] end - + # URL used to stream video to iOS devices. Cloud Files will auto convert to the approprate format. # @return [String] iOS URL # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 @@ -143,7 +143,7 @@ module Fog def ios_url urls[:ios_uri] end - + # URL used to stream resources # @return [String] streaming url # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 @@ -173,22 +173,22 @@ module Fog end true end - + private - + def cdn_enabled? service.cdn && service.cdn.enabled? end - + def urls - requires :key + requires :key return {} unless cdn_enabled? @urls ||= service.cdn.urls(self) end - + def create_or_update_container - headers = attributes[:metadata].nil? ? {} : metadata.to_headers - service.put_container(key, headers) + headers = attributes[:metadata].nil? ? {} : metadata.to_headers + service.put_container(key, headers) end end end diff --git a/lib/fog/rackspace/models/storage/file.rb b/lib/fog/rackspace/models/storage/file.rb index 441da2abc..b255b2db3 100644 --- a/lib/fog/rackspace/models/storage/file.rb +++ b/lib/fog/rackspace/models/storage/file.rb @@ -36,7 +36,7 @@ module Fog # @return [String] string containing a list of space delimited URLs # @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/CORS_Container_Header-d1e1300.html attribute :access_control_allow_origin, :aliases => ['Access-Control-Allow-Origin'] - + # @!attribute [rw] origin # @return [String] The origin is the URI of the object's host. # @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/CORS_Container_Header-d1e1300.html @@ -133,13 +133,13 @@ module Fog end attributes[:metadata] end - + # File metadata # @return [Fog::Storage::Rackspace::Metadata] metadata key value pairs. def metadata attributes[:metadata] ||= Fog::Storage::Rackspace::Metadata.new(self) end - + # Required for compatibility with other Fog providers. Not Used. def owner=(new_owner) if new_owner @@ -177,7 +177,7 @@ module Fog def public? directory.public? end - + # Get a url for file. # @@ -213,7 +213,7 @@ module Fog def public_url Files::file_url directory.public_url, key end - + # URL used to stream video to iOS devices without needing to convert your video # @return [String] iOS URL # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 @@ -224,7 +224,7 @@ module Fog def ios_url Files::file_url directory.ios_url, key end - + # URL used to stream resources # @return [String] streaming url # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 @@ -234,8 +234,8 @@ module Fog # @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Streaming-CDN-Enabled_Containers-d1f3721.html def streaming_url Files::file_url directory.streaming_url, key - end - + end + # Immediately purge file from the CDN network # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 # @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400 @@ -272,7 +272,7 @@ module Fog data = service.put_object(directory.key, key, body, options) update_attributes_from(data) - + self.content_length = Fog::Storage.get_body_size(body) self.content_type ||= Fog::Storage.get_content_type(body) true diff --git a/lib/fog/rackspace/models/storage/files.rb b/lib/fog/rackspace/models/storage/files.rb index cf5fe1f22..fe0afe8e1 100644 --- a/lib/fog/rackspace/models/storage/files.rb +++ b/lib/fog/rackspace/models/storage/files.rb @@ -110,13 +110,13 @@ module Fog def get(key, &block) requires :directory data = service.get_object(directory.key, key, &block) - metadata = Metadata.from_headers(self, data.headers) + metadata = Metadata.from_headers(self, data.headers) file_data = data.headers.merge({ :body => data.body, :key => key, :metadata => metadata }) - + new(file_data) rescue Fog::Storage::Rackspace::NotFound nil @@ -136,7 +136,7 @@ module Fog Files::file_url directory.public_url, key end end - + # Get a temporary http url for a file. # # required attributes: key diff --git a/lib/fog/rackspace/models/storage/metadata.rb b/lib/fog/rackspace/models/storage/metadata.rb index 9857938bb..6e4f5f415 100644 --- a/lib/fog/rackspace/models/storage/metadata.rb +++ b/lib/fog/rackspace/models/storage/metadata.rb @@ -6,20 +6,20 @@ require 'fog/rackspace/models/storage/files' module Fog module Storage class Rackspace - + class Metadata - + OBJECT_META_PREFIX = "X-Object-Meta-" OBJECT_REMOVE_META_PREFIX = "X-Remove-Object-Meta-" CONTAINER_META_PREFIX = "X-Container-Meta-" CONTAINER_REMOVE_META_PREFIX = "X-Remove-Container-Meta-" - + # Cloud Files will ignore headers without a value DUMMY_VALUE = 1 - + CONTAINER_KEY_REGEX = /^#{CONTAINER_META_PREFIX}(.*)/ OBJECT_KEY_REGEX = /^#{OBJECT_META_PREFIX}(.*)/ - + # @!attribute [rw] data # @return [Hash] underlying data store for metadata class @@ -28,7 +28,7 @@ module Fog # @!attribute [rw] parent # @return [Fog::Storage::Rackspace::Directory,Fog::Storage::Rackspace::File] the parent object of the metadata attr_reader :parent - + # Initialize # @param [Fog::Storage::Rackspace::Directory,Fog::Storage::Rackspace::File] parent object of the metadata # @param [Hash] hash containing initial metadata values @@ -51,16 +51,16 @@ module Fog # Returns metadata in a format expected by Cloud Files # @return [Hash] Metadata in a format expected by Cloud Files def to_headers - headers = {} - h = data.merge(@deleted_hash) + headers = {} + h = data.merge(@deleted_hash) h.each_pair do |k,v| key = to_header_key(k,v) - headers[key] = v || DUMMY_VALUE + headers[key] = v || DUMMY_VALUE end - + headers end - + # Creates metadata object from Cloud File Headers # @param [Fog::Storage::Rackspace::Directory,Fog::Storage::Rackspace::File] parent object of the metadata # @param [Hash] headers Cloud File headers @@ -72,8 +72,8 @@ module Fog metadata.data[key] = v end metadata - end - + end + # Returns true if method is implemented by Metadata class # @param [Symbol] method_sym # @param [Boolean] include_private @@ -84,22 +84,22 @@ module Fog # Invoked by Ruby when obj is sent a message it cannot handle. def method_missing(method, *args, &block) data.send(method, *args, &block) - end - + end + private - + def directory? [Fog::Storage::Rackspace::Directory, Fog::Storage::Rackspace::Directories].include? parent_class end - + def file? [Fog::Storage::Rackspace::File, Fog::Storage::Rackspace::Files].include? parent_class end - + def parent_class parent.is_a?(Class) ? parent : parent.class end - + def meta_prefix if directory? CONTAINER_META_PREFIX @@ -129,24 +129,24 @@ module Fog raise "Metadata prefix is unknown for #{parent_class}" end end - + def to_key(key) m = key.match meta_prefix_regex return nil unless m && m[1] - + a = m[1].split('-') a.collect!(&:downcase) str = a.join('_') str.to_sym end - + def to_header_key(key, value) prefix = value.nil? ? remove_meta_prefix : meta_prefix prefix + key.to_s.split(/[-_]/).collect(&:capitalize).join('-') end - + end - + end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/create_group.rb b/lib/fog/rackspace/requests/auto_scale/create_group.rb index 415b490a4..4964c5ef0 100644 --- a/lib/fog/rackspace/requests/auto_scale/create_group.rb +++ b/lib/fog/rackspace/requests/auto_scale/create_group.rb @@ -22,7 +22,7 @@ module Fog class Mock def create_group(launch_config, group_config, policies) - + group_id = Fog::Rackspace::MockData.uuid # Construct group structure @@ -31,7 +31,7 @@ module Fog 'groupConfiguration' => group_config, 'scalingPolicies' => policies, 'id' => group_id - } + } # Add links for HTTP response group['scalingPolicies'][0]['links'] = [ diff --git a/lib/fog/rackspace/requests/auto_scale/create_policy.rb b/lib/fog/rackspace/requests/auto_scale/create_policy.rb index 7523a5b19..c7338660d 100644 --- a/lib/fog/rackspace/requests/auto_scale/create_policy.rb +++ b/lib/fog/rackspace/requests/auto_scale/create_policy.rb @@ -3,7 +3,7 @@ module Fog class AutoScale class Real def create_policy(group_id, options) - + data = [options] request( @@ -17,13 +17,13 @@ module Fog class Mock def create_policy(group_id, options) - + group = self.data[:autoscale_groups][group_id] if group.nil? raise Fog::Rackspace::AutoScale::NotFound end - + policy = { "id" => Fog::Rackspace::MockData.uuid, "name" => "set group to 5 servers", @@ -33,7 +33,7 @@ module Fog } group['scalingPolicies'] << policy - + body = [policy] response(:body => body) diff --git a/lib/fog/rackspace/requests/auto_scale/create_webhook.rb b/lib/fog/rackspace/requests/auto_scale/create_webhook.rb index 753320a7e..388b90826 100644 --- a/lib/fog/rackspace/requests/auto_scale/create_webhook.rb +++ b/lib/fog/rackspace/requests/auto_scale/create_webhook.rb @@ -17,7 +17,7 @@ module Fog class Mock def create_webhook(group_id, policy_id, options) - + group = self.data[:autoscale_groups][group_id] if group.nil? raise Fog::Rackspace::AutoScale::NotFound diff --git a/lib/fog/rackspace/requests/auto_scale/delete_policy.rb b/lib/fog/rackspace/requests/auto_scale/delete_policy.rb index 4ea370b5a..914ab75e9 100644 --- a/lib/fog/rackspace/requests/auto_scale/delete_policy.rb +++ b/lib/fog/rackspace/requests/auto_scale/delete_policy.rb @@ -28,4 +28,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/delete_webhook.rb b/lib/fog/rackspace/requests/auto_scale/delete_webhook.rb index 03c54d3af..d9beccbe3 100644 --- a/lib/fog/rackspace/requests/auto_scale/delete_webhook.rb +++ b/lib/fog/rackspace/requests/auto_scale/delete_webhook.rb @@ -31,4 +31,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/execute_anonymous_webhook.rb b/lib/fog/rackspace/requests/auto_scale/execute_anonymous_webhook.rb index 767fbe391..3bd34defb 100644 --- a/lib/fog/rackspace/requests/auto_scale/execute_anonymous_webhook.rb +++ b/lib/fog/rackspace/requests/auto_scale/execute_anonymous_webhook.rb @@ -19,4 +19,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/execute_policy.rb b/lib/fog/rackspace/requests/auto_scale/execute_policy.rb index a3a46fd80..876433ba6 100644 --- a/lib/fog/rackspace/requests/auto_scale/execute_policy.rb +++ b/lib/fog/rackspace/requests/auto_scale/execute_policy.rb @@ -19,4 +19,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/get_group.rb b/lib/fog/rackspace/requests/auto_scale/get_group.rb index 93a17c114..da94a8606 100644 --- a/lib/fog/rackspace/requests/auto_scale/get_group.rb +++ b/lib/fog/rackspace/requests/auto_scale/get_group.rb @@ -26,4 +26,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/get_group_config.rb b/lib/fog/rackspace/requests/auto_scale/get_group_config.rb index 53729f363..468deeb82 100644 --- a/lib/fog/rackspace/requests/auto_scale/get_group_config.rb +++ b/lib/fog/rackspace/requests/auto_scale/get_group_config.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/get_group_state.rb b/lib/fog/rackspace/requests/auto_scale/get_group_state.rb index f2681c7c1..656f8c5e6 100644 --- a/lib/fog/rackspace/requests/auto_scale/get_group_state.rb +++ b/lib/fog/rackspace/requests/auto_scale/get_group_state.rb @@ -15,9 +15,9 @@ module Fog class Mock def get_group_state(group_id) - + instance_id_1 = Fog::Rackspace::AutoScale::MockData.uuid - instance_id_2 = Fog::Rackspace::AutoScale::MockData.uuid + instance_id_2 = Fog::Rackspace::AutoScale::MockData.uuid state = { "id" => group_id, @@ -59,4 +59,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/get_launch_config.rb b/lib/fog/rackspace/requests/auto_scale/get_launch_config.rb index 5636c4e6a..3ef10d2e1 100644 --- a/lib/fog/rackspace/requests/auto_scale/get_launch_config.rb +++ b/lib/fog/rackspace/requests/auto_scale/get_launch_config.rb @@ -27,4 +27,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/get_policy.rb b/lib/fog/rackspace/requests/auto_scale/get_policy.rb index fd5768310..ba551d86b 100644 --- a/lib/fog/rackspace/requests/auto_scale/get_policy.rb +++ b/lib/fog/rackspace/requests/auto_scale/get_policy.rb @@ -32,4 +32,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/get_webhook.rb b/lib/fog/rackspace/requests/auto_scale/get_webhook.rb index e5bba815c..a1e3295c9 100644 --- a/lib/fog/rackspace/requests/auto_scale/get_webhook.rb +++ b/lib/fog/rackspace/requests/auto_scale/get_webhook.rb @@ -36,4 +36,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/list_webhooks.rb b/lib/fog/rackspace/requests/auto_scale/list_webhooks.rb index 3fda626f3..507657b7e 100644 --- a/lib/fog/rackspace/requests/auto_scale/list_webhooks.rb +++ b/lib/fog/rackspace/requests/auto_scale/list_webhooks.rb @@ -14,7 +14,7 @@ module Fog class Mock def list_webhooks(group_id, policy_id) - + group = self.data[:autoscale_groups][group_id] if group.nil? raise Fog::Rackspace::AutoScale::NotFound diff --git a/lib/fog/rackspace/requests/auto_scale/pause_group_state.rb b/lib/fog/rackspace/requests/auto_scale/pause_group_state.rb index 1d4332eb5..c04f0c3da 100644 --- a/lib/fog/rackspace/requests/auto_scale/pause_group_state.rb +++ b/lib/fog/rackspace/requests/auto_scale/pause_group_state.rb @@ -20,4 +20,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/resume_group_state.rb b/lib/fog/rackspace/requests/auto_scale/resume_group_state.rb index 69167a6e6..adf345b47 100644 --- a/lib/fog/rackspace/requests/auto_scale/resume_group_state.rb +++ b/lib/fog/rackspace/requests/auto_scale/resume_group_state.rb @@ -19,4 +19,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/update_group_config.rb b/lib/fog/rackspace/requests/auto_scale/update_group_config.rb index 8472ef2c4..a7dd38264 100644 --- a/lib/fog/rackspace/requests/auto_scale/update_group_config.rb +++ b/lib/fog/rackspace/requests/auto_scale/update_group_config.rb @@ -4,7 +4,7 @@ module Fog class Real def update_group_config(group_id, options) - + body = options request( @@ -24,7 +24,7 @@ module Fog end config = group['groupConfiguration'] - + config['name'] = options['name'] if options['name'] config['cooldown'] = options['cooldown'] if options['cooldown'] config['minEntities'] = options['minEntities'] if options['minEntities'] @@ -36,4 +36,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/update_launch_config.rb b/lib/fog/rackspace/requests/auto_scale/update_launch_config.rb index cd082544c..4fd6f20c3 100644 --- a/lib/fog/rackspace/requests/auto_scale/update_launch_config.rb +++ b/lib/fog/rackspace/requests/auto_scale/update_launch_config.rb @@ -4,7 +4,7 @@ module Fog class Real def update_launch_config(group_id, options) - + body = options request( @@ -24,7 +24,7 @@ module Fog end config = group['launchConfiguration'] - + config['args'] = options['args'] if options['args'] config['type'] = options['type'] if options['type'] @@ -33,4 +33,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/update_policy.rb b/lib/fog/rackspace/requests/auto_scale/update_policy.rb index 9ee16ea08..29fb9b5ae 100644 --- a/lib/fog/rackspace/requests/auto_scale/update_policy.rb +++ b/lib/fog/rackspace/requests/auto_scale/update_policy.rb @@ -4,7 +4,7 @@ module Fog class Real def update_policy(group_id, policy_id, options) - + request( :expects => [204], :method => 'PUT', @@ -30,4 +30,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/auto_scale/update_webhook.rb b/lib/fog/rackspace/requests/auto_scale/update_webhook.rb index e5d1bff86..57c352cbb 100644 --- a/lib/fog/rackspace/requests/auto_scale/update_webhook.rb +++ b/lib/fog/rackspace/requests/auto_scale/update_webhook.rb @@ -4,7 +4,7 @@ module Fog class Real def update_webhook(group_id, policy_id, webhook_id, options) - + body = options request( @@ -41,4 +41,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/cdn/delete_object.rb b/lib/fog/rackspace/requests/cdn/delete_object.rb index 3ac3ac45f..b0a97f047 100644 --- a/lib/fog/rackspace/requests/cdn/delete_object.rb +++ b/lib/fog/rackspace/requests/cdn/delete_object.rb @@ -21,20 +21,20 @@ module Fog ) end end - + class Mock - - def delete_object(container, object) + + def delete_object(container, object) response = Excon::Response.new response.status = 204 response.headers = { - "Content-Length"=>"0", - "Date"=>"Fri, 01 Feb 2013 21:34:33 GMT", + "Content-Length"=>"0", + "Date"=>"Fri, 01 Feb 2013 21:34:33 GMT", "X-Trans-Id"=>"tx860f26bd76284a849384c0a467767b57" - } + } response.body = "" response - end + end end end end diff --git a/lib/fog/rackspace/requests/cdn/get_containers.rb b/lib/fog/rackspace/requests/cdn/get_containers.rb index a735edc3b..54960a72d 100644 --- a/lib/fog/rackspace/requests/cdn/get_containers.rb +++ b/lib/fog/rackspace/requests/cdn/get_containers.rb @@ -31,38 +31,38 @@ module Fog end end - + class Mock - + def get_containers(options = {}) response = Excon::Response.new response.status = 200 - response.headers = { - "Content-Length"=>"4402", - "Date"=>"Fri, 01 Feb 2013 21:16:54 GMT", - "Content-Type"=>"application/json", + response.headers = { + "Content-Length"=>"4402", + "Date"=>"Fri, 01 Feb 2013 21:16:54 GMT", + "Content-Type"=>"application/json", "X-Trans-Id"=>"tx6c79ea47300941c49f2291b4d47d4ef5" - } + } response.body = [ - { "log_retention"=>false, - "cdn_ios_uri"=>"http://a590286a323fec6aed22-d1e9259b2132e81da48ed3e1e802ef22.iosr.cf1.rackcdn.com", - "ttl"=>3600, - "cdn_enabled"=>true, - "cdn_streaming_uri"=>"http://168e307d41afe64f1a62-d1e9259b2132e81da48ed3e1e802ef22.r2.stream.cf1.rackcdn.com", - "name"=>"brown", "cdn_uri"=>"http://6e8f4bf5125c9c2e4e3a-d1e9259b2132e81da48ed3e1e802ef22.r2.cf1.rackcdn.com", + { "log_retention"=>false, + "cdn_ios_uri"=>"http://a590286a323fec6aed22-d1e9259b2132e81da48ed3e1e802ef22.iosr.cf1.rackcdn.com", + "ttl"=>3600, + "cdn_enabled"=>true, + "cdn_streaming_uri"=>"http://168e307d41afe64f1a62-d1e9259b2132e81da48ed3e1e802ef22.r2.stream.cf1.rackcdn.com", + "name"=>"brown", "cdn_uri"=>"http://6e8f4bf5125c9c2e4e3a-d1e9259b2132e81da48ed3e1e802ef22.r2.cf1.rackcdn.com", "cdn_ssl_uri"=>"https://f83cb7d39e0b9ff9581b-d1e9259b2132e81da48ed3e1e802ef22.ssl.cf1.rackcdn.com" - }, - { "log_retention"=>false, - "cdn_ios_uri"=>"http://b141f80caedd02158f10-cf33674d895dc8b8e6e5207fdbd5cae4.iosr.cf1.rackcdn.com", - "ttl"=>5000, - "cdn_enabled"=>false, - "cdn_streaming_uri"=>"http://ea5feee96b8087a3d5e5-cf33674d895dc8b8e6e5207fdbd5cae4.r72.stream.cf1.rackcdn.com", - "name"=>"fogcontainertests", "cdn_uri"=>"http://0115a9de56617a5d5473-cf33674d895dc8b8e6e5207fdbd5cae4.r72.cf1.rackcdn.com", + }, + { "log_retention"=>false, + "cdn_ios_uri"=>"http://b141f80caedd02158f10-cf33674d895dc8b8e6e5207fdbd5cae4.iosr.cf1.rackcdn.com", + "ttl"=>5000, + "cdn_enabled"=>false, + "cdn_streaming_uri"=>"http://ea5feee96b8087a3d5e5-cf33674d895dc8b8e6e5207fdbd5cae4.r72.stream.cf1.rackcdn.com", + "name"=>"fogcontainertests", "cdn_uri"=>"http://0115a9de56617a5d5473-cf33674d895dc8b8e6e5207fdbd5cae4.r72.cf1.rackcdn.com", "cdn_ssl_uri"=>"https://a5df8bd8a418ca88061e-cf33674d895dc8b8e6e5207fdbd5cae4.ssl.cf1.rackcdn.com" } - ] + ] response - end + end end end diff --git a/lib/fog/rackspace/requests/cdn/head_container.rb b/lib/fog/rackspace/requests/cdn/head_container.rb index ad696ad54..9797beaa4 100644 --- a/lib/fog/rackspace/requests/cdn/head_container.rb +++ b/lib/fog/rackspace/requests/cdn/head_container.rb @@ -33,30 +33,30 @@ module Fog end end - + class Mock - + def head_container(container) raise Fog::Storage::Rackspace::NotFound.new "#{container} not found" unless container == 'fogcontainertests' response = Excon::Response.new response.status = 204 - response.headers = { - "X-Cdn-Uri"=>"http://e4bbc22477d80eaf22bd-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.cf1.rackcdn.com", - "X-Cdn-Ios-Uri"=>"http://3c10ef49037f74416445-ca4e4e61e477bbd430e1f5b9dc9a19f5.iosr.cf1.rackcdn.com", - "X-Cdn-Ssl-Uri"=>"https://b722b8ee248259c37901-ca4e4e61e477bbd430e1f5b9dc9a19f5.ssl.cf1.rackcdn.com", - "X-Log-Retention"=>"False", - "X-Cdn-Enabled"=>"True", - "Content-Length"=>"0", - "Date"=>"Fri, 01 Feb 2013 21:25:57 GMT", - "X-Cdn-Streaming-Uri"=>"http://b82027c64cb4dd03670a-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.stream.cf1.rackcdn.com", - "X-Ttl"=>"259200", + response.headers = { + "X-Cdn-Uri"=>"http://e4bbc22477d80eaf22bd-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.cf1.rackcdn.com", + "X-Cdn-Ios-Uri"=>"http://3c10ef49037f74416445-ca4e4e61e477bbd430e1f5b9dc9a19f5.iosr.cf1.rackcdn.com", + "X-Cdn-Ssl-Uri"=>"https://b722b8ee248259c37901-ca4e4e61e477bbd430e1f5b9dc9a19f5.ssl.cf1.rackcdn.com", + "X-Log-Retention"=>"False", + "X-Cdn-Enabled"=>"True", + "Content-Length"=>"0", + "Date"=>"Fri, 01 Feb 2013 21:25:57 GMT", + "X-Cdn-Streaming-Uri"=>"http://b82027c64cb4dd03670a-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.stream.cf1.rackcdn.com", + "X-Ttl"=>"259200", "X-Trans-Id"=>"txca40ffd0412943608bb3e9656c8b81ef" - } - response.body = "" + } + response.body = "" response - end + end end - + end end end diff --git a/lib/fog/rackspace/requests/cdn/post_container.rb b/lib/fog/rackspace/requests/cdn/post_container.rb index 822ffd534..5f3dae474 100644 --- a/lib/fog/rackspace/requests/cdn/post_container.rb +++ b/lib/fog/rackspace/requests/cdn/post_container.rb @@ -30,27 +30,27 @@ module Fog end end - + class Mock - + def post_container(name, options = {}) raise Fog::Storage::Rackspace::NotFound.new "#{name} not found" unless name == 'fogcontainertests' response = Excon::Response.new response.status = 202 - response.headers = { - "X-Cdn-Uri"=>"http://e4bbc22477d80eaf22bd-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.cf1.rackcdn.com", - "X-Cdn-Ios-Uri"=>"http://3c10ef49037f74416445-ca4e4e61e477bbd430e1f5b9dc9a19f5.iosr.cf1.rackcdn.com", - "X-Cdn-Ssl-Uri"=>"https://b722b8ee248259c37901-ca4e4e61e477bbd430e1f5b9dc9a19f5.ssl.cf1.rackcdn.com", - "Content-Length"=>"58", "Date"=>"Fri, 01 Feb 2013 21:31:30 GMT", - "Content-Type"=>"text/plain; charset=UTF-8", - "X-Cdn-Streaming-Uri"=>"http://b82027c64cb4dd03670a-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.stream.cf1.rackcdn.com", + response.headers = { + "X-Cdn-Uri"=>"http://e4bbc22477d80eaf22bd-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.cf1.rackcdn.com", + "X-Cdn-Ios-Uri"=>"http://3c10ef49037f74416445-ca4e4e61e477bbd430e1f5b9dc9a19f5.iosr.cf1.rackcdn.com", + "X-Cdn-Ssl-Uri"=>"https://b722b8ee248259c37901-ca4e4e61e477bbd430e1f5b9dc9a19f5.ssl.cf1.rackcdn.com", + "Content-Length"=>"58", "Date"=>"Fri, 01 Feb 2013 21:31:30 GMT", + "Content-Type"=>"text/plain; charset=UTF-8", + "X-Cdn-Streaming-Uri"=>"http://b82027c64cb4dd03670a-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.stream.cf1.rackcdn.com", "X-Trans-Id"=>"tx4a3206e63dfc446bb5b60e34a62f749d" - } - response.body = "202 Accepted\n\nThe request is accepted for processing.\n\n " + } + response.body = "202 Accepted\n\nThe request is accepted for processing.\n\n " response - end + end end - + end end end diff --git a/lib/fog/rackspace/requests/cdn/put_container.rb b/lib/fog/rackspace/requests/cdn/put_container.rb index 02f95170e..65d4c24a7 100644 --- a/lib/fog/rackspace/requests/cdn/put_container.rb +++ b/lib/fog/rackspace/requests/cdn/put_container.rb @@ -30,27 +30,27 @@ module Fog end end - + class Mock - + def put_container(name, options = {}) response = Excon::Response.new response.status = 201 - response.headers = { - "X-Cdn-Uri"=>"http://e4bbc22477d80eaf22bd-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.cf1.rackcdn.com", - "X-Cdn-Ios-Uri"=>"http://3c10ef49037f74416445-ca4e4e61e477bbd430e1f5b9dc9a19f5.iosr.cf1.rackcdn.com", - "X-Cdn-Ssl-Uri"=>"https://b722b8ee248259c37901-ca4e4e61e477bbd430e1f5b9dc9a19f5.ssl.cf1.rackcdn.com", - "Content-Length"=>"18", - "Date"=>"Fri, 01 Feb 2013 21:21:45 GMT", - "Content-Type"=>"text/plain; charset=UTF-8", - "X-Cdn-Streaming-Uri"=>"http://b82027c64cb4dd03670a-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.stream.cf1.rackcdn.com", + response.headers = { + "X-Cdn-Uri"=>"http://e4bbc22477d80eaf22bd-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.cf1.rackcdn.com", + "X-Cdn-Ios-Uri"=>"http://3c10ef49037f74416445-ca4e4e61e477bbd430e1f5b9dc9a19f5.iosr.cf1.rackcdn.com", + "X-Cdn-Ssl-Uri"=>"https://b722b8ee248259c37901-ca4e4e61e477bbd430e1f5b9dc9a19f5.ssl.cf1.rackcdn.com", + "Content-Length"=>"18", + "Date"=>"Fri, 01 Feb 2013 21:21:45 GMT", + "Content-Type"=>"text/plain; charset=UTF-8", + "X-Cdn-Streaming-Uri"=>"http://b82027c64cb4dd03670a-ca4e4e61e477bbd430e1f5b9dc9a19f5.r53.stream.cf1.rackcdn.com", "X-Trans-Id"=>"tx1b41ec63189f4862baa65e0c08711772" - } - response.body = "201 Created\n\n\n\n " + } + response.body = "201 Created\n\n\n\n " response - end + end end - + end end end diff --git a/lib/fog/rackspace/requests/compute_v2/attach_volume.rb b/lib/fog/rackspace/requests/compute_v2/attach_volume.rb index 1fd95cd9e..e06f82b7f 100644 --- a/lib/fog/rackspace/requests/compute_v2/attach_volume.rb +++ b/lib/fog/rackspace/requests/compute_v2/attach_volume.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # This operation attaches a volume to the specified server. # @param [String] server_id # @param [String] volume_id @@ -27,7 +27,7 @@ module Fog } data['volumeAttachment']['device'] = device if device - + request( :body => Fog::JSON.encode(data), :expects => [200], diff --git a/lib/fog/rackspace/requests/compute_v2/change_server_password.rb b/lib/fog/rackspace/requests/compute_v2/change_server_password.rb index 076487a49..d3f8f491c 100644 --- a/lib/fog/rackspace/requests/compute_v2/change_server_password.rb +++ b/lib/fog/rackspace/requests/compute_v2/change_server_password.rb @@ -2,9 +2,9 @@ module Fog module Compute class RackspaceV2 class Real - + # Changes server admin password - # @param [String] server_id + # @param [String] server_id # @param [String] password # @return [Excon::Response] response # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 @@ -12,7 +12,7 @@ module Fog # @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500 # @raise [Fog::Compute::RackspaceV2::ServiceError] # @note Though Rackspace does not enforce complexity requirements for the password, the operating system might. If the password is not complex enough, the server might enter an ERROR state. - # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Change_Password-d1e3234.html + # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Change_Password-d1e3234.html def change_server_password(server_id, password) data = { 'changePassword' => { diff --git a/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb b/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb index 0ec811cd2..e0b03eeb4 100644 --- a/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/confirm_resize_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Confirm server resize operation # @param [String] server_id The id of the server to revert # @return [Excon::Response] response @@ -15,7 +15,7 @@ module Fog # # * Status Transition: # * VERIFY_RESIZE -> ACTIVE - # * VERIFY_RESIZE -> ERROR (on error) + # * VERIFY_RESIZE -> ERROR (on error) def confirm_resize_server(server_id) data = { 'confirmResize' => nil diff --git a/lib/fog/rackspace/requests/compute_v2/create_image.rb b/lib/fog/rackspace/requests/compute_v2/create_image.rb index 0de9a0cc5..6d0e69d2d 100644 --- a/lib/fog/rackspace/requests/compute_v2/create_image.rb +++ b/lib/fog/rackspace/requests/compute_v2/create_image.rb @@ -25,7 +25,7 @@ module Fog 'name' => name } } - data['createImage'].merge!(options) + data['createImage'].merge!(options) request( :body => Fog::JSON.encode(data), :expects => 202, diff --git a/lib/fog/rackspace/requests/compute_v2/create_server.rb b/lib/fog/rackspace/requests/compute_v2/create_server.rb index ab4bfd300..4ac3c1c9d 100644 --- a/lib/fog/rackspace/requests/compute_v2/create_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/create_server.rb @@ -15,7 +15,7 @@ module Fog # @option options [Boolean] config_drive whether to attach a read-only configuration drive # @option options [String] keypair Name of the kay-pair to associate with this server. # @return [Excon::Response] response: - # * body [Hash]: + # * body [Hash]: # * server [Hash]: # * name [String] - name of server # * imageRef [String] - id of image used to create server @@ -23,12 +23,12 @@ module Fog # * OS-DCF:diskConfig [String] - The disk configuration value. # * name [String] - name of server # * metadata [Hash] - Metadata key and value pairs. - # * personality [Array]: + # * personality [Array]: # * [Hash]: # * path - path of the file created # * contents - Base 64 encoded file contents - # * networks [Array]: - # * [Hash]: + # * networks [Array]: + # * [Hash]: # * uuid [String] - uuid of attached network # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404 # @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400 diff --git a/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb b/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb index 85252ff78..753111dc2 100644 --- a/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb +++ b/lib/fog/rackspace/requests/compute_v2/delete_attachment.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Deletes a specified volume attachment from a specified server instance. # @param [String] server_id id of server containing volume to delete # @param [String] volume_id id of volume on server to delete diff --git a/lib/fog/rackspace/requests/compute_v2/delete_image.rb b/lib/fog/rackspace/requests/compute_v2/delete_image.rb index 1274e465c..d0bd07628 100644 --- a/lib/fog/rackspace/requests/compute_v2/delete_image.rb +++ b/lib/fog/rackspace/requests/compute_v2/delete_image.rb @@ -20,15 +20,15 @@ module Fog end end - + class Mock def delete_image(image_id) raise Fog::Compute::RackspaceV2::NotFound.new if image_id == Fog::Rackspace::MockData::NOT_FOUND_ID response = Excon::Response.new response.status = 202 - response.body = "" - end - + response.body = "" + end + end end end diff --git a/lib/fog/rackspace/requests/compute_v2/delete_metadata_item.rb b/lib/fog/rackspace/requests/compute_v2/delete_metadata_item.rb index 1cccdd79b..907f421d0 100644 --- a/lib/fog/rackspace/requests/compute_v2/delete_metadata_item.rb +++ b/lib/fog/rackspace/requests/compute_v2/delete_metadata_item.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Deletes a metadata item. # @param [String] collection type of metadata # @param [String] obj_id id of the object where the metadata is attached @@ -21,15 +21,15 @@ module Fog ) end end - + class Mock def delete_metadata_item(collection, obj_id, key) raise Fog::Compute::RackspaceV2::NotFound if obj_id == 0 - + response = Excon::Response.new - response.body = "" + response.body = "" response.status = 204 - response + response end end end diff --git a/lib/fog/rackspace/requests/compute_v2/delete_server.rb b/lib/fog/rackspace/requests/compute_v2/delete_server.rb index 4416d92e2..2370aebc5 100644 --- a/lib/fog/rackspace/requests/compute_v2/delete_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/delete_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Deletes a specified server instance from the system. # @param [String] server_id the id of the server to delete # @return [Excon::Response] response diff --git a/lib/fog/rackspace/requests/compute_v2/get_attachment.rb b/lib/fog/rackspace/requests/compute_v2/get_attachment.rb index 799536748..8a514012f 100644 --- a/lib/fog/rackspace/requests/compute_v2/get_attachment.rb +++ b/lib/fog/rackspace/requests/compute_v2/get_attachment.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves attachment # @param [String] server_id # @param [String] volume_id diff --git a/lib/fog/rackspace/requests/compute_v2/get_flavor.rb b/lib/fog/rackspace/requests/compute_v2/get_flavor.rb index bc0835756..b03810126 100644 --- a/lib/fog/rackspace/requests/compute_v2/get_flavor.rb +++ b/lib/fog/rackspace/requests/compute_v2/get_flavor.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves flavor detail # @param [Sring] flavor_id # @return [Excon::Response] response: @@ -10,7 +10,7 @@ module Fog # * flavor [Hash]: # * disk [Fixnum] - disk size in GB # * id [String] - id of flavor - # * name [String] - name of flavor + # * name [String] - name of flavor # * ram [Fixnum] - amount of ram in MB # * swap [Fixnum] - amount of swap in GB # * vcpus [Fixnum] - number of virtual CPUs diff --git a/lib/fog/rackspace/requests/compute_v2/get_image.rb b/lib/fog/rackspace/requests/compute_v2/get_image.rb index e52cc50b3..49f785963 100644 --- a/lib/fog/rackspace/requests/compute_v2/get_image.rb +++ b/lib/fog/rackspace/requests/compute_v2/get_image.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves image detail # @param [String] image_id # @return [Excon::Response] response: diff --git a/lib/fog/rackspace/requests/compute_v2/get_metadata_item.rb b/lib/fog/rackspace/requests/compute_v2/get_metadata_item.rb index 692f73329..8791af064 100644 --- a/lib/fog/rackspace/requests/compute_v2/get_metadata_item.rb +++ b/lib/fog/rackspace/requests/compute_v2/get_metadata_item.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves single metadatum item by key. # @param [String] collection type of metadata # @param [String] obj_id id of the object where the metadata is attached @@ -23,15 +23,15 @@ module Fog ) end end - + class Mock def get_metadata_item(collection, obj_id, key) raise Fog::Compute::RackspaceV2::NotFound if obj_id == 0 - + response = Excon::Response.new response.status = 202 response.body = {"meta" => {"environment" => "dev"}} - response + response end end end diff --git a/lib/fog/rackspace/requests/compute_v2/get_server.rb b/lib/fog/rackspace/requests/compute_v2/get_server.rb index 9c14ca998..b35dcdab0 100644 --- a/lib/fog/rackspace/requests/compute_v2/get_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/get_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves server detail # @param [String] server_id # @return [Excon::Response] response: @@ -10,13 +10,13 @@ module Fog # * server [Hash]: # * OS-DCF:diskConfig [String] - The disk configuration value. # * OS-EXT-STS:power_state [Fixnum] - The power state. - # * OS-EXT-STS:task_state [String] - The task state. + # * OS-EXT-STS:task_state [String] - The task state. # * OS-EXT-STS:vm_state [String] - The VM state. # * accessIPv4 [String] - The public IP version 4 access address. # * accessIPv6 [String] - The public IP version 6 access address. - # * addresses [Hash] - Public and private IP addresses, The version field indicates whether the IP address is version 4 or 6. + # * addresses [Hash] - Public and private IP addresses, The version field indicates whether the IP address is version 4 or 6. # * created [String] - created timestamp - # * hostId [String] - The host id. + # * hostId [String] - The host id. # * id [String] - id of image # * image [Hash]: # * id [String] - id of the image diff --git a/lib/fog/rackspace/requests/compute_v2/list_addresses.rb b/lib/fog/rackspace/requests/compute_v2/list_addresses.rb index 6e13ef158..875514766 100644 --- a/lib/fog/rackspace/requests/compute_v2/list_addresses.rb +++ b/lib/fog/rackspace/requests/compute_v2/list_addresses.rb @@ -23,12 +23,12 @@ module Fog end class Mock - + def list_addresses(server_id) raise Fog::Compute::RackspaceV2::NotFound.new if server_id == 0 response = Excon::Response.new response.status = 200 - response.body = { + response.body = { "addresses" => { "public"=>[{"version"=>6, "addr"=>"2001:4800:7811:0513:0fe1:75e8:ff04:760b"}, {"version"=>4, "addr"=>"166.78.18.176"}], "private"=>[{"version"=>4, "addr"=>"10.181.129.68"}] diff --git a/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb b/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb index 63212aead..a7b1f993e 100644 --- a/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb +++ b/lib/fog/rackspace/requests/compute_v2/list_addresses_by_network.rb @@ -5,7 +5,7 @@ module Fog # Lists all addresses associated with a specified server and network # @param [String] server_id - # @param [String] network_id + # @param [String] network_id # @return [Excon::Response] response: # * body [Hash]: # * network [Hash]: @@ -30,14 +30,14 @@ module Fog end class Mock - - RESPONSE_BODY = { + + RESPONSE_BODY = { "addresses" => { "public"=>[{"version"=>6, "addr"=>"2001:4800:7811:0513:0fe1:75e8:ff04:760b"}, {"version"=>4, "addr"=>"166.78.18.176"}], "private"=>[{"version"=>4, "addr"=>"10.181.129.68"}] } } - + def list_addresses_by_network(server_id, network_id) raise Fog::Compute::RackspaceV2::NotFound.new if server_id == 0 response = Excon::Response.new @@ -45,7 +45,7 @@ module Fog response.body = { network_id => RESPONSE_BODY["addresses"][network_id] } response end - + end end end diff --git a/lib/fog/rackspace/requests/compute_v2/list_attachments.rb b/lib/fog/rackspace/requests/compute_v2/list_attachments.rb index 34e45076d..5ba2ce9b8 100644 --- a/lib/fog/rackspace/requests/compute_v2/list_attachments.rb +++ b/lib/fog/rackspace/requests/compute_v2/list_attachments.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves list of attached volumes # @param [String] server_id # @return [Excon::Response] response: diff --git a/lib/fog/rackspace/requests/compute_v2/list_flavors.rb b/lib/fog/rackspace/requests/compute_v2/list_flavors.rb index f03c59228..5293d483f 100644 --- a/lib/fog/rackspace/requests/compute_v2/list_flavors.rb +++ b/lib/fog/rackspace/requests/compute_v2/list_flavors.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves a list of flavors # @return [Excon::Response] response: # * body [Hash]: diff --git a/lib/fog/rackspace/requests/compute_v2/list_images.rb b/lib/fog/rackspace/requests/compute_v2/list_images.rb index 687b605c9..d332bfcd4 100644 --- a/lib/fog/rackspace/requests/compute_v2/list_images.rb +++ b/lib/fog/rackspace/requests/compute_v2/list_images.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves a list of images # ==== Parameters # * options<~String>: diff --git a/lib/fog/rackspace/requests/compute_v2/list_images_detail.rb b/lib/fog/rackspace/requests/compute_v2/list_images_detail.rb index b5d3891a1..1fa7e0719 100644 --- a/lib/fog/rackspace/requests/compute_v2/list_images_detail.rb +++ b/lib/fog/rackspace/requests/compute_v2/list_images_detail.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves a list of images # ==== Parameters # * options<~String>: diff --git a/lib/fog/rackspace/requests/compute_v2/list_metadata.rb b/lib/fog/rackspace/requests/compute_v2/list_metadata.rb index 83b3c3121..484cffa11 100644 --- a/lib/fog/rackspace/requests/compute_v2/list_metadata.rb +++ b/lib/fog/rackspace/requests/compute_v2/list_metadata.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves all metadata associated with a server or an image. # @param [String] collection type of metadata # @param [String] obj_id id of the object where the metadata is attached @@ -22,7 +22,7 @@ module Fog ) end end - + class Mock def list_metadata(collection, obj_id) raise Fog::Compute::RackspaceV2::NotFound if obj_id == 0 diff --git a/lib/fog/rackspace/requests/compute_v2/list_servers.rb b/lib/fog/rackspace/requests/compute_v2/list_servers.rb index a15bf1010..61fc4be95 100644 --- a/lib/fog/rackspace/requests/compute_v2/list_servers.rb +++ b/lib/fog/rackspace/requests/compute_v2/list_servers.rb @@ -2,20 +2,20 @@ module Fog module Compute class RackspaceV2 class Real - + # Retrieves list of servers # @return [Excon::Response] response: # * body [Hash]: # * server [Hash]: # * OS-DCF:diskConfig [String] - The disk configuration value. # * OS-EXT-STS:power_state [Fixnum] - The power state. - # * OS-EXT-STS:task_state [String] - The task state. + # * OS-EXT-STS:task_state [String] - The task state. # * OS-EXT-STS:vm_state [String] - The VM state. # * accessIPv4 [String] - The public IP version 4 access address. # * accessIPv6 [String] - The public IP version 6 access address. - # * addresses [Hash] - Public and private IP addresses, The version field indicates whether the IP address is version 4 or 6. + # * addresses [Hash] - Public and private IP addresses, The version field indicates whether the IP address is version 4 or 6. # * created [String] - created timestamp - # * hostId [String] - The host id. + # * hostId [String] - The host id. # * id [String] - id of image # * image [Hash]: # * id [String] - id of the image diff --git a/lib/fog/rackspace/requests/compute_v2/reboot_server.rb b/lib/fog/rackspace/requests/compute_v2/reboot_server.rb index 1f08e1adc..0c4aa6ad7 100644 --- a/lib/fog/rackspace/requests/compute_v2/reboot_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/reboot_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Reboots server # @param [String] server_id # @param [String] type type of reboot diff --git a/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb b/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb index fc0926066..79ba7d53b 100644 --- a/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/rebuild_server.rb @@ -2,9 +2,9 @@ module Fog module Compute class RackspaceV2 class Real - - # The rebuild operation removes all data on the server and replaces it with the specified image. - # The serverRef and all IP addresses remain the same. If you specify name, metadata, accessIPv4, + + # The rebuild operation removes all data on the server and replaces it with the specified image. + # The serverRef and all IP addresses remain the same. If you specify name, metadata, accessIPv4, # or accessIPv6 in the rebuild request, new values replace existing values. Otherwise, these values do not change. # @param [String] server_id id of the server to rebuild # @param [String] image_id id of image used to rebuild the server @@ -16,11 +16,11 @@ module Fog # @option options [String] OS-DCF:diskConfig The disk configuration value. (AUTO or MANUAL) # @option options [Hash] personality Hash containing data to inject into the file system of the cloud server instance during server creation. # @return [Excon::Response] response: - # * body [Hash]: + # * body [Hash]: # * server [Hash]: # * name [String] - name of server # * imageRef [String] - id of image used to create server - # * flavorRef [String] - id of flavor used to create server + # * flavorRef [String] - id of flavor used to create server # * OS-DCF:diskConfig [String] - The disk configuration value. # * name [String] - name of server # * metadata [Hash] - Metadata key and value pairs. diff --git a/lib/fog/rackspace/requests/compute_v2/rescue_server.rb b/lib/fog/rackspace/requests/compute_v2/rescue_server.rb index 0d6769e84..4d1939f4c 100644 --- a/lib/fog/rackspace/requests/compute_v2/rescue_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/rescue_server.rb @@ -14,7 +14,7 @@ module Fog # # * Status Transition: # * PREP_RESCUE -> RESCUE - # * PREP_RESCUE -> ACTIVE (on error) + # * PREP_RESCUE -> ACTIVE (on error) def rescue_server(server_id) data = { 'rescue' => nil diff --git a/lib/fog/rackspace/requests/compute_v2/resize_server.rb b/lib/fog/rackspace/requests/compute_v2/resize_server.rb index 7b5c9a415..945a3e088 100644 --- a/lib/fog/rackspace/requests/compute_v2/resize_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/resize_server.rb @@ -16,7 +16,7 @@ module Fog # # * Status Transition: # * VERIFY_RESIZE -> ACTIVE - # * VERIFY_RESIZE -> ERROR (on error) + # * VERIFY_RESIZE -> ERROR (on error) def resize_server(server_id, flavor_id) data = { 'resize' => { diff --git a/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb b/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb index a537db61c..717068c8b 100644 --- a/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/revert_resize_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Reverts server resize operation # @param [String] server_id # @return [Excon::Response] response diff --git a/lib/fog/rackspace/requests/compute_v2/set_metadata.rb b/lib/fog/rackspace/requests/compute_v2/set_metadata.rb index 3c0175077..e02ae2983 100644 --- a/lib/fog/rackspace/requests/compute_v2/set_metadata.rb +++ b/lib/fog/rackspace/requests/compute_v2/set_metadata.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Sets metadata associated with a server or an image. # @param [String] collection type of metadata # @param [String] obj_id id of the object where the metadata is attached @@ -20,16 +20,16 @@ module Fog :expects => [200, 203], :method => 'PUT', :path => "/#{collection}/#{obj_id}/metadata", - :body => Fog::JSON.encode('metadata' => metadata) + :body => Fog::JSON.encode('metadata' => metadata) ) end end - - + + class Mock def set_metadata(collection, obj_id, metadata = {}) raise Fog::Compute::RackspaceV2::NotFound if obj_id == 0 - + response = Excon::Response.new response.status = 202 response.body = {"metadata"=>{"environment"=>"dev"}} diff --git a/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb b/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb index 6005f4e94..4981123b5 100644 --- a/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb +++ b/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb @@ -2,12 +2,12 @@ module Fog module Compute class RackspaceV2 class Real - + # Sets a single metadatum item by key. # @param [String] collection type of metadata # @param [String] obj_id id of the object where the metadata is attached # @param [String] key the key of the metadata to set - # @param [String] value the value of the metadata to set + # @param [String] value the value of the metadata to set # @return [Excon::Response] response: # * body [Hash]: # * meta [Hash]: @@ -21,19 +21,19 @@ module Fog :expects => 200, :method => 'PUT', :path => "/#{collection}/#{obj_id}/metadata/#{key}", - :body => Fog::JSON.encode('meta' => { key => value }) + :body => Fog::JSON.encode('meta' => { key => value }) ) end end - + class Mock def set_metadata_item(collection, obj_id, key, value) raise Fog::Compute::RackspaceV2::NotFound if obj_id == 0 - + response = Excon::Response.new response.status = 202 response.body = {"meta" => {key => value}} - response + response end end end diff --git a/lib/fog/rackspace/requests/compute_v2/update_metadata.rb b/lib/fog/rackspace/requests/compute_v2/update_metadata.rb index a2306947f..338e0b912 100644 --- a/lib/fog/rackspace/requests/compute_v2/update_metadata.rb +++ b/lib/fog/rackspace/requests/compute_v2/update_metadata.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Updates metadata items for a specified server or image. # @param [String] collection type of metadata # @param [String] obj_id id of the object where the metadata is attached @@ -20,19 +20,19 @@ module Fog :expects => [200, 203], :method => 'POST', :path => "/#{collection}/#{obj_id}/metadata", - :body => Fog::JSON.encode('metadata' => metadata) + :body => Fog::JSON.encode('metadata' => metadata) ) end end - + class Mock def update_metadata(collection, obj_id, metadata = {}) raise Fog::Compute::RackspaceV2::NotFound if obj_id == 0 - + response = Excon::Response.new response.status = 202 response.body = {"metadata" => {"environment" => "dev", "tag" => "database"}} - response + response end end end diff --git a/lib/fog/rackspace/requests/compute_v2/update_server.rb b/lib/fog/rackspace/requests/compute_v2/update_server.rb index c3b8e6a1c..a3d6ca1a4 100644 --- a/lib/fog/rackspace/requests/compute_v2/update_server.rb +++ b/lib/fog/rackspace/requests/compute_v2/update_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class RackspaceV2 class Real - + # Update the editable attributes of a specified server. # @param [String] server_id # @param [Hash] options @@ -14,7 +14,7 @@ module Fog # @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500 # @raise [Fog::Compute::RackspaceV2::ServiceError] # @note If you edit the server name, the server host name does not change. Also, server names are not guaranteed to be unique. - # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ServerUpdate.html + # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ServerUpdate.html def update_server(server_id, options={}) data = options.is_a?(Hash) ? options : { 'name' => options } #LEGACY - second parameter was previously server name @@ -33,7 +33,7 @@ module Fog name.each_pair {|k,v| server[k] = v } if name.is_a?(Hash) server['name'] = name if name.is_a?(String) server_response = Fog::Rackspace::MockData.keep(server, 'id', 'name', 'hostId', 'created', 'updated', 'status', 'progress', 'user_id', 'tenant_id', 'links', 'metadata', 'accessIPv4', 'accessIPv6', 'OS-DCF:diskConfig', 'rax-bandwidth:bandwidth', 'addresses', 'flavor', 'links', 'image') - + response( :status => 200, :body => {'server' => server_response} diff --git a/lib/fog/rackspace/requests/dns/add_records.rb b/lib/fog/rackspace/requests/dns/add_records.rb index ee67f4d9b..e374afbe7 100644 --- a/lib/fog/rackspace/requests/dns/add_records.rb +++ b/lib/fog/rackspace/requests/dns/add_records.rb @@ -13,11 +13,11 @@ module Fog 'type' => record[:type], 'data' => record[:data] } - + if record.has_key? :ttl record_data['ttl'] = record[:ttl] end - + if record.has_key? :priority record_data['priority'] = record[:priority] end diff --git a/lib/fog/rackspace/requests/load_balancers/get_stats.rb b/lib/fog/rackspace/requests/load_balancers/get_stats.rb index ddb4aeefa..ae8f01096 100644 --- a/lib/fog/rackspace/requests/load_balancers/get_stats.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_stats.rb @@ -28,4 +28,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/rackspace/requests/monitoring/create_agent_token.rb b/lib/fog/rackspace/requests/monitoring/create_agent_token.rb index 544b1cd90..639ea7659 100644 --- a/lib/fog/rackspace/requests/monitoring/create_agent_token.rb +++ b/lib/fog/rackspace/requests/monitoring/create_agent_token.rb @@ -19,7 +19,7 @@ module Fog account_id = Fog::Mock.random_numbers(6).to_s token = Fog::Mock.random_letters(50).to_s - + if options == -1 raise TypeError end diff --git a/lib/fog/rackspace/requests/monitoring/create_alarm.rb b/lib/fog/rackspace/requests/monitoring/create_alarm.rb index e6cbd4dbd..d0d182f3f 100644 --- a/lib/fog/rackspace/requests/monitoring/create_alarm.rb +++ b/lib/fog/rackspace/requests/monitoring/create_alarm.rb @@ -42,7 +42,7 @@ module Fog } response.remote_ip = Fog::Rackspace::MockData.ipv4_address response - + end end end diff --git a/lib/fog/rackspace/requests/monitoring/create_check.rb b/lib/fog/rackspace/requests/monitoring/create_check.rb index 3d4299d01..9783cf35b 100644 --- a/lib/fog/rackspace/requests/monitoring/create_check.rb +++ b/lib/fog/rackspace/requests/monitoring/create_check.rb @@ -19,7 +19,7 @@ module Fog account_id = Fog::Mock.random_numbers(6).to_s mock_id = Fog::Mock.random_letters(10).to_s - + if options[:type] == "" raise Fog::Rackspace::Monitoring::BadRequest end diff --git a/lib/fog/rackspace/requests/monitoring/create_entity.rb b/lib/fog/rackspace/requests/monitoring/create_entity.rb index 8bd54aa6c..53255030d 100644 --- a/lib/fog/rackspace/requests/monitoring/create_entity.rb +++ b/lib/fog/rackspace/requests/monitoring/create_entity.rb @@ -21,7 +21,7 @@ module Fog account_id = Fog::Mock.random_numbers(6).to_s entity_id = Fog::Mock.random_letters(10) - if options[:label] == "" + if options[:label] == "" raise Fog::Rackspace::Monitoring::BadRequest end diff --git a/lib/fog/rackspace/requests/monitoring/delete_alarm.rb b/lib/fog/rackspace/requests/monitoring/delete_alarm.rb index fd19005cf..16d949d8e 100644 --- a/lib/fog/rackspace/requests/monitoring/delete_alarm.rb +++ b/lib/fog/rackspace/requests/monitoring/delete_alarm.rb @@ -37,7 +37,7 @@ module Fog } response.remote_ip = Fog::Rackspace::MockData.ipv4_address response - end + end end end end diff --git a/lib/fog/rackspace/requests/monitoring/delete_check.rb b/lib/fog/rackspace/requests/monitoring/delete_check.rb index a7671a465..eadcf6509 100644 --- a/lib/fog/rackspace/requests/monitoring/delete_check.rb +++ b/lib/fog/rackspace/requests/monitoring/delete_check.rb @@ -14,7 +14,7 @@ module Fog class Mock def delete_check(entity_id, check_id) - + if entity_id == -1 || check_id == -1 raise Fog::Rackspace::Monitoring::NotFound end diff --git a/lib/fog/rackspace/requests/monitoring/get_agent.rb b/lib/fog/rackspace/requests/monitoring/get_agent.rb index 72353989f..f2c0c430b 100644 --- a/lib/fog/rackspace/requests/monitoring/get_agent.rb +++ b/lib/fog/rackspace/requests/monitoring/get_agent.rb @@ -21,7 +21,7 @@ module Fog response = Excon::Response.new response.status = 200 response.body = { - "id" => Fog::Rackspace::MockData.uuid, + "id" => Fog::Rackspace::MockData.uuid, "last_connected" => Time.now.to_i - 100, } response.headers = { diff --git a/lib/fog/rackspace/requests/monitoring/get_check.rb b/lib/fog/rackspace/requests/monitoring/get_check.rb index ac2c42858..7e4391bfc 100644 --- a/lib/fog/rackspace/requests/monitoring/get_check.rb +++ b/lib/fog/rackspace/requests/monitoring/get_check.rb @@ -23,30 +23,30 @@ module Fog response.status = 200 response.body = { "id" => check_id, - "label" => nil, - "type" => "remote.ping", - "details" => {"count"=>5}, - "monitoring_zones_poll" => ["mzord", "mzdfw", "mziad"], - "timeout" => 10, - "period" => 30, - "target_alias" => nil, - "target_hostname" => "1.1.1.1", - "target_resolver" => "IPv4", - "disabled" => false, - "metadata" => nil, + "label" => nil, + "type" => "remote.ping", + "details" => {"count"=>5}, + "monitoring_zones_poll" => ["mzord", "mzdfw", "mziad"], + "timeout" => 10, + "period" => 30, + "target_alias" => nil, + "target_hostname" => "1.1.1.1", + "target_resolver" => "IPv4", + "disabled" => false, + "metadata" => nil, "created_at" => Time.now.to_i - 1, "updated_at" => Time.now.to_i }, response.headers = { "Date" => Time.now.utc.to_s, - "Content-Type" => "application/json; charset=UTF-8", - "X-RateLimit-Limit" => "50000", - "X-RateLimit-Remaining" => "44676", - "X-RateLimit-Window" => "24 hours", - "X-RateLimit-Type" => "global", - "X-Response-Id" => "jdnbono34090934nggn", - "X-LB" => "ord1-maas-prod-api0", - "Vary" => "Accept-Encoding", + "Content-Type" => "application/json; charset=UTF-8", + "X-RateLimit-Limit" => "50000", + "X-RateLimit-Remaining" => "44676", + "X-RateLimit-Window" => "24 hours", + "X-RateLimit-Type" => "global", + "X-Response-Id" => "jdnbono34090934nggn", + "X-LB" => "ord1-maas-prod-api0", + "Vary" => "Accept-Encoding", "Transfer-Encoding" => "chunked" } response.remote_ip = Fog::Rackspace::MockData.ipv4_address diff --git a/lib/fog/rackspace/requests/monitoring/get_cpus_info.rb b/lib/fog/rackspace/requests/monitoring/get_cpus_info.rb index 34dd52155..2369bc6a1 100644 --- a/lib/fog/rackspace/requests/monitoring/get_cpus_info.rb +++ b/lib/fog/rackspace/requests/monitoring/get_cpus_info.rb @@ -35,7 +35,7 @@ module Fog "stolen" => Fog::Mock.random_numbers(7).to_i, "sys" => Fog::Mock.random_numbers(7).to_i, "user" => Fog::Mock.random_numbers(9).to_i, - "wait" => Fog::Mock.random_numbers(7).to_i, + "wait" => Fog::Mock.random_numbers(7).to_i, "total" => Fog::Mock.random_numbers(11).to_i, "total_cores" => 1, "total_sockets" => 1 diff --git a/lib/fog/rackspace/requests/monitoring/get_logged_in_user_info.rb b/lib/fog/rackspace/requests/monitoring/get_logged_in_user_info.rb index 7ff36f4c1..913028437 100644 --- a/lib/fog/rackspace/requests/monitoring/get_logged_in_user_info.rb +++ b/lib/fog/rackspace/requests/monitoring/get_logged_in_user_info.rb @@ -18,7 +18,7 @@ module Fog if agent_id == -1 raise Fog::Rackspace::Monitoring::BadRequest end - + response = Excon::Response.new response.status = 200 response.body = { @@ -34,7 +34,7 @@ module Fog "device" => "pts/2", "time" => Time.now.to_i - 50, "host" => "somehost2.company.local" - } + } ] } response.headers = { diff --git a/lib/fog/rackspace/requests/monitoring/get_memory_info.rb b/lib/fog/rackspace/requests/monitoring/get_memory_info.rb index 98a866383..e1a6277b6 100644 --- a/lib/fog/rackspace/requests/monitoring/get_memory_info.rb +++ b/lib/fog/rackspace/requests/monitoring/get_memory_info.rb @@ -32,7 +32,7 @@ module Fog "ram" => Fog::Mock.random_numbers(4).to_i, "swap_total" => Fog::Mock.random_numbers(10).to_i, "swap_used" => Fog::Mock.random_numbers(8).to_i, - "swap_free" => Fog::Mock.random_numbers(10).to_i, + "swap_free" => Fog::Mock.random_numbers(10).to_i, "swap_page_in" => Fog::Mock.random_numbers(3).to_i, "swap_page_out" => Fog::Mock.random_numbers(3).to_i, } diff --git a/lib/fog/rackspace/requests/monitoring/get_network_interfaces_info.rb b/lib/fog/rackspace/requests/monitoring/get_network_interfaces_info.rb index 04efd4b29..9ee29ca50 100644 --- a/lib/fog/rackspace/requests/monitoring/get_network_interfaces_info.rb +++ b/lib/fog/rackspace/requests/monitoring/get_network_interfaces_info.rb @@ -18,7 +18,7 @@ module Fog if agent_id == -1 raise Fog::Rackspace::Monitoring::BadRequest end - + response = Excon::Response.new response.status = 200 response.body = { @@ -67,7 +67,7 @@ module Fog "tx_packets" => Fog::Mock.random_numbers(7).to_i, "tx_bytes" => Fog::Mock.random_numbers(9).to_i, "flags" => Fog::Mock.random_numbers(4).to_i, - } + } ] } response.headers = { diff --git a/lib/fog/rackspace/requests/monitoring/get_notification.rb b/lib/fog/rackspace/requests/monitoring/get_notification.rb index 48c919880..00ef2fb61 100644 --- a/lib/fog/rackspace/requests/monitoring/get_notification.rb +++ b/lib/fog/rackspace/requests/monitoring/get_notification.rb @@ -27,7 +27,7 @@ module Fog "type" => "email", "updated_at" => 1378784136307 } - + response.headers = { "Date"=> Time.now.utc.to_s, "Content-Type"=>"application/json; charset=UTF-8", diff --git a/lib/fog/rackspace/requests/monitoring/get_processes_info.rb b/lib/fog/rackspace/requests/monitoring/get_processes_info.rb index d2f4d5496..1395220ea 100644 --- a/lib/fog/rackspace/requests/monitoring/get_processes_info.rb +++ b/lib/fog/rackspace/requests/monitoring/get_processes_info.rb @@ -22,7 +22,7 @@ module Fog if agent_id == -1 raise Fog::Rackspace::Monitoring::BadRequest end - + response = Excon::Response.new response.status = 200 response.body = { diff --git a/lib/fog/rackspace/requests/monitoring/list_agents.rb b/lib/fog/rackspace/requests/monitoring/list_agents.rb index 42c7de941..dd8b4ca47 100644 --- a/lib/fog/rackspace/requests/monitoring/list_agents.rb +++ b/lib/fog/rackspace/requests/monitoring/list_agents.rb @@ -31,7 +31,7 @@ module Fog "last_connected" => Time.now.to_i - 120 } ], - + "metadata" => { "count" => 1, "limit" => 100, @@ -39,8 +39,8 @@ module Fog "next_marker" => nil, "next_href" => nil } - } - + } + response.headers = { "Date" => Time.now.utc.to_s, "Content-Type" => "application/json; charset=UTF-8", diff --git a/lib/fog/rackspace/requests/monitoring/list_check_types.rb b/lib/fog/rackspace/requests/monitoring/list_check_types.rb index cf1d3dbb7..b1f669e63 100644 --- a/lib/fog/rackspace/requests/monitoring/list_check_types.rb +++ b/lib/fog/rackspace/requests/monitoring/list_check_types.rb @@ -29,7 +29,7 @@ module Fog "description"=> "Port number (default: 53)", "optional" => true }, - { + { "name" => "query", "description"=> "DNS Query", "optional" => false @@ -39,7 +39,7 @@ module Fog "description" => "DNS Record Type", "optional" => false } - ], + ], "category" => "remote" }, @@ -57,7 +57,7 @@ module Fog ], - + "metadata" => { "count" => 2, "limit" => 100, diff --git a/lib/fog/rackspace/requests/monitoring/list_entities.rb b/lib/fog/rackspace/requests/monitoring/list_entities.rb index 88dd10a47..30784f594 100644 --- a/lib/fog/rackspace/requests/monitoring/list_entities.rb +++ b/lib/fog/rackspace/requests/monitoring/list_entities.rb @@ -12,7 +12,7 @@ module Fog ) end end - + class Mock def list_entities(options={}) account_id = Fog::Mock.random_numbers(6).to_s diff --git a/lib/fog/rackspace/requests/monitoring/list_metrics.rb b/lib/fog/rackspace/requests/monitoring/list_metrics.rb index 9e11b3e6f..e30e42230 100644 --- a/lib/fog/rackspace/requests/monitoring/list_metrics.rb +++ b/lib/fog/rackspace/requests/monitoring/list_metrics.rb @@ -76,7 +76,7 @@ module Fog response end end - + end end end diff --git a/lib/fog/rackspace/requests/monitoring/list_notifications.rb b/lib/fog/rackspace/requests/monitoring/list_notifications.rb index 109332aa8..cbde654bb 100644 --- a/lib/fog/rackspace/requests/monitoring/list_notifications.rb +++ b/lib/fog/rackspace/requests/monitoring/list_notifications.rb @@ -13,7 +13,7 @@ module Fog end end - + class Mock def list_notifications(options={}) account_id = Fog::Mock.random_numbers(6).to_s @@ -60,8 +60,8 @@ module Fog response end end - - end + + end end end diff --git a/lib/fog/rackspace/requests/monitoring/list_overview.rb b/lib/fog/rackspace/requests/monitoring/list_overview.rb index cbf116bfe..8f513802b 100644 --- a/lib/fog/rackspace/requests/monitoring/list_overview.rb +++ b/lib/fog/rackspace/requests/monitoring/list_overview.rb @@ -30,7 +30,7 @@ module Fog "entity" => { "id" => entity_id, "label" => "mock_entity", - "ip_addresses" => { + "ip_addresses" => { "access_ip0_v6" => Fog::Rackspace::MockData.ipv6_address, "public0_v4" => Fog::Rackspace::MockData.ipv4_address, "public1_v6" => Fog::Rackspace::MockData.ipv6_address, @@ -80,7 +80,7 @@ module Fog "latest_alarm_states" => [] } ], - + "metadata" => { "count" => 1, "limit" => 100, @@ -107,7 +107,7 @@ module Fog response.remote_ip = Fog::Rackspace::MockData.ipv4_address response end - end + end end end diff --git a/lib/fog/rackspace/requests/monitoring/update_entity.rb b/lib/fog/rackspace/requests/monitoring/update_entity.rb index bd66e822b..3a0fecf3d 100644 --- a/lib/fog/rackspace/requests/monitoring/update_entity.rb +++ b/lib/fog/rackspace/requests/monitoring/update_entity.rb @@ -42,7 +42,7 @@ module Fog response.remote_ip = Fog::Rackspace::MockData.ipv4_address response end - end + end end end end diff --git a/lib/fog/rackspace/requests/storage/extract_archive.rb b/lib/fog/rackspace/requests/storage/extract_archive.rb index 2986a0ad2..3317c0de3 100644 --- a/lib/fog/rackspace/requests/storage/extract_archive.rb +++ b/lib/fog/rackspace/requests/storage/extract_archive.rb @@ -11,7 +11,7 @@ module Fog # * container<~String> - Name for container, should be < 256 bytes and must not contain '/' # * data<~String|File> - file to upload # * archive_format<~String> - "tar", "tar.gz", or "tar.bz2" - + # @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404 # @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400 # @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500 diff --git a/lib/fog/rackspace/requests/storage/get_object_http_url.rb b/lib/fog/rackspace/requests/storage/get_object_http_url.rb index 2bf419f5b..7b66d3c91 100644 --- a/lib/fog/rackspace/requests/storage/get_object_http_url.rb +++ b/lib/fog/rackspace/requests/storage/get_object_http_url.rb @@ -34,4 +34,4 @@ module Fog end end -end \ No newline at end of file +end diff --git a/lib/fog/riakcs/requests/usage/get_usage.rb b/lib/fog/riakcs/requests/usage/get_usage.rb index 78be7f797..c8831167e 100644 --- a/lib/fog/riakcs/requests/usage/get_usage.rb +++ b/lib/fog/riakcs/requests/usage/get_usage.rb @@ -42,22 +42,22 @@ module Fog response end end - + class Mock include Utils - def get_usage(access_key, options = {}) + def get_usage(access_key, options = {}) Excon::Response.new.tap do |response| response.status = 200 response.headers['Content-Type'] = 'application/json' response.body = { - 'Access' => { + 'Access' => { 'Nodes' => [], - 'Errors' => [] + 'Errors' => [] }, - 'Storage' => { + 'Storage' => { 'Samples' => [], - 'Errors' => [] + 'Errors' => [] } } end diff --git a/lib/fog/serverlove/requests/compute/create_image.rb b/lib/fog/serverlove/requests/compute/create_image.rb index ab77e9a98..521185886 100644 --- a/lib/fog/serverlove/requests/compute/create_image.rb +++ b/lib/fog/serverlove/requests/compute/create_image.rb @@ -9,7 +9,7 @@ module Fog end end - + class Mock def create_image(options = {}) diff --git a/lib/fog/serverlove/requests/compute/create_server.rb b/lib/fog/serverlove/requests/compute/create_server.rb index 34bf6016e..0213853b1 100644 --- a/lib/fog/serverlove/requests/compute/create_server.rb +++ b/lib/fog/serverlove/requests/compute/create_server.rb @@ -9,7 +9,7 @@ module Fog end end - + class Mock def create_server(options = {}) diff --git a/lib/fog/serverlove/requests/compute/destroy_image.rb b/lib/fog/serverlove/requests/compute/destroy_image.rb index 745015084..d0cc0c2bd 100644 --- a/lib/fog/serverlove/requests/compute/destroy_image.rb +++ b/lib/fog/serverlove/requests/compute/destroy_image.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/destroy_server.rb b/lib/fog/serverlove/requests/compute/destroy_server.rb index 692b8d22a..aa1ba713d 100644 --- a/lib/fog/serverlove/requests/compute/destroy_server.rb +++ b/lib/fog/serverlove/requests/compute/destroy_server.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/get_image.rb b/lib/fog/serverlove/requests/compute/get_image.rb index a13e9d1cc..7aa00635b 100644 --- a/lib/fog/serverlove/requests/compute/get_image.rb +++ b/lib/fog/serverlove/requests/compute/get_image.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/get_images.rb b/lib/fog/serverlove/requests/compute/get_images.rb index c8e7c6282..771296fc1 100644 --- a/lib/fog/serverlove/requests/compute/get_images.rb +++ b/lib/fog/serverlove/requests/compute/get_images.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/get_server.rb b/lib/fog/serverlove/requests/compute/get_server.rb index 219ff8bb8..5f42e2b3d 100644 --- a/lib/fog/serverlove/requests/compute/get_server.rb +++ b/lib/fog/serverlove/requests/compute/get_server.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/get_servers.rb b/lib/fog/serverlove/requests/compute/get_servers.rb index 19d9bf387..6fe172a68 100644 --- a/lib/fog/serverlove/requests/compute/get_servers.rb +++ b/lib/fog/serverlove/requests/compute/get_servers.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/load_standard_image.rb b/lib/fog/serverlove/requests/compute/load_standard_image.rb index c4bcedc6d..813378112 100644 --- a/lib/fog/serverlove/requests/compute/load_standard_image.rb +++ b/lib/fog/serverlove/requests/compute/load_standard_image.rb @@ -4,7 +4,7 @@ module Fog class Real def load_standard_image(destination_image, source_image) - request(:method => "post", :path => "/drives/#{destination_image}/image/#{source_image}/gunzip", :expects => 204) + request(:method => "post", :path => "/drives/#{destination_image}/image/#{source_image}/gunzip", :expects => 204) end end diff --git a/lib/fog/serverlove/requests/compute/reset_server.rb b/lib/fog/serverlove/requests/compute/reset_server.rb index 99b0de64d..aef2fd4e4 100644 --- a/lib/fog/serverlove/requests/compute/reset_server.rb +++ b/lib/fog/serverlove/requests/compute/reset_server.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/shutdown_server.rb b/lib/fog/serverlove/requests/compute/shutdown_server.rb index ebc24893f..be91bab97 100644 --- a/lib/fog/serverlove/requests/compute/shutdown_server.rb +++ b/lib/fog/serverlove/requests/compute/shutdown_server.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/start_server.rb b/lib/fog/serverlove/requests/compute/start_server.rb index a8e562ff4..e0084069d 100644 --- a/lib/fog/serverlove/requests/compute/start_server.rb +++ b/lib/fog/serverlove/requests/compute/start_server.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/stop_server.rb b/lib/fog/serverlove/requests/compute/stop_server.rb index 2cc73b8e7..da181a1ce 100644 --- a/lib/fog/serverlove/requests/compute/stop_server.rb +++ b/lib/fog/serverlove/requests/compute/stop_server.rb @@ -10,4 +10,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/serverlove/requests/compute/update_image.rb b/lib/fog/serverlove/requests/compute/update_image.rb index f7e532833..be344c339 100644 --- a/lib/fog/serverlove/requests/compute/update_image.rb +++ b/lib/fog/serverlove/requests/compute/update_image.rb @@ -6,7 +6,7 @@ module Fog def update_image(identifier, options) return nil if identifier.nil? || identifier == "" return nil if options.empty? || options.nil? - request(:method => "post", :path => "/drives/#{identifier}/set", :expects => 200, :options => options) + request(:method => "post", :path => "/drives/#{identifier}/set", :expects => 200, :options => options) end end diff --git a/lib/fog/serverlove/requests/compute/update_server.rb b/lib/fog/serverlove/requests/compute/update_server.rb index 2994770e7..eef5d3f1f 100644 --- a/lib/fog/serverlove/requests/compute/update_server.rb +++ b/lib/fog/serverlove/requests/compute/update_server.rb @@ -6,7 +6,7 @@ module Fog def update_server(identifier, options) return nil if identifier.nil? || identifier == "" return nil if options.empty? || options.nil? - request(:method => "post", :path => "/servers/#{identifier}/set", :expects => 200, :options => options) + request(:method => "post", :path => "/servers/#{identifier}/set", :expects => 200, :options => options) end end diff --git a/lib/fog/serverlove/util/compute/password_generator.rb b/lib/fog/serverlove/util/compute/password_generator.rb index 168f247ab..75eec873e 100644 --- a/lib/fog/serverlove/util/compute/password_generator.rb +++ b/lib/fog/serverlove/util/compute/password_generator.rb @@ -8,4 +8,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/README.md b/lib/fog/storm_on_demand/README.md index 402fa09f6..19e303612 100644 --- a/lib/fog/storm_on_demand/README.md +++ b/lib/fog/storm_on_demand/README.md @@ -7,7 +7,7 @@ This storm_on_demand directory provides code for all storm on demand cloud APIs. Before using APIs of a service, you need to create a service object first. Take Compute for instance: c = Fog::Compute.new :provider => :stormondemand, - :storm_on_demand_username => 'username', + :storm_on_demand_username => 'username', :storm_on_demand_password => 'password' Now, you can call API methods for Compute service. For instance: @@ -36,7 +36,7 @@ All APIs' parameters are the same with the [Storm On Demand API Doc](https://www If you want to use a token instead of password for API calls, instead of creating a new service like Compute, you should create a new Account first and get the token. Then create a new Compute/Network/Storage with the token. account = Fog::Account.new :provider => :stormondemand, - :storm_on_demand_username => 'username', + :storm_on_demand_username => 'username', :storm_on_demand_password => 'password' # create a new token token = account.tokens.create diff --git a/lib/fog/storm_on_demand/compute.rb b/lib/fog/storm_on_demand/compute.rb index 9a3fb8e48..74f0ff632 100644 --- a/lib/fog/storm_on_demand/compute.rb +++ b/lib/fog/storm_on_demand/compute.rb @@ -60,7 +60,7 @@ module Fog request :current_notifications request :get_notification request :resolve_notification - + class Mock def self.data diff --git a/lib/fog/storm_on_demand/core.rb b/lib/fog/storm_on_demand/core.rb index 10f55b676..90c3de266 100644 --- a/lib/fog/storm_on_demand/core.rb +++ b/lib/fog/storm_on_demand/core.rb @@ -14,7 +14,7 @@ module Fog service(:support, 'Support') service(:account, 'Account') service(:vpn, 'VPN') - + end end diff --git a/lib/fog/storm_on_demand/dns.rb b/lib/fog/storm_on_demand/dns.rb index 759945e24..38beb46f5 100644 --- a/lib/fog/storm_on_demand/dns.rb +++ b/lib/fog/storm_on_demand/dns.rb @@ -43,7 +43,7 @@ module Fog request :get_zone request :list_zones request :update_zone - + class Mock def self.data diff --git a/lib/fog/storm_on_demand/models/account/token.rb b/lib/fog/storm_on_demand/models/account/token.rb index ec3d04c80..6768c93e2 100644 --- a/lib/fog/storm_on_demand/models/account/token.rb +++ b/lib/fog/storm_on_demand/models/account/token.rb @@ -15,7 +15,7 @@ module Fog def expire service.expire_token.body['expired'].to_i == 1 ? true : false end - + end end diff --git a/lib/fog/storm_on_demand/models/billing/payment.rb b/lib/fog/storm_on_demand/models/billing/payment.rb index d9d041e30..d7c3074d5 100644 --- a/lib/fog/storm_on_demand/models/billing/payment.rb +++ b/lib/fog/storm_on_demand/models/billing/payment.rb @@ -9,9 +9,9 @@ module Fog def initialize(attributes={}) super end - + end - + end end end diff --git a/lib/fog/storm_on_demand/models/compute/image.rb b/lib/fog/storm_on_demand/models/compute/image.rb index 22ab31054..9cfe6bf11 100644 --- a/lib/fog/storm_on_demand/models/compute/image.rb +++ b/lib/fog/storm_on_demand/models/compute/image.rb @@ -33,7 +33,7 @@ module Fog service.restore_image({:id => identity}.merge!(options)) true end - + end end diff --git a/lib/fog/storm_on_demand/models/compute/notification.rb b/lib/fog/storm_on_demand/models/compute/notification.rb index bb54589cf..eae1b0b90 100644 --- a/lib/fog/storm_on_demand/models/compute/notification.rb +++ b/lib/fog/storm_on_demand/models/compute/notification.rb @@ -26,7 +26,7 @@ module Fog requires :identity service.resolve_notification(:id => identity).body end - + end end diff --git a/lib/fog/storm_on_demand/models/compute/notifications.rb b/lib/fog/storm_on_demand/models/compute/notifications.rb index 7cc37cb7b..76a969701 100644 --- a/lib/fog/storm_on_demand/models/compute/notifications.rb +++ b/lib/fog/storm_on_demand/models/compute/notifications.rb @@ -22,7 +22,7 @@ module Fog data = service.get_notification(options).body new(data) end - + end end diff --git a/lib/fog/storm_on_demand/models/compute/templates.rb b/lib/fog/storm_on_demand/models/compute/templates.rb index 9953135a1..5b28623ea 100644 --- a/lib/fog/storm_on_demand/models/compute/templates.rb +++ b/lib/fog/storm_on_demand/models/compute/templates.rb @@ -18,7 +18,7 @@ module Fog tpl = service.get_template_details(:id => template_id).body new(tpl) end - + end end diff --git a/lib/fog/storm_on_demand/models/dns/zone.rb b/lib/fog/storm_on_demand/models/dns/zone.rb index 0177cc414..5e3992d49 100644 --- a/lib/fog/storm_on_demand/models/dns/zone.rb +++ b/lib/fog/storm_on_demand/models/dns/zone.rb @@ -33,7 +33,7 @@ module Fog requires :identity service.update_zone({:id => identity}.merge!(options)) end - + end end end diff --git a/lib/fog/storm_on_demand/models/network/firewalls.rb b/lib/fog/storm_on_demand/models/network/firewalls.rb index 984f0610c..a32c0cdf7 100644 --- a/lib/fog/storm_on_demand/models/network/firewalls.rb +++ b/lib/fog/storm_on_demand/models/network/firewalls.rb @@ -3,7 +3,7 @@ require 'fog/storm_on_demand/models/network/firewall' module Fog module Network - class StormOnDemand + class StormOnDemand class Firewalls < Fog::Collection model Fog::Network::StormOnDemand::Firewall @@ -25,7 +25,7 @@ module Fog service.update_firewall(options) true end - + end end end diff --git a/lib/fog/storm_on_demand/models/network/network_ips.rb b/lib/fog/storm_on_demand/models/network/network_ips.rb index 919a87c93..a608f0ebc 100644 --- a/lib/fog/storm_on_demand/models/network/network_ips.rb +++ b/lib/fog/storm_on_demand/models/network/network_ips.rb @@ -41,7 +41,7 @@ module Fog service.request_new_ips(options) true end - + end end end diff --git a/lib/fog/storm_on_demand/models/network/pool.rb b/lib/fog/storm_on_demand/models/network/pool.rb index 99fd3c7c2..a78f8ea59 100644 --- a/lib/fog/storm_on_demand/models/network/pool.rb +++ b/lib/fog/storm_on_demand/models/network/pool.rb @@ -25,7 +25,7 @@ module Fog requires :identity service.update_pool({:uniq_id => identity}.merge!(options)) end - + end end end diff --git a/lib/fog/storm_on_demand/models/network/pools.rb b/lib/fog/storm_on_demand/models/network/pools.rb index 6584f2e35..3e4f4e9da 100644 --- a/lib/fog/storm_on_demand/models/network/pools.rb +++ b/lib/fog/storm_on_demand/models/network/pools.rb @@ -21,7 +21,7 @@ module Fog def get_assignments(options={}) service.get_assignments(options).body['items'] end - + end end end diff --git a/lib/fog/storm_on_demand/models/network/private_ips.rb b/lib/fog/storm_on_demand/models/network/private_ips.rb index a9af30742..2b5b2ce79 100644 --- a/lib/fog/storm_on_demand/models/network/private_ips.rb +++ b/lib/fog/storm_on_demand/models/network/private_ips.rb @@ -32,7 +32,7 @@ module Fog r = service.check_server_attached(:uniq_id => server_id).body r['is_attached'].to_i == 1 ? true : false end - + end end diff --git a/lib/fog/storm_on_demand/models/network/ruleset.rb b/lib/fog/storm_on_demand/models/network/ruleset.rb index fcd9bad15..7b94d6fbe 100644 --- a/lib/fog/storm_on_demand/models/network/ruleset.rb +++ b/lib/fog/storm_on_demand/models/network/ruleset.rb @@ -20,7 +20,7 @@ module Fog service.update_ruleset(:ruleset => ruleset, :rules => rules) true end - + end end end diff --git a/lib/fog/storm_on_demand/models/network/rulesets.rb b/lib/fog/storm_on_demand/models/network/rulesets.rb index b97111c8a..9b936b8e6 100644 --- a/lib/fog/storm_on_demand/models/network/rulesets.rb +++ b/lib/fog/storm_on_demand/models/network/rulesets.rb @@ -21,7 +21,7 @@ module Fog r = service.list_rulesets(options).body['item'] load(r) end - + end end end diff --git a/lib/fog/storm_on_demand/models/network/zones.rb b/lib/fog/storm_on_demand/models/network/zones.rb index a4c4f71ed..fabd454d5 100644 --- a/lib/fog/storm_on_demand/models/network/zones.rb +++ b/lib/fog/storm_on_demand/models/network/zones.rb @@ -17,7 +17,7 @@ module Fog data = service.list_zones(options).body load(data) end - + end end end diff --git a/lib/fog/storm_on_demand/models/storage/cluster.rb b/lib/fog/storm_on_demand/models/storage/cluster.rb index 890daffc5..653502349 100644 --- a/lib/fog/storm_on_demand/models/storage/cluster.rb +++ b/lib/fog/storm_on_demand/models/storage/cluster.rb @@ -14,7 +14,7 @@ module Fog end end - + end end end diff --git a/lib/fog/storm_on_demand/models/storage/volume.rb b/lib/fog/storm_on_demand/models/storage/volume.rb index 1a1a53668..0ab7971b6 100644 --- a/lib/fog/storm_on_demand/models/storage/volume.rb +++ b/lib/fog/storm_on_demand/models/storage/volume.rb @@ -46,7 +46,7 @@ module Fog requires :identity service.update_volume({:uniq_id => identity}.merge!(options)) end - + end end diff --git a/lib/fog/storm_on_demand/models/storage/volumes.rb b/lib/fog/storm_on_demand/models/storage/volumes.rb index 85c887504..8eab04c8f 100644 --- a/lib/fog/storm_on_demand/models/storage/volumes.rb +++ b/lib/fog/storm_on_demand/models/storage/volumes.rb @@ -22,7 +22,7 @@ module Fog vols = service.list_volumes(options).body['items'] load(vols) end - + end end diff --git a/lib/fog/storm_on_demand/models/support/ticket.rb b/lib/fog/storm_on_demand/models/support/ticket.rb index 65d684d2b..2f36378f8 100644 --- a/lib/fog/storm_on_demand/models/support/ticket.rb +++ b/lib/fog/storm_on_demand/models/support/ticket.rb @@ -65,7 +65,7 @@ module Fog :secid => secid}.merge!(options)).body res['reply'].to_i == 1 ? true : false end - + end diff --git a/lib/fog/storm_on_demand/monitoring.rb b/lib/fog/storm_on_demand/monitoring.rb index 75013a049..13de2da93 100644 --- a/lib/fog/storm_on_demand/monitoring.rb +++ b/lib/fog/storm_on_demand/monitoring.rb @@ -4,7 +4,7 @@ require 'fog/storm_on_demand/shared' module Fog module Monitoring class StormOnDemand < Fog::Service - + requires :storm_on_demand_username, :storm_on_demand_password recognizes :storm_on_demand_auth_url diff --git a/lib/fog/storm_on_demand/requests/compute/clone_server.rb b/lib/fog/storm_on_demand/requests/compute/clone_server.rb index 7e0518462..9f9ed9ed2 100644 --- a/lib/fog/storm_on_demand/requests/compute/clone_server.rb +++ b/lib/fog/storm_on_demand/requests/compute/clone_server.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/create_image.rb b/lib/fog/storm_on_demand/requests/compute/create_image.rb index 3615dedb1..2fac34ecb 100644 --- a/lib/fog/storm_on_demand/requests/compute/create_image.rb +++ b/lib/fog/storm_on_demand/requests/compute/create_image.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/create_server.rb b/lib/fog/storm_on_demand/requests/compute/create_server.rb index 492d5a189..aee53ec18 100644 --- a/lib/fog/storm_on_demand/requests/compute/create_server.rb +++ b/lib/fog/storm_on_demand/requests/compute/create_server.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/delete_server.rb b/lib/fog/storm_on_demand/requests/compute/delete_server.rb index 1488a462c..a22437056 100644 --- a/lib/fog/storm_on_demand/requests/compute/delete_server.rb +++ b/lib/fog/storm_on_demand/requests/compute/delete_server.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/get_config_details.rb b/lib/fog/storm_on_demand/requests/compute/get_config_details.rb index 602f23ac5..e430f1db7 100644 --- a/lib/fog/storm_on_demand/requests/compute/get_config_details.rb +++ b/lib/fog/storm_on_demand/requests/compute/get_config_details.rb @@ -9,7 +9,7 @@ module Fog :body => Fog::JSON.encode({ :params => options }) ) end - + end end end diff --git a/lib/fog/storm_on_demand/requests/compute/get_server.rb b/lib/fog/storm_on_demand/requests/compute/get_server.rb index f464bfe64..20e532215 100644 --- a/lib/fog/storm_on_demand/requests/compute/get_server.rb +++ b/lib/fog/storm_on_demand/requests/compute/get_server.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/list_configs.rb b/lib/fog/storm_on_demand/requests/compute/list_configs.rb index bd47803f9..3d6bfd1df 100644 --- a/lib/fog/storm_on_demand/requests/compute/list_configs.rb +++ b/lib/fog/storm_on_demand/requests/compute/list_configs.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/list_images.rb b/lib/fog/storm_on_demand/requests/compute/list_images.rb index bface6882..16243471e 100644 --- a/lib/fog/storm_on_demand/requests/compute/list_images.rb +++ b/lib/fog/storm_on_demand/requests/compute/list_images.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/list_servers.rb b/lib/fog/storm_on_demand/requests/compute/list_servers.rb index 275b50d02..5bd11726f 100644 --- a/lib/fog/storm_on_demand/requests/compute/list_servers.rb +++ b/lib/fog/storm_on_demand/requests/compute/list_servers.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/list_templates.rb b/lib/fog/storm_on_demand/requests/compute/list_templates.rb index 99a638837..0bd778caf 100644 --- a/lib/fog/storm_on_demand/requests/compute/list_templates.rb +++ b/lib/fog/storm_on_demand/requests/compute/list_templates.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/reboot_server.rb b/lib/fog/storm_on_demand/requests/compute/reboot_server.rb index 20ac20eda..e74a61b6c 100644 --- a/lib/fog/storm_on_demand/requests/compute/reboot_server.rb +++ b/lib/fog/storm_on_demand/requests/compute/reboot_server.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/compute/resize_server.rb b/lib/fog/storm_on_demand/requests/compute/resize_server.rb index 23af497bf..fe834c498 100644 --- a/lib/fog/storm_on_demand/requests/compute/resize_server.rb +++ b/lib/fog/storm_on_demand/requests/compute/resize_server.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/dns/delete_reverse.rb b/lib/fog/storm_on_demand/requests/dns/delete_reverse.rb index 2cb243947..72e97022b 100644 --- a/lib/fog/storm_on_demand/requests/dns/delete_reverse.rb +++ b/lib/fog/storm_on_demand/requests/dns/delete_reverse.rb @@ -9,7 +9,7 @@ module Fog :body => Fog::JSON.encode(:params => options) ) end - + end end end diff --git a/lib/fog/storm_on_demand/requests/dns/update_reverse.rb b/lib/fog/storm_on_demand/requests/dns/update_reverse.rb index 8ad4857d7..2e5dae3e2 100644 --- a/lib/fog/storm_on_demand/requests/dns/update_reverse.rb +++ b/lib/fog/storm_on_demand/requests/dns/update_reverse.rb @@ -9,7 +9,7 @@ module Fog :body => Fog::JSON.encode(:params => options) ) end - + end end end diff --git a/lib/fog/storm_on_demand/requests/network/add_balancer_node.rb b/lib/fog/storm_on_demand/requests/network/add_balancer_node.rb index a1a8c513c..ba687c56d 100644 --- a/lib/fog/storm_on_demand/requests/network/add_balancer_node.rb +++ b/lib/fog/storm_on_demand/requests/network/add_balancer_node.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/network/add_ip_to_server.rb b/lib/fog/storm_on_demand/requests/network/add_ip_to_server.rb index e11a426b8..bdf958ac7 100644 --- a/lib/fog/storm_on_demand/requests/network/add_ip_to_server.rb +++ b/lib/fog/storm_on_demand/requests/network/add_ip_to_server.rb @@ -9,7 +9,7 @@ module Fog :body => Fog::JSON.encode(:params => options) ) end - + end end end diff --git a/lib/fog/storm_on_demand/requests/network/list_balancers.rb b/lib/fog/storm_on_demand/requests/network/list_balancers.rb index c3b69c610..766490dd3 100644 --- a/lib/fog/storm_on_demand/requests/network/list_balancers.rb +++ b/lib/fog/storm_on_demand/requests/network/list_balancers.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/network/list_private_ips.rb b/lib/fog/storm_on_demand/requests/network/list_private_ips.rb index 962433488..3bcd5ed30 100644 --- a/lib/fog/storm_on_demand/requests/network/list_private_ips.rb +++ b/lib/fog/storm_on_demand/requests/network/list_private_ips.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/network/remove_balancer_node.rb b/lib/fog/storm_on_demand/requests/network/remove_balancer_node.rb index 12fb06d00..57efd3151 100644 --- a/lib/fog/storm_on_demand/requests/network/remove_balancer_node.rb +++ b/lib/fog/storm_on_demand/requests/network/remove_balancer_node.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/requests/network/update_firewall.rb b/lib/fog/storm_on_demand/requests/network/update_firewall.rb index dccb79b66..891cb4091 100644 --- a/lib/fog/storm_on_demand/requests/network/update_firewall.rb +++ b/lib/fog/storm_on_demand/requests/network/update_firewall.rb @@ -13,4 +13,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/storm_on_demand/shared.rb b/lib/fog/storm_on_demand/shared.rb index 914666808..64df77265 100644 --- a/lib/fog/storm_on_demand/shared.rb +++ b/lib/fog/storm_on_demand/shared.rb @@ -4,7 +4,7 @@ module Fog API_URL = 'https://api.stormondemand.com' API_VERSION = 'v1' - + def initialize(options={}) uri = URI.parse(options[:storm_on_demand_auth_url] ||= API_URL) @connection_options = options[:connection_options] || {} diff --git a/lib/fog/storm_on_demand/support.rb b/lib/fog/storm_on_demand/support.rb index 7f003575e..76f8924d3 100644 --- a/lib/fog/storm_on_demand/support.rb +++ b/lib/fog/storm_on_demand/support.rb @@ -26,7 +26,7 @@ module Fog request :list_tickets request :reply_ticket request :list_ticket_types - + class Mock def self.data diff --git a/lib/fog/terremark/requests/shared/add_internet_service.rb b/lib/fog/terremark/requests/shared/add_internet_service.rb index 6ac39b82d..7f2c39fea 100644 --- a/lib/fog/terremark/requests/shared/add_internet_service.rb +++ b/lib/fog/terremark/requests/shared/add_internet_service.rb @@ -34,7 +34,7 @@ module Fog #{name} #{protocol.upcase} - #{port} + #{port} #{options['Enabled']} #{options['Description']} diff --git a/lib/fog/terremark/requests/shared/configure_vapp.rb b/lib/fog/terremark/requests/shared/configure_vapp.rb index 995871ca0..ec7c1a965 100644 --- a/lib/fog/terremark/requests/shared/configure_vapp.rb +++ b/lib/fog/terremark/requests/shared/configure_vapp.rb @@ -6,8 +6,8 @@ module Fog def configure_vapp(vapp_id, vapp_name, options = {}) items = "" - vapp_uri = [@host, @path, "vApp", vapp_id.to_s].join("/") - + vapp_uri = [@host, @path, "vApp", vapp_id.to_s].join("/") + if options['vcpus'] vcpu_item = <<-DATA 13#{options['vcpus']} @@ -38,7 +38,7 @@ DATA items << virtual_disk_item end end - + data = <<-DATA Virtual Hardware#{items} diff --git a/lib/fog/terremark/requests/shared/create_internet_service.rb b/lib/fog/terremark/requests/shared/create_internet_service.rb index f8ab6f356..576cc3936 100644 --- a/lib/fog/terremark/requests/shared/create_internet_service.rb +++ b/lib/fog/terremark/requests/shared/create_internet_service.rb @@ -37,7 +37,7 @@ module Fog #{name} #{protocol.upcase} - #{port} + #{port} #{options['Enabled']} #{options['Description']} diff --git a/lib/fog/terremark/requests/shared/get_keys_list.rb b/lib/fog/terremark/requests/shared/get_keys_list.rb index f92f5000c..89c48ad2c 100644 --- a/lib/fog/terremark/requests/shared/get_keys_list.rb +++ b/lib/fog/terremark/requests/shared/get_keys_list.rb @@ -28,9 +28,9 @@ module Fog ) response end - + end - + end end end diff --git a/lib/fog/terremark/requests/shared/get_network.rb b/lib/fog/terremark/requests/shared/get_network.rb index f86dc8d40..c19467cfb 100644 --- a/lib/fog/terremark/requests/shared/get_network.rb +++ b/lib/fog/terremark/requests/shared/get_network.rb @@ -51,7 +51,7 @@ module Fog response.status = 200 response.body = body - response.headers = Fog::Terremark::Shared::Mock.headers(response.body, + response.headers = Fog::Terremark::Shared::Mock.headers(response.body, case self when Fog::Terremark::Ecloud::Mock "application/vnd.vmware.vcloud.network+xml" diff --git a/lib/fog/terremark/requests/shared/get_node_services.rb b/lib/fog/terremark/requests/shared/get_node_services.rb index 2fc4d104d..ce2e1612e 100644 --- a/lib/fog/terremark/requests/shared/get_node_services.rb +++ b/lib/fog/terremark/requests/shared/get_node_services.rb @@ -13,8 +13,8 @@ module Fog # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: - - # + + # def get_node_services(service_id) request( :expects => 200, diff --git a/lib/fog/vcloud/models/compute/server.rb b/lib/fog/vcloud/models/compute/server.rb index 972d092ce..029384b4a 100644 --- a/lib/fog/vcloud/models/compute/server.rb +++ b/lib/fog/vcloud/models/compute/server.rb @@ -27,16 +27,16 @@ module Fog attribute :tasks, :aliases => :Tasks, :type => :array has_up :vapp - + def tags Fog::Vcloud::Compute::Tags.new(:service => service, :href => href + '/metadata') end - + def customization_script load_unless_loaded! self.guest_customization[:CustomizationScript] end - + def customization_script=(custom_script) @changed = true @update_custom_script = custom_script @@ -205,7 +205,7 @@ module Fog raise RuntimeError, "Can't save cpu, name or memory changes while the VM is on." end end - + if @update_custom_script guest_customization[:CustomizationScript] = @update_custom_script.to_s service.configure_vm_customization_script(guest_customization) diff --git a/lib/fog/vcloud/models/compute/tag.rb b/lib/fog/vcloud/models/compute/tag.rb index 4f5cd07e0..a3babd179 100644 --- a/lib/fog/vcloud/models/compute/tag.rb +++ b/lib/fog/vcloud/models/compute/tag.rb @@ -8,7 +8,7 @@ module Fog attribute :key, :aliases => :Key attribute :value, :aliases => :Value - + def destroy service.delete_metadata(href) end diff --git a/lib/fog/vcloud/models/compute/tags.rb b/lib/fog/vcloud/models/compute/tags.rb index 68a03d601..7b209de90 100644 --- a/lib/fog/vcloud/models/compute/tags.rb +++ b/lib/fog/vcloud/models/compute/tags.rb @@ -22,11 +22,11 @@ module Fog rescue Fog::Errors::NotFound nil end - + def create(opts) service.configure_metadata(opts.merge(href: href)) end end end end -end \ No newline at end of file +end diff --git a/lib/fog/vcloud/requests/compute/configure_metadata.rb b/lib/fog/vcloud/requests/compute/configure_metadata.rb index cd59b62b7..f47de8000 100644 --- a/lib/fog/vcloud/requests/compute/configure_metadata.rb +++ b/lib/fog/vcloud/requests/compute/configure_metadata.rb @@ -8,7 +8,7 @@ module Fog unless valid_opts.all? { |opt| opts.has_key?(opt) } raise ArgumentError.new("Required data missing: #{(valid_opts - opts.keys).map(&:inspect).join(", ")}") end - + body = < true OUTGOING @@ -26,7 +26,7 @@ EOF def generate_tcp_rules(tcp_ports) firewall_rules = "" tcp_ports.each do |port| - firewall_rules << < true #{port} @@ -49,7 +49,7 @@ EOF def generate_udp_rules(udp_ports) firewall_rules = "" udp_ports.each do |port| - firewall_rules << < true #{port} @@ -74,7 +74,7 @@ EOF firewall_body = "" if not enable_firewall firewall_body = "false" - + else firewall_rules = generate_outbound_rule + generate_tcp_rules(portmap["TCP"]) + generate_udp_rules(portmap["UDP"]) firewall_body = < 'http://www.vmware.com/vcloud/v1', # :saveState => save_state) {} - builder = if version =='1.0' + builder = if version =='1.0' "" else - < shutdown diff --git a/lib/fog/vcloud_director/models/compute/tags.rb b/lib/fog/vcloud_director/models/compute/tags.rb index 0aebbbb98..efe3617af 100644 --- a/lib/fog/vcloud_director/models/compute/tags.rb +++ b/lib/fog/vcloud_director/models/compute/tags.rb @@ -13,7 +13,7 @@ module Fog def get_by_name(tag_name) get(tag_name) end - + def get_by_id(item_id) item_list unless @items @items.detect{ |i| i[:id] == item_id} @@ -30,7 +30,7 @@ module Fog end private - + def item_list @items =[] hash_items.each_pair{ |k,v| @items << {:id => k, :value => v }.merge(:vm => vm) } diff --git a/lib/fog/vcloud_director/requests/compute/get_execute_query.rb b/lib/fog/vcloud_director/requests/compute/get_execute_query.rb index 415e9dece..64d01bcc5 100644 --- a/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +++ b/lib/fog/vcloud_director/requests/compute/get_execute_query.rb @@ -149,7 +149,7 @@ module Fog if type.nil? body = all_types - else + else body = fetch_items(type, options) end diff --git a/lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb b/lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb index 4832f3904..33814e5e2 100644 --- a/lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb +++ b/lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb @@ -73,7 +73,7 @@ module Fog :query => query.map {|q| URI.escape(q)}.join('&') ) ensure_list! response.body, :Link - ensure_list! response.body, + ensure_list! response.body, response.body[:type] == 'application/vnd.vmware.vcloud.query.references+xml' ? :VAppReference : :VAppRecord diff --git a/lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb b/lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb index bcd7e5a34..627448e5f 100644 --- a/lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb +++ b/lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb @@ -73,7 +73,7 @@ module Fog :query => query.map {|q| URI.escape(q)}.join('&') ) ensure_list! response.body, :Link - ensure_list! response.body, + ensure_list! response.body, response.body[:type] == 'application/vnd.vmware.vcloud.query.references+xml' ? :OrgVdcReference : :OrgVdcRecord diff --git a/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb b/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb index eac8e44c9..31bc57cee 100644 --- a/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +++ b/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb @@ -74,15 +74,15 @@ module Fog "xmlns:xsd" => "http://www.w3.org/2001/XMLSchema" } end - + def vdc_end_point(vdc_id = nil) end_point + ( vdc_id ? "vdc/#{vdc_id}" : "vdc" ) end - + def network_end_point(network_id = nil) end_point + ( network_id ? "network/#{network_id}" : "network" ) end - + def vapp_template_end_point(vapp_template_id = nil) end_point + ( vapp_template_id ? "vAppTemplate/#{vapp_template_id}" : "vAppTemplate" ) end @@ -90,7 +90,7 @@ module Fog def endpoint end_point end - + end end end diff --git a/lib/fog/voxel/parsers/compute/images_list.rb b/lib/fog/voxel/parsers/compute/images_list.rb index 0d9d7502f..9501e78a6 100644 --- a/lib/fog/voxel/parsers/compute/images_list.rb +++ b/lib/fog/voxel/parsers/compute/images_list.rb @@ -56,4 +56,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/vsphere/models/compute/customfields.rb b/lib/fog/vsphere/models/compute/customfields.rb index c20b58303..22d88d7cb 100644 --- a/lib/fog/vsphere/models/compute/customfields.rb +++ b/lib/fog/vsphere/models/compute/customfields.rb @@ -16,7 +16,7 @@ module Fog end def get(key) - load(service.list_customfields()).find do | cv | + load(service.list_customfields()).find do | cv | cv.key == ((key.is_a? String) ? key.to_i : key) end end diff --git a/lib/fog/vsphere/models/compute/datacenter.rb b/lib/fog/vsphere/models/compute/datacenter.rb index 412df05f0..29d1ea03d 100644 --- a/lib/fog/vsphere/models/compute/datacenter.rb +++ b/lib/fog/vsphere/models/compute/datacenter.rb @@ -28,7 +28,7 @@ module Fog def virtual_machines filters = {} service.servers({ :datacenter => path.join("/") }.merge(filters)) end - + def servertypes filters={} service.servertypes({:datacenter => name }.merge(filters)) end diff --git a/lib/fog/vsphere/models/compute/interfaces.rb b/lib/fog/vsphere/models/compute/interfaces.rb index 37e1915db..93aac6bea 100644 --- a/lib/fog/vsphere/models/compute/interfaces.rb +++ b/lib/fog/vsphere/models/compute/interfaces.rb @@ -40,10 +40,10 @@ module Fog raise 'interfaces should have vm or template' end - if interface + if interface Fog::Compute::Vsphere::Interface.new(interface.merge(:server_id => server.id, :service => service)) else - nil + nil end end diff --git a/lib/fog/vsphere/models/compute/server.rb b/lib/fog/vsphere/models/compute/server.rb index 0e8aeedcf..d2ee7ebb7 100644 --- a/lib/fog/vsphere/models/compute/server.rb +++ b/lib/fog/vsphere/models/compute/server.rb @@ -178,7 +178,7 @@ module Fog def sockets cpus / corespersocket end - + def mac interfaces.first.mac unless interfaces.empty? end @@ -186,7 +186,7 @@ module Fog def interfaces attributes[:interfaces] ||= id.nil? ? [] : service.interfaces( :server => self ) end - + def interface_ready? attrs (attrs.is_a? Hash and attrs[:blocking]) or attrs.is_a? Fog::Compute::Vsphere::Interface end @@ -271,7 +271,7 @@ module Fog self.attributes[:volumes].map! { |vol| vol.is_a?(Hash) ? service.volumes.new(vol) : vol } end end - + def initialize_customvalues if attributes[:customvalues] and attributes[:customvalues].is_a?(Array) self.attributes[:customvalues].map { |cfield| cfield.is_a?(Hash) ? service.customvalue.new(cfield) : cfield} diff --git a/lib/fog/vsphere/requests/compute/create_vm.rb b/lib/fog/vsphere/requests/compute/create_vm.rb index c9c768a00..3902e219e 100644 --- a/lib/fog/vsphere/requests/compute/create_vm.rb +++ b/lib/fog/vsphere/requests/compute/create_vm.rb @@ -83,13 +83,13 @@ module Fog def create_controller options=nil options=if options controller_default_options.merge(Hash[options.map{|k,v| [k.to_sym,v] }]) - else - controller_default_options + else + controller_default_options end - controller_class=if options[:type].is_a? String then + controller_class=if options[:type].is_a? String then Fog::class_from_string options[:type], "RbVmomi::VIM" - else - options[:type] + else + options[:type] end { :operation => options[:operation], diff --git a/lib/fog/vsphere/requests/compute/get_server_type.rb b/lib/fog/vsphere/requests/compute/get_server_type.rb index 2af41bb35..8335baa26 100644 --- a/lib/fog/vsphere/requests/compute/get_server_type.rb +++ b/lib/fog/vsphere/requests/compute/get_server_type.rb @@ -5,11 +5,11 @@ module Fog def get_server_type(id, datacenter, filter={}) server_type=get_raw_server_type(id, datacenter) raise(Fog::Compute::Vsphere::NotFound) unless server_type - server_type_attributes(server_type, datacenter) + server_type_attributes(server_type, datacenter) end protected - + def get_raw_server_type(id, datacenter, filter={}) types=raw_server_types(datacenter) raise(Fog::Compute::Vsphere::NotFound) unless types @@ -20,13 +20,13 @@ module Fog end class Mock def get_server_type(id) - {:id=>"rhel6Guest", - :name=>"rhel6Guest", - :family=>"linuxGuest", - :fullname=>"Red Hat Enterprise Linux 6 (32-Bit)", - :datacenter=>"Solutions"} + {:id=>"rhel6Guest", + :name=>"rhel6Guest", + :family=>"linuxGuest", + :fullname=>"Red Hat Enterprise Linux 6 (32-Bit)", + :datacenter=>"Solutions"} end - end + end end end end diff --git a/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb b/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb index 31187b52e..60e6eef64 100644 --- a/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +++ b/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb @@ -13,7 +13,7 @@ module Fog :shared_bus => ctrl.sharedBus.to_s, :unit_number => ctrl.scsiCtlrUnitNumber, :key => ctrl.key, - } + } end end diff --git a/lib/fog/vsphere/requests/compute/list_datacenters.rb b/lib/fog/vsphere/requests/compute/list_datacenters.rb index e8eeb5156..60b5a5c19 100644 --- a/lib/fog/vsphere/requests/compute/list_datacenters.rb +++ b/lib/fog/vsphere/requests/compute/list_datacenters.rb @@ -16,11 +16,11 @@ module Fog protected - def raw_getpathmo mo + def raw_getpathmo mo if mo.parent == nil or mo.parent.name == @connection.rootFolder.name then [ mo.name ] else - [ raw_getpathmo(mo.parent), mo.name ].flatten + [ raw_getpathmo(mo.parent), mo.name ].flatten end end @@ -29,13 +29,13 @@ module Fog @raw_datacenters ||= get_raw_datacenters_from_folder folder end - def get_raw_datacenters_from_folder folder=nil + def get_raw_datacenters_from_folder folder=nil folder.childEntity.map do | childE | if childE.is_a? RbVmomi::VIM::Datacenter childE elsif childE.is_a? RbVmomi::VIM::Folder get_raw_datacenters_from_folder childE - end + end end.flatten end diff --git a/lib/fog/vsphere/requests/compute/list_interface_types.rb b/lib/fog/vsphere/requests/compute/list_interface_types.rb index 3af73e048..2f10d20dd 100644 --- a/lib/fog/vsphere/requests/compute/list_interface_types.rb +++ b/lib/fog/vsphere/requests/compute/list_interface_types.rb @@ -9,7 +9,7 @@ module Fog next if filters.has_key?(:id) and filters[:id] != nictype interface_type_attributes(nictype, servertype_name, datacenter_name) end.compact - end + end def interface_type_attributes(nic, servertype, datacenter) { :id => nic, diff --git a/lib/fog/vsphere/requests/compute/list_networks.rb b/lib/fog/vsphere/requests/compute/list_networks.rb index e2dde4f45..a8460ec52 100644 --- a/lib/fog/vsphere/requests/compute/list_networks.rb +++ b/lib/fog/vsphere/requests/compute/list_networks.rb @@ -35,4 +35,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/vsphere/requests/compute/list_server_types.rb b/lib/fog/vsphere/requests/compute/list_server_types.rb index 46a3f106c..57e0e4f07 100644 --- a/lib/fog/vsphere/requests/compute/list_server_types.rb +++ b/lib/fog/vsphere/requests/compute/list_server_types.rb @@ -7,14 +7,14 @@ module Fog servertypes=raw_server_types(datacenter_name) if servertypes servertypes.map do | servertype | - server_type_attributes(servertype, datacenter_name) + server_type_attributes(servertype, datacenter_name) end.compact else nil end #select{ | guestdesc | guestdesc.select{ | k, v | filter.has_key?(k) and filter[k] == v }==filter } end - + def raw_server_types(datacenter_name, filter={}) datacenter=find_raw_datacenter(datacenter_name) environmentBrowser=datacenter.hostFolder.childEntity.grep(RbVmomi::VIM::ComputeResource).first.environmentBrowser @@ -22,9 +22,9 @@ module Fog environmentBrowser.QueryConfigOption[:guestOSDescriptor] end end - + protected - + def server_type_attributes(servertype, datacenter) { :id => servertype.id, @@ -32,20 +32,20 @@ module Fog :family => servertype.family, :fullname => servertype.fullName, :datacenter => datacenter, - } + } end end class Mock def list_server_types(datacenter_name) - [{:id=>"rhel6Guest", - :name=>"rhel6Guest", - :family=>"linuxGuest", - :fullname=>"Red Hat Enterprise Linux 6 (32-Bit)", - :datacenter=>"Solutions"}, - {:id=>"rhel5_64Guest", - :name=>"rhel5_64Guest", - :family=>"linuxGuest", - :fullname=>"Red Hat Enterprise Linux 5 (64-Bit)", + [{:id=>"rhel6Guest", + :name=>"rhel6Guest", + :family=>"linuxGuest", + :fullname=>"Red Hat Enterprise Linux 6 (32-Bit)", + :datacenter=>"Solutions"}, + {:id=>"rhel5_64Guest", + :name=>"rhel5_64Guest", + :family=>"linuxGuest", + :fullname=>"Red Hat Enterprise Linux 5 (64-Bit)", :datacenter=>"Solutions"}] end end diff --git a/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb b/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb index 474d1379a..6ec9a2286 100644 --- a/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +++ b/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb @@ -42,7 +42,7 @@ module Fog end end - + def get_vm_interface(vm_id, options={}) raise ArgumentError, "instance id is a required parameter" unless vm_id if options.is_a? Fog::Compute::Vsphere::Interface diff --git a/lib/fog/vsphere/requests/compute/modify_vm_interface.rb b/lib/fog/vsphere/requests/compute/modify_vm_interface.rb index 4067fbb92..2a89181b2 100644 --- a/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +++ b/lib/fog/vsphere/requests/compute/modify_vm_interface.rb @@ -16,7 +16,7 @@ module Fog interface = get_interface_from_options(vmid, options.merge(:server_id => vmid)) vm_reconfig_hardware('instance_uuid' => vmid, 'hardware_spec' => {'deviceChange'=>[create_interface(interface, interface.key, :remove)]}) end - + def update_vm_interface(vmid, options = {}) raise ArgumentError, "instance id is a required parameter" unless vmid @@ -58,4 +58,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/vsphere/requests/compute/modify_vm_volume.rb b/lib/fog/vsphere/requests/compute/modify_vm_volume.rb index 7086f3fda..9a58291e2 100644 --- a/lib/fog/vsphere/requests/compute/modify_vm_volume.rb +++ b/lib/fog/vsphere/requests/compute/modify_vm_volume.rb @@ -23,4 +23,4 @@ module Fog end end end -end \ No newline at end of file +end diff --git a/lib/fog/xenserver/CHANGELOG.md b/lib/fog/xenserver/CHANGELOG.md index aeae58d37..d3afa7e05 100644 --- a/lib/fog/xenserver/CHANGELOG.md +++ b/lib/fog/xenserver/CHANGELOG.md @@ -4,7 +4,7 @@ See https://github.com/fog/fog/blob/master/lib/fog/xenserver/examples/networks-and-vlans.rb -# 1.9.0 2013/01/19 +# 1.9.0 2013/01/19 * Added missing HostCpu model @@ -13,7 +13,7 @@ See http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=host_cpu -* Host model improvements +* Host model improvements Added missing host attributes: @@ -37,10 +37,10 @@ - Added missing create/destroy/save operations - Added missing generic set_attribute method - + See http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=SR -* Pool model improvements +* Pool model improvements - Added missing suspend_image_sr attribute - Added default_sr getter/setter diff --git a/lib/fog/xenserver/core.rb b/lib/fog/xenserver/core.rb index eada4a04a..05a42bb85 100644 --- a/lib/fog/xenserver/core.rb +++ b/lib/fog/xenserver/core.rb @@ -1,36 +1,36 @@ require 'fog/core' module Fog - module XenServer + module XenServer class InvalidLogin < Fog::Errors::Error; end class NotFound < Fog::Errors::Error; end class RequestFailed < Fog::Errors::Error; end extend Fog::Provider - - service(:compute, 'Compute') - + + service(:compute, 'Compute') + class Connection require 'xmlrpc/client' - + def initialize(host, timeout) @factory = XMLRPC::Client.new(host, '/') @factory.set_parser(NokogiriStreamParser.new) @factory.timeout = timeout end - + def authenticate( username, password ) response = @factory.call('session.login_with_password', username.to_s, password.to_s) raise Fog::XenServer::InvalidLogin.new unless response["Status"] =~ /Success/ @credentials = response["Value"] end - + def request(options, *params) begin parser = options.delete(:parser) method = options.delete(:method) - + if params.empty? response = @factory.call(method, @credentials) else @@ -47,20 +47,20 @@ module Fog parser.parse( response["Value"] ) response = parser.response end - + response end end end class NokogiriStreamParser < XMLRPC::XMLParser::AbstractStreamParser - + def initialize require 'nokogiri/xml/sax/document' require 'nokogiri/xml/sax/parser' @parser_class = Class.new(Nokogiri::XML::SAX::Document) do - + include XMLRPC::XMLParser::StreamParserMixin alias_method :start_element, :startElement @@ -71,10 +71,10 @@ module Fog def parse(str) Nokogiri::XML::SAX::Parser.new(self).parse(str) end - + end end - + end end diff --git a/lib/fog/xenserver/examples/chage_default_storage_repository.md b/lib/fog/xenserver/examples/chage_default_storage_repository.md index 14280e113..6147afba4 100644 --- a/lib/fog/xenserver/examples/chage_default_storage_repository.md +++ b/lib/fog/xenserver/examples/chage_default_storage_repository.md @@ -1,8 +1,8 @@ -# How To Change the Default Storage Repository to File-based VHD-on-EXT3 +# How To Change the Default Storage Repository to File-based VHD-on-EXT3 **NOTE: Requires fog > 1.8 (currently in development as of this writing)** -This tutorial explains how to convert a local Logical Volume Manager (LVM) +This tutorial explains how to convert a local Logical Volume Manager (LVM) based storage repository into a file-based (VHD) storage repository. It's the fog/xenserver version of the original Citrix KB article: @@ -33,7 +33,7 @@ Find the default LVM storage repository: # Equivalent to: # xe sr-list type=lvm # -lvm_sr = nil +lvm_sr = nil conn.storage_repositories.each do |sr| lvm_sr = sr if sr.type == 'lvm' end @@ -55,7 +55,7 @@ if lvm_sr pbd.unplug if pbd.storage_repository.uuid == lvm_sr.uuid end # Destroy the SR - lvm_sr.destroy + lvm_sr.destroy end ``` @@ -66,7 +66,7 @@ Create a new VHD-backed SR: # Equivalent to: # # xe sr-create content-type="local SR" \ -# host-uuid=5d189b7a-cd5e-4029-9940-d4daaa34633d \ +# host-uuid=5d189b7a-cd5e-4029-9940-d4daaa34633d \ # type=ext device-config-device=/dev/sda3 shared=false \ # name-label="Local File SR" # diff --git a/lib/fog/xenserver/examples/creating_servers.md b/lib/fog/xenserver/examples/creating_servers.md index a01c4ffe3..eba4013f5 100644 --- a/lib/fog/xenserver/examples/creating_servers.md +++ b/lib/fog/xenserver/examples/creating_servers.md @@ -17,10 +17,10 @@ using SSH. The code also assumes that you have a file storage repository mounted somewhere in /var/run/sr-mount/#{sr-UUID} (the standard XenServer base directory for mounted storage repositories). - require 'fog' + require 'fog' require 'net/scp' require 'uuidtools' - + # # Create the connection to the XenServer host # @@ -34,7 +34,7 @@ for mounted storage repositories). We'll be uploading the image to the "Local File SR" storage repository, so we need the reference to this SR (Storage Repository): - + sr = xenserver.storage_repositories.find { |sr| sr.name == "Local File SR" } XenServer uses UUIDs to store images in the storage repositories, so we will @@ -48,7 +48,7 @@ emulate that behavior, creating a new UUID for our image and uploading it. To upload the new image using SCP, we need the destination directory, where the -SR is mounted. In our case, the storage repository mount point is +SR is mounted. In our case, the storage repository mount point is /var/run/sr-mount/#{sr.uuid} (where sr.uuid is the UUID of the storage repository). We will upload the new image there: @@ -59,18 +59,18 @@ repository). We will upload the new image there: # source image, located in the current directory source = 'ubuntu.vhd' # Use the XenServer root credentials to upload - Net::SSH.start('xenserver-test', 'root', :password => 'secret') do |ssh| - ssh.scp.upload!(source, destination) do |ch, name, sent, total| + Net::SSH.start('xenserver-test', 'root', :password => 'secret') do |ssh| + ssh.scp.upload!(source, destination) do |ch, name, sent, total| # print progress - p = (sent.to_f * 100 / total.to_f).to_i.to_s - print "\rProgress: #{p}% completed" - end - end + p = (sent.to_f * 100 / total.to_f).to_i.to_s + print "\rProgress: #{p}% completed" + end + end We need to let the XenServer know, that there's a new image: sr.scan - + Now that XenServer is aware of the new image, get its reference and set the image name attribute to 'ubuntu-template' @@ -84,12 +84,12 @@ Good! the image is ready to be used. We have the image ready to be used by our new template. Templates are regular servers, so let's create one with 512 MB of RAM, 1 CPU -and a network card. The main difference with a regular server from an API +and a network card. The main difference with a regular server from an API point of view is that we will not start it. We will also create the template as PV (paravirtual): - server_mem = (512 * 1024 * 1024).to_s + server_mem = (512 * 1024 * 1024).to_s server = xenserver.servers.new :name => "ubuntu-template", # Required when using Server.new :affinity => xenserver.hosts.first, @@ -99,8 +99,8 @@ We will also create the template as PV (paravirtual): :pv_args => '-- console=hvc0', # PV related :memory_static_max => mem, :memory_static_min => mem, - :memory_dynamic_max => mem, - :memory_dynamic_min => mem + :memory_dynamic_max => mem, + :memory_dynamic_min => mem server.save We need to attach the disk image to a VBD and to the server @@ -116,14 +116,14 @@ I have a network in my XenServer named "Pool-wide network associated with eth0" bridged to the physical eth0 NIC and I will attach the new NIC to that network. Don't be scared by the VIF creation code. There are easier ways to create a -VIF, and we'll be dealing with that and some other cases in the networking +VIF, and we'll be dealing with that and some other cases in the networking tutorial (TODO). First, let's find the network since we'll need the reference. net = xenserver.networks.find { |n| n.name == 'Pool-wide network associated with eth0' } -To create the VM VIF, we need to set some attributes and use the +To create the VM VIF, we need to set some attributes and use the create_vif_custom request: vif_attr = { @@ -134,11 +134,11 @@ create_vif_custom request: 'device' => '0', 'MTU' => '0', 'other_config' => {}, - 'qos_algorithm_type' => 'ratelimit', + 'qos_algorithm_type' => 'ratelimit', 'qos_algorithm_params' => {} } xenserver.create_vif_custom vif_attr - + The template is now ready to be used and we can list it! diff --git a/lib/fog/xenserver/examples/getting_started.md b/lib/fog/xenserver/examples/getting_started.md index ed242a326..356a5d762 100644 --- a/lib/fog/xenserver/examples/getting_started.md +++ b/lib/fog/xenserver/examples/getting_started.md @@ -6,7 +6,7 @@ First, create a connection to the XenServer host: require 'fog' require 'pp' - + # # http://rubydoc.info/github/fog/fog/Fog/Compute/XenServer/Real # @@ -15,8 +15,8 @@ First, create a connection to the XenServer host: :xenserver_url => 'xenserver-test', :xenserver_username => 'root', :xenserver_password => 'changeme', - :xenserver_defaults => { - :template => "squeeze-test" + :xenserver_defaults => { + :template => "squeeze-test" } }) @@ -34,7 +34,7 @@ Having that in mind, we can start doing things with out XenServer host. Listing all the servers (VMs): - conn.servers.all + conn.servers.all This will return a list of Fog::Compute::XenServer::Server. @@ -42,7 +42,7 @@ List all the servers whose name matches Ubuntu: conn.servers.all :name_matches => "Ubuntu" -Listing the first server running (templates aren't included by default +Listing the first server running (templates aren't included by default in the list): server = conn.servers.first @@ -65,7 +65,7 @@ ones found in the official Citrix documentation, and they are available at: http://rubydoc.info/github/fog/fog/Fog/Compute/XenServer/Server -and +and https://github.com/fog/fog/blob/master/lib/fog/xenserver/models/compute/server.rb @@ -145,7 +145,7 @@ Same thing applies to the virtual disk images: conn.vdis.all Listing Storage Repositories (Xen SRs), where the disk images are stored: - + # http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=SR conn.storage_repositories diff --git a/lib/fog/xenserver/examples/networks-and-vlans.rb b/lib/fog/xenserver/examples/networks-and-vlans.rb index cf49f719e..f87c8a740 100644 --- a/lib/fog/xenserver/examples/networks-and-vlans.rb +++ b/lib/fog/xenserver/examples/networks-and-vlans.rb @@ -1,4 +1,4 @@ -require 'fog' +require 'fog' # # Create the connection to the XenServer host @@ -16,7 +16,7 @@ xenserver = Fog::Compute.new({ # will problably have many PIFs with device == bond0 # but we need the one without a proper VLAN ID # -bondmaster_pif = xenserver.pifs.find do |pif| +bondmaster_pif = xenserver.pifs.find do |pif| pif.vlan == "-1" and pif.device == "bond0" end diff --git a/lib/fog/xenserver/examples/storage_repositories.md b/lib/fog/xenserver/examples/storage_repositories.md index 28b641d2d..ab94021c3 100644 --- a/lib/fog/xenserver/examples/storage_repositories.md +++ b/lib/fog/xenserver/examples/storage_repositories.md @@ -7,7 +7,7 @@ http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=SR Create the XenServer connection first, as usual: ```ruby -require 'fog' +require 'fog' require 'net/scp' require 'pp' @@ -35,7 +35,7 @@ xenserver.storage_repositories.select { |sr| sr.content_type == 'iso' } Filter storage repositories by allowed operations: ```ruby -rw_srs = xenserver.storage_repositories.select do |sr| +rw_srs = xenserver.storage_repositories.select do |sr| # Are we allowed to create a VDI here? sr.allowed_operations.include? 'vdi_create' end @@ -69,7 +69,7 @@ sr.vdis.each do |vdi| puts vdi.virtual_size puts vdi.read_only # ["update", "resize", "destroy", "clone", "copy", "snapshot"], - puts vdi.allowed_operations + puts vdi.allowed_operations end ``` diff --git a/lib/fog/xenserver/models/compute/guest_metrics.rb b/lib/fog/xenserver/models/compute/guest_metrics.rb index 24b445d4b..662c83c4e 100644 --- a/lib/fog/xenserver/models/compute/guest_metrics.rb +++ b/lib/fog/xenserver/models/compute/guest_metrics.rb @@ -3,13 +3,13 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class GuestMetrics < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VM_guest_metrics - + identity :reference - + attribute :uuid attribute :disk attribute :last_updated @@ -21,9 +21,9 @@ module Fog attribute :other_config attribute :pv_drivers_up_to_date, :aliases => :PV_drivers_up_to_date attribute :pv_drivers_version, :aliases => :PV_drivers_version - + end - + end end end diff --git a/lib/fog/xenserver/models/compute/host.rb b/lib/fog/xenserver/models/compute/host.rb index e1fd39c85..5dec0e848 100644 --- a/lib/fog/xenserver/models/compute/host.rb +++ b/lib/fog/xenserver/models/compute/host.rb @@ -58,7 +58,7 @@ module Fog attribute :__host_cpus, :aliases => :host_CPUs attribute :edition attribute :software_version - + def pifs __pifs.collect { |pif| service.pifs.get pif } end @@ -92,10 +92,10 @@ module Fog end # - # Reboot the host disabling it first unless auto_disable is + # Reboot the host disabling it first unless auto_disable is # set to false - # - # This function can only be called if there are no currently running + # + # This function can only be called if there are no currently running # VMs on the host and it is disabled. If there are running VMs, it will # raise an exception. # @@ -107,19 +107,19 @@ module Fog disable if auto_disable service.reboot_host(reference) end - + # - # Puts the host into a state in which no new VMs can be started. + # Puts the host into a state in which no new VMs can be started. # Currently active VMs on the host continue to execute. # # @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=host # - def disable + def disable service.disable_host(reference) end - + # - # Puts the host into a state in which new VMs can be started. + # Puts the host into a state in which new VMs can be started. # # @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=host # @@ -128,10 +128,10 @@ module Fog end # - # Shutdown the host disabling it first unless auto_disable is + # Shutdown the host disabling it first unless auto_disable is # set to false. # - # This function can only be called if there are no currently running + # This function can only be called if there are no currently running # VMs on the host and it is disabled. If there are running VMs, it will # raise an exception. # @@ -143,7 +143,7 @@ module Fog disable if auto_disable service.shutdown_host(reference) end - + def set_attribute(name, *val) data = service.set_attribute( 'host', reference, name, *val ) # Do not reload automatically for performance reasons diff --git a/lib/fog/xenserver/models/compute/host_cpu.rb b/lib/fog/xenserver/models/compute/host_cpu.rb index f989eb921..4d96fb858 100644 --- a/lib/fog/xenserver/models/compute/host_cpu.rb +++ b/lib/fog/xenserver/models/compute/host_cpu.rb @@ -3,16 +3,16 @@ require 'fog/core/model' module Fog module Compute class XenServer - + # # A physical CPU # # @see http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_cpu # class HostCpu < Fog::Model - + identity :reference - + attribute :uuid attribute :family attribute :features @@ -30,9 +30,9 @@ module Fog def host service.hosts.get __host end - + end - + end end end diff --git a/lib/fog/xenserver/models/compute/host_metrics.rb b/lib/fog/xenserver/models/compute/host_metrics.rb index 54c245e33..7a4408d90 100644 --- a/lib/fog/xenserver/models/compute/host_metrics.rb +++ b/lib/fog/xenserver/models/compute/host_metrics.rb @@ -3,27 +3,27 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class HostMetrics < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_metrics - + identity :reference - + attribute :uuid attribute :live attribute :memory_free attribute :memory_total attribute :other_config attribute :last_updated - + def initialize(attributes = {}) super self.last_updated = attributes[:last_updated].to_time end - + end - + end end end diff --git a/lib/fog/xenserver/models/compute/pbd.rb b/lib/fog/xenserver/models/compute/pbd.rb index e911ac196..f7680daa6 100644 --- a/lib/fog/xenserver/models/compute/pbd.rb +++ b/lib/fog/xenserver/models/compute/pbd.rb @@ -28,7 +28,7 @@ module Fog def host service.hosts.get __host end - + def unplug service.unplug_pbd reference end diff --git a/lib/fog/xenserver/models/compute/pool.rb b/lib/fog/xenserver/models/compute/pool.rb index 3c6e77783..592e48a5e 100644 --- a/lib/fog/xenserver/models/compute/pool.rb +++ b/lib/fog/xenserver/models/compute/pool.rb @@ -63,7 +63,7 @@ module Fog def master service.hosts.get __master end - + def set_attribute(name, *val) data = service.set_attribute( 'pool', reference, name, *val ) # Do not reload automatically for performance reasons diff --git a/lib/fog/xenserver/models/compute/storage_repository.rb b/lib/fog/xenserver/models/compute/storage_repository.rb index cbfaa1813..d88236573 100644 --- a/lib/fog/xenserver/models/compute/storage_repository.rb +++ b/lib/fog/xenserver/models/compute/storage_repository.rb @@ -46,12 +46,12 @@ module Fog def destroy service.destroy_sr reference end - + def save requires :name requires :type - # host is not a model attribute (not in XAPI at least), + # host is not a model attribute (not in XAPI at least), # but we need it here host = attributes[:host] raise ArgumentError.new('host is required for this operation') unless @@ -63,7 +63,7 @@ module Fog # create_sr request provides sane defaults if some attributes are # missing attr = service.get_record( - service.create_sr( host.reference, + service.create_sr( host.reference, name, type, description || '', @@ -74,10 +74,10 @@ module Fog sm_config || {}), 'SR' ) - merge_attributes attr + merge_attributes attr true end - + def set_attribute(name, *val) data = service.set_attribute( 'SR', reference, name, *val ) # Do not reload automatically for performance reasons diff --git a/lib/fog/xenserver/models/compute/vbd_metrics.rb b/lib/fog/xenserver/models/compute/vbd_metrics.rb index 237e70b77..53933d6a8 100644 --- a/lib/fog/xenserver/models/compute/vbd_metrics.rb +++ b/lib/fog/xenserver/models/compute/vbd_metrics.rb @@ -3,25 +3,25 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class VbdMetrics < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VBD_metrics - + identity :reference - + attribute :uuid attribute :last_updated attribute :other_config attribute :io_read_kbs attribute :io_write_kbs - + def initialize(attributes = {}) super self.last_updated = attributes[:last_updated].to_time end end - + end end end diff --git a/lib/fog/xenserver/models/compute/vlan.rb b/lib/fog/xenserver/models/compute/vlan.rb index 4a5cb29c6..80d6fcf13 100644 --- a/lib/fog/xenserver/models/compute/vlan.rb +++ b/lib/fog/xenserver/models/compute/vlan.rb @@ -23,7 +23,7 @@ module Fog def untagged_pif service.pifs.get __untagged_pif end - + # @return [Fog::Compute::XenServer::PIF] interface on which traffic is untagged # # @see http://docs.vmd.citrix.com/XenServer/6.1.0/1.0/en_gb/api/?c=VLAN @@ -31,7 +31,7 @@ module Fog def tagged_pif service.pifs.get __tagged_pif end - + # Creates a new VLAN. # # service = Fog::Compute[:xenserver] @@ -53,7 +53,7 @@ module Fog unless pif and net raise Fog::Error.new 'save requires :pif and :network attributes' end - ref = service.create_vlan attributes[:pif].reference, + ref = service.create_vlan attributes[:pif].reference, tag, attributes[:network].reference data = service.get_record ref, 'VLAN' diff --git a/lib/fog/xenserver/parser.rb b/lib/fog/xenserver/parser.rb index 38074fe00..c5e09255e 100644 --- a/lib/fog/xenserver/parser.rb +++ b/lib/fog/xenserver/parser.rb @@ -2,17 +2,17 @@ module Fog module Parsers module XenServer class Base - + attr_reader :response - + def initialize reset end - + def reset @response = {} end - + def parse( data ) if data.kind_of? Hash @response = data.symbolize_keys! @@ -26,10 +26,10 @@ module Fog elsif data.kind_of?(String) and data =~ /OpaqueRef:/ @response = data end - + @response end - + end end end diff --git a/lib/fog/xenserver/parsers/get_hosts.rb b/lib/fog/xenserver/parsers/get_hosts.rb index c36fc0e0a..cea3bce80 100644 --- a/lib/fog/xenserver/parsers/get_hosts.rb +++ b/lib/fog/xenserver/parsers/get_hosts.rb @@ -2,18 +2,18 @@ module Fog module Parsers module XenServer class GetHosts < Fog::Parsers::XenServer::Base - + def reset @response = [] end - + def parse( data ) parser = Fog::Parsers::XenServer::Base.new data.each_pair {|reference, host_hash| @response << parser.parse( host_hash ).merge(:reference => reference) } end - + end - + end end end diff --git a/lib/fog/xenserver/parsers/get_networks.rb b/lib/fog/xenserver/parsers/get_networks.rb index 707001cca..0c4a3201a 100644 --- a/lib/fog/xenserver/parsers/get_networks.rb +++ b/lib/fog/xenserver/parsers/get_networks.rb @@ -2,18 +2,18 @@ module Fog module Parsers module XenServer class GetNetworks < Fog::Parsers::XenServer::Base - + def reset @response = [] end - + def parse( data ) parser = Fog::Parsers::XenServer::Base.new data.each_pair {|reference, network_hash| @response << parser.parse( network_hash ).merge(:reference => reference) } end - + end - + end end end diff --git a/lib/fog/xenserver/parsers/get_pools.rb b/lib/fog/xenserver/parsers/get_pools.rb index 6f09d3cef..3ff457356 100644 --- a/lib/fog/xenserver/parsers/get_pools.rb +++ b/lib/fog/xenserver/parsers/get_pools.rb @@ -2,18 +2,18 @@ module Fog module Parsers module XenServer class GetPools < Fog::Parsers::XenServer::Base - + def reset @response = [] end - + def parse( data ) parser = Fog::Parsers::XenServer::Base.new data.each_pair {|reference, pool_hash| @response << parser.parse( pool_hash ).merge(:reference => reference) } end - + end - + end end end diff --git a/lib/fog/xenserver/parsers/get_records.rb b/lib/fog/xenserver/parsers/get_records.rb index e3fc5a6a6..6ba187437 100644 --- a/lib/fog/xenserver/parsers/get_records.rb +++ b/lib/fog/xenserver/parsers/get_records.rb @@ -2,18 +2,18 @@ module Fog module Parsers module XenServer class GetRecords < Fog::Parsers::XenServer::Base - + def reset @response = [] end - + def parse( data ) parser = Fog::Parsers::XenServer::Base.new data.each_pair {|reference, hash| @response << parser.parse( hash ).merge(:reference => reference) } end - + end - + end end end diff --git a/lib/fog/xenserver/parsers/get_storage_repositories.rb b/lib/fog/xenserver/parsers/get_storage_repositories.rb index 437f54c7a..d1b1a8af6 100644 --- a/lib/fog/xenserver/parsers/get_storage_repositories.rb +++ b/lib/fog/xenserver/parsers/get_storage_repositories.rb @@ -2,18 +2,18 @@ module Fog module Parsers module XenServer class GetStorageRepositories < Fog::Parsers::XenServer::Base - + def reset @response = [] end - + def parse( data ) parser = Fog::Parsers::XenServer::Base.new data.each_pair {|reference, sr_hash| @response << parser.parse( sr_hash ).merge(:reference => reference) } end - + end - + end end end diff --git a/lib/fog/xenserver/parsers/get_vbds.rb b/lib/fog/xenserver/parsers/get_vbds.rb index 29ae02c91..7b5a59c98 100644 --- a/lib/fog/xenserver/parsers/get_vbds.rb +++ b/lib/fog/xenserver/parsers/get_vbds.rb @@ -2,18 +2,18 @@ module Fog module Parsers module XenServer class GetVBDs < Fog::Parsers::XenServer::Base - + def reset @response = [] end - + def parse( data ) parser = Fog::Parsers::XenServer::Base.new data.each_pair {|reference, hash| @response << parser.parse( hash ).merge(:reference => reference) } end - + end - + end end end diff --git a/lib/fog/xenserver/parsers/get_vifs.rb b/lib/fog/xenserver/parsers/get_vifs.rb index 0341d1695..6e83ad68a 100644 --- a/lib/fog/xenserver/parsers/get_vifs.rb +++ b/lib/fog/xenserver/parsers/get_vifs.rb @@ -2,18 +2,18 @@ module Fog module Parsers module XenServer class GetVIFs < Fog::Parsers::XenServer::Base - + def reset @response = [] end - + def parse( data ) parser = Fog::Parsers::XenServer::Base.new data.each_pair {|reference, vif_hash| @response << parser.parse( vif_hash ).merge(:reference => reference) } end - + end - + end end end diff --git a/lib/fog/xenserver/parsers/get_vms.rb b/lib/fog/xenserver/parsers/get_vms.rb index 74df517fa..f91c48386 100644 --- a/lib/fog/xenserver/parsers/get_vms.rb +++ b/lib/fog/xenserver/parsers/get_vms.rb @@ -3,18 +3,18 @@ module Fog module XenServer class GetVms < Fog::Parsers::XenServer::Base - + def reset @response = [] end - + def parse( data ) parser = Fog::Parsers::XenServer::Base.new data.each_pair {|reference, vm_hash| @response << parser.parse( vm_hash ).merge(:reference => reference) } end - + end - + end end end diff --git a/lib/fog/xenserver/requests/compute/clone_server.rb b/lib/fog/xenserver/requests/compute/clone_server.rb index d40ee8bbd..0c926fe46 100644 --- a/lib/fog/xenserver/requests/compute/clone_server.rb +++ b/lib/fog/xenserver/requests/compute/clone_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class XenServer class Real - + def clone_server( server_name, template_ref ) # Clone the VM template if template_ref.kind_of? Fog::Compute::XenServer::Server @@ -13,7 +13,7 @@ module Fog ref = @connection.request( {:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.clone'}, - template_ref, server_name + template_ref, server_name ) end diff --git a/lib/fog/xenserver/requests/compute/create_network.rb b/lib/fog/xenserver/requests/compute/create_network.rb index 133a225b6..265efde1d 100644 --- a/lib/fog/xenserver/requests/compute/create_network.rb +++ b/lib/fog/xenserver/requests/compute/create_network.rb @@ -11,8 +11,8 @@ module Fog def create_network( name, config = {} ) config.reject! { |k,v| v.nil? } - default_config = { - :name_label => name, + default_config = { + :name_label => name, # Description is mandatory in XenAPI but we default to empty :name_description => config[:description] || '', # Mandatory, but can be empty @@ -21,20 +21,20 @@ module Fog @connection.request( { - :parser => Fog::Parsers::XenServer::Base.new, + :parser => Fog::Parsers::XenServer::Base.new, :method => 'network.create' - }, - default_config + }, + default_config ) end end class Mock - + def create_network( name, description = '', config = {} ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/create_server.rb b/lib/fog/xenserver/requests/compute/create_server.rb index e8781caf9..2daadf2a9 100644 --- a/lib/fog/xenserver/requests/compute/create_server.rb +++ b/lib/fog/xenserver/requests/compute/create_server.rb @@ -2,11 +2,11 @@ module Fog module Compute class XenServer class Real - + def get_vm_by_name(label) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.get_by_name_label' }, label) end - + def get_vm_by_uuid(uuid) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.get_by_uuid' }, uuid) end @@ -23,10 +23,10 @@ module Fog config[:affinity] = config[:affinity].reference \ if config[:affinity].kind_of? Fog::Compute::XenServer::Host config.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} - %w{ VCPUs_at_startup - VCPUs_max + %w{ VCPUs_at_startup + VCPUs_max VCPUs_params - PV_bootloader_args + PV_bootloader_args PV_bootloader PV_kernel PV_ramdisk @@ -66,7 +66,7 @@ module Fog :PV_args => '-- quiet console=hvc0', :PV_bootloader_args => '', :PV_legacy_args => '', - :HVM_boot_policy => '', + :HVM_boot_policy => '', :HVM_boot_params => {}, :PCI_bus => '', :recommendations => '', @@ -82,7 +82,7 @@ module Fog if template.kind_of? String template_string = template - # try template by UUID + # try template by UUID template = servers.templates.find { |s| s.uuid == template_string } if template.nil? # Try with the template name just in case @@ -105,24 +105,24 @@ module Fog end if !extra_args[:auto_start] == false @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.provision'}, ref) - start_vm( ref ) + start_vm( ref ) end - + ref end - + end - + class Mock - + def create_server( name_label, template = nil, network = nil, extra_args = {}) Fog::Mock.not_implemented end - + def create_server_raw(config = {}) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/create_sr.rb b/lib/fog/xenserver/requests/compute/create_sr.rb index fed3a2bec..54530c646 100644 --- a/lib/fog/xenserver/requests/compute/create_sr.rb +++ b/lib/fog/xenserver/requests/compute/create_sr.rb @@ -3,7 +3,7 @@ module Fog class XenServer class Real - + # # Create a storage repository (SR) # @@ -17,33 +17,33 @@ module Fog # { :device => /dev/sdb } for example # @param [String] physical_size '0' will use the whole device (FIXME # needs confirmation) - # @param [String] content_type the type of the SR's content. - # According to Citrix documentation, used only to distinguish ISO - # libraries from other SRs. Set it to 'iso' for storage repositories + # @param [String] content_type the type of the SR's content. + # According to Citrix documentation, used only to distinguish ISO + # libraries from other SRs. Set it to 'iso' for storage repositories # that store a library of ISOs, 'user' or '' (empty) otherwise. # @see http://docs.vmd.citrix.com/XenServer/6.1.0/1.0/en_gb/reference.html#cli-xe-commands_sr # @param [String] shared # # @return [String] an OpaqueRef to the storage repository def create_sr( host_ref, - name_label, + name_label, type, name_description = '', - device_config = {}, + device_config = {}, physical_size = '0', - content_type = 'user', - shared = false, + content_type = 'user', + shared = false, sm_config = {} ) @connection.request( - {:parser => Fog::Parsers::XenServer::Base.new, :method => 'SR.create'}, - host_ref, - device_config || {}, - physical_size || '0', - name_label, + {:parser => Fog::Parsers::XenServer::Base.new, :method => 'SR.create'}, + host_ref, + device_config || {}, + physical_size || '0', + name_label, name_description || '', type, - content_type, + content_type, shared || false, sm_config || {} ) @@ -52,19 +52,19 @@ module Fog end class Mock - + def create_sr( host_ref, - name_label, + name_label, type, name_description = nil, - device_config = {}, + device_config = {}, physical_size = '0', - content_type = nil, - shared = false, + content_type = nil, + shared = false, sm_config = {} ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/create_vbd.rb b/lib/fog/xenserver/requests/compute/create_vbd.rb index a6c27c4c1..e54a7335f 100644 --- a/lib/fog/xenserver/requests/compute/create_vbd.rb +++ b/lib/fog/xenserver/requests/compute/create_vbd.rb @@ -3,7 +3,7 @@ module Fog class XenServer class Real - + def create_vbd( vm_ref, vdi_ref, config = {} ) raise ArgumentError.new('Invalid config') if config.nil? vm_ref = vm_ref.reference if vm_ref.kind_of? Fog::Compute::XenServer::Server @@ -28,11 +28,11 @@ module Fog end class Mock - + def create_vbd( config ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/create_vdi.rb b/lib/fog/xenserver/requests/compute/create_vdi.rb index 51cae4777..cf285418b 100644 --- a/lib/fog/xenserver/requests/compute/create_vdi.rb +++ b/lib/fog/xenserver/requests/compute/create_vdi.rb @@ -3,7 +3,7 @@ module Fog class XenServer class Real - + def create_vdi( config ) raise ArgumentError.new('Invalid config') if config.nil? raise ArgumentError.new('Missing virtual_size attribute') if config[:virtual_size].nil? @@ -21,11 +21,11 @@ module Fog end class Mock - + def create_vdi( ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/create_vif.rb b/lib/fog/xenserver/requests/compute/create_vif.rb index ff541573d..b1d5d3983 100644 --- a/lib/fog/xenserver/requests/compute/create_vif.rb +++ b/lib/fog/xenserver/requests/compute/create_vif.rb @@ -3,7 +3,7 @@ module Fog class XenServer class Real - + def create_vif( vm_ref, network_ref, device = -1) raise ArgumentError.new('Invalid vm_ref') if vm_ref.nil? raise ArgumentError.new('Invalid network_ref') if network_ref.nil? @@ -43,13 +43,13 @@ module Fog conf end end - + class Mock - + def create_vif( vm_ref, network_ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/create_vlan.rb b/lib/fog/xenserver/requests/compute/create_vlan.rb index 0e345a097..19dfc1acf 100644 --- a/lib/fog/xenserver/requests/compute/create_vlan.rb +++ b/lib/fog/xenserver/requests/compute/create_vlan.rb @@ -3,18 +3,18 @@ module Fog class XenServer class Real - - # - # Create a VLAN + + # + # Create a VLAN # # @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=VLAN # def create_vlan( pif_ref, vlan_id, network_ref ) @connection.request( { - :parser => Fog::Parsers::XenServer::Base.new, + :parser => Fog::Parsers::XenServer::Base.new, :method => 'VLAN.create' - }, + }, pif_ref, vlan_id.to_s, network_ref @@ -23,11 +23,11 @@ module Fog end class Mock - + def create_vlan( pif_ref, vlan_id, network_ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/destroy_network.rb b/lib/fog/xenserver/requests/compute/destroy_network.rb index a2f932209..87b38e51a 100644 --- a/lib/fog/xenserver/requests/compute/destroy_network.rb +++ b/lib/fog/xenserver/requests/compute/destroy_network.rb @@ -4,7 +4,7 @@ module Fog class Real - # + # # Destroy a Network # # @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=network @@ -12,9 +12,9 @@ module Fog def destroy_network( ref ) @connection.request( { - :parser => Fog::Parsers::XenServer::Base.new, + :parser => Fog::Parsers::XenServer::Base.new, :method => 'network.destroy' - }, + }, ref ) end diff --git a/lib/fog/xenserver/requests/compute/destroy_sr.rb b/lib/fog/xenserver/requests/compute/destroy_sr.rb index 121305a02..67cc35a01 100644 --- a/lib/fog/xenserver/requests/compute/destroy_sr.rb +++ b/lib/fog/xenserver/requests/compute/destroy_sr.rb @@ -4,14 +4,14 @@ module Fog class Real - # + # # Destroy a Storage Repository # # http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=SR # def destroy_sr( sr_ref ) @connection.request( - {:parser => Fog::Parsers::XenServer::Base.new, :method => 'SR.destroy'}, + {:parser => Fog::Parsers::XenServer::Base.new, :method => 'SR.destroy'}, sr_ref ) end diff --git a/lib/fog/xenserver/requests/compute/destroy_vlan.rb b/lib/fog/xenserver/requests/compute/destroy_vlan.rb index 49475f67e..809584eda 100644 --- a/lib/fog/xenserver/requests/compute/destroy_vlan.rb +++ b/lib/fog/xenserver/requests/compute/destroy_vlan.rb @@ -4,16 +4,16 @@ module Fog class Real - # Destroy a VLAN + # Destroy a VLAN # # @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=VLAN # def destroy_vlan( ref ) @connection.request( { - :parser => Fog::Parsers::XenServer::Base.new, + :parser => Fog::Parsers::XenServer::Base.new, :method => 'VLAN.destroy' - }, + }, ref ) end diff --git a/lib/fog/xenserver/requests/compute/disable_host.rb b/lib/fog/xenserver/requests/compute/disable_host.rb index 595e399b9..989a8f42b 100644 --- a/lib/fog/xenserver/requests/compute/disable_host.rb +++ b/lib/fog/xenserver/requests/compute/disable_host.rb @@ -3,9 +3,9 @@ module Fog class XenServer class Real - - # - # Puts the host into a state in which no new VMs can be started. + + # + # Puts the host into a state in which no new VMs can be started. # Currently active VMs on the host continue to execute. # # @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=host @@ -13,15 +13,15 @@ module Fog def disable_host( ref ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "host.disable"}, ref) end - + end - + class Mock - + def disable_host( ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/enable_host.rb b/lib/fog/xenserver/requests/compute/enable_host.rb index 3da734524..d77b7cbc5 100644 --- a/lib/fog/xenserver/requests/compute/enable_host.rb +++ b/lib/fog/xenserver/requests/compute/enable_host.rb @@ -3,24 +3,24 @@ module Fog class XenServer class Real - - # - # Puts the host into a state in which VMs can be started. + + # + # Puts the host into a state in which VMs can be started. # # @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=host # def enable_host( ref ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "host.enable"}, ref) end - + end - + class Mock - + def enable_host( ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/get_record.rb b/lib/fog/xenserver/requests/compute/get_record.rb index 78af8fcee..2585b7342 100644 --- a/lib/fog/xenserver/requests/compute/get_record.rb +++ b/lib/fog/xenserver/requests/compute/get_record.rb @@ -3,9 +3,9 @@ module Fog class XenServer class Real - + require 'fog/xenserver/parser' - + def get_record( ref, klass, options = {} ) get_record_by_ref ref, klass, options end @@ -15,13 +15,13 @@ module Fog end end - + class Mock - + def get_record_by_ref Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/get_records.rb b/lib/fog/xenserver/requests/compute/get_records.rb index ea54e5f06..2d4ca7a0f 100644 --- a/lib/fog/xenserver/requests/compute/get_records.rb +++ b/lib/fog/xenserver/requests/compute/get_records.rb @@ -1,11 +1,11 @@ module Fog module Compute - class XenServer + class XenServer class Real - + require 'fog/xenserver/parsers/get_records' - + def get_records( klass, options = {} ) begin res = @connection.request(:parser => Fog::Parsers::XenServer::GetRecords.new, :method => "#{klass}.get_all_records") @@ -14,15 +14,15 @@ module Fog [] end end - + end - + class Mock - + def get_vms Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/provision_server.rb b/lib/fog/xenserver/requests/compute/provision_server.rb index ca68b30ea..a8ab8a336 100644 --- a/lib/fog/xenserver/requests/compute/provision_server.rb +++ b/lib/fog/xenserver/requests/compute/provision_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class XenServer class Real - + def provision_server( ref ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.provision'}, ref) end diff --git a/lib/fog/xenserver/requests/compute/reboot_host.rb b/lib/fog/xenserver/requests/compute/reboot_host.rb index 31ff248f2..45ddf367a 100644 --- a/lib/fog/xenserver/requests/compute/reboot_host.rb +++ b/lib/fog/xenserver/requests/compute/reboot_host.rb @@ -3,19 +3,19 @@ module Fog class XenServer class Real - + def reboot_host( ref ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "host.reboot"}, ref) end - + end - + class Mock - + def reboot_host( ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/reboot_server.rb b/lib/fog/xenserver/requests/compute/reboot_server.rb index 37d6ce59c..7030e0615 100644 --- a/lib/fog/xenserver/requests/compute/reboot_server.rb +++ b/lib/fog/xenserver/requests/compute/reboot_server.rb @@ -3,19 +3,19 @@ module Fog class XenServer class Real - + def reboot_server( ref, stype = 'clean' ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "VM.#{stype}_reboot"}, ref) end - + end - + class Mock - + def reboot_server( ref, stype ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/set_affinity.rb b/lib/fog/xenserver/requests/compute/set_affinity.rb index cce80d5d2..0ce91a9b3 100644 --- a/lib/fog/xenserver/requests/compute/set_affinity.rb +++ b/lib/fog/xenserver/requests/compute/set_affinity.rb @@ -3,21 +3,21 @@ module Fog class XenServer class Real - + require 'fog/xenserver/parser' - + def set_affinity( host_ref ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.set_affinity'}, host_ref) end - + end - + class Mock - + def set_affinity( uuid ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/set_attribute.rb b/lib/fog/xenserver/requests/compute/set_attribute.rb index 4185b2bd0..adaa1d703 100644 --- a/lib/fog/xenserver/requests/compute/set_attribute.rb +++ b/lib/fog/xenserver/requests/compute/set_attribute.rb @@ -3,21 +3,21 @@ module Fog class XenServer class Real - + require 'fog/xenserver/parser' - + def set_attribute( klass, ref, attr_name, *value ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "#{klass}.set_#{attr_name.gsub('-','_')}"}, ref, *value) end - + end - + class Mock - + def set_attribute( klass, ref, attr_name, value ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/shutdown_host.rb b/lib/fog/xenserver/requests/compute/shutdown_host.rb index b566b2800..4a1aef91b 100644 --- a/lib/fog/xenserver/requests/compute/shutdown_host.rb +++ b/lib/fog/xenserver/requests/compute/shutdown_host.rb @@ -3,19 +3,19 @@ module Fog class XenServer class Real - + def shutdown_host( ref ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "host.shutdown"}, ref) end - + end - + class Mock - + def shutdown_host( ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/shutdown_server.rb b/lib/fog/xenserver/requests/compute/shutdown_server.rb index d5017f532..9aa806ef8 100644 --- a/lib/fog/xenserver/requests/compute/shutdown_server.rb +++ b/lib/fog/xenserver/requests/compute/shutdown_server.rb @@ -3,19 +3,19 @@ module Fog class XenServer class Real - + def shutdown_server( vm_ref, stype = 'clean' ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => "VM.#{stype}_shutdown"}, vm_ref) end - + end - + class Mock - + def shutdown_server( vm_ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/start_server.rb b/lib/fog/xenserver/requests/compute/start_server.rb index 8cdb857d9..e756d99bb 100644 --- a/lib/fog/xenserver/requests/compute/start_server.rb +++ b/lib/fog/xenserver/requests/compute/start_server.rb @@ -3,19 +3,19 @@ module Fog class XenServer class Real - + def start_server( vm_ref ) start_vm( vm_ref ) end - + end - + class Mock - + def start_server( vm_ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/start_vm.rb b/lib/fog/xenserver/requests/compute/start_vm.rb index e3e0a45ad..4b2631582 100644 --- a/lib/fog/xenserver/requests/compute/start_vm.rb +++ b/lib/fog/xenserver/requests/compute/start_vm.rb @@ -3,21 +3,21 @@ module Fog class XenServer class Real - + # http://bit.ly/8ZPyCN # VM.start( session, VM_ref, start_paused, force) def start_vm( vm_ref ) @connection.request({:parser => Fog::Parsers::XenServer::Base.new, :method => 'VM.start'}, vm_ref, false, false) end - + end - + class Mock - + def start_vm( vm_ref ) Fog::Mock.not_implemented end - + end end diff --git a/lib/fog/xenserver/requests/compute/unplug_pbd.rb b/lib/fog/xenserver/requests/compute/unplug_pbd.rb index e5a8693a9..94e8e5228 100644 --- a/lib/fog/xenserver/requests/compute/unplug_pbd.rb +++ b/lib/fog/xenserver/requests/compute/unplug_pbd.rb @@ -6,7 +6,7 @@ module Fog def unplug_pbd( ref ) @connection.request( - {:parser => Fog::Parsers::XenServer::Base.new, :method => 'PBD.unplug'}, + {:parser => Fog::Parsers::XenServer::Base.new, :method => 'PBD.unplug'}, ref ) end diff --git a/lib/fog/xenserver/utilities.rb b/lib/fog/xenserver/utilities.rb index f681a1ad1..25ba0cfc0 100644 --- a/lib/fog/xenserver/utilities.rb +++ b/lib/fog/xenserver/utilities.rb @@ -5,4 +5,4 @@ class Hash end self end -end \ No newline at end of file +end diff --git a/lib/fog/zerigo/models/dns/records.rb b/lib/fog/zerigo/models/dns/records.rb index eca25255d..a43071c0a 100644 --- a/lib/fog/zerigo/models/dns/records.rb +++ b/lib/fog/zerigo/models/dns/records.rb @@ -10,9 +10,9 @@ module Fog attribute :zone model Fog::DNS::Zerigo::Record - + # List all domains - # @param [Hash] options Options to pass to the underlying API call + # @param [Hash] options Options to pass to the underlying API call # @option options [String] :fqdn search for the given fqdn def all(options = {}) requires :zone diff --git a/lib/fog/zerigo/parsers/dns/get_zone.rb b/lib/fog/zerigo/parsers/dns/get_zone.rb index 6ffe353cc..c0fb4800f 100644 --- a/lib/fog/zerigo/parsers/dns/get_zone.rb +++ b/lib/fog/zerigo/parsers/dns/get_zone.rb @@ -20,7 +20,7 @@ module Fog @in_hosts= true end end - + def end_element(name) if (@in_hosts) #in hosts part of response @@ -47,7 +47,7 @@ module Fog @response[name] = value end end - + end end diff --git a/lib/fog/zerigo/parsers/dns/get_zone_stats.rb b/lib/fog/zerigo/parsers/dns/get_zone_stats.rb index 43c257c20..c542481db 100644 --- a/lib/fog/zerigo/parsers/dns/get_zone_stats.rb +++ b/lib/fog/zerigo/parsers/dns/get_zone_stats.rb @@ -15,7 +15,7 @@ module Fog @response[name] = value.to_i when 'domain', 'period-begin', 'period-end' @response[name] = value - end + end end end diff --git a/lib/fog/zerigo/requests/dns/count_hosts.rb b/lib/fog/zerigo/requests/dns/count_hosts.rb index a39f8a3ad..7b3c6424b 100644 --- a/lib/fog/zerigo/requests/dns/count_hosts.rb +++ b/lib/fog/zerigo/requests/dns/count_hosts.rb @@ -5,13 +5,13 @@ module Fog require 'fog/zerigo/parsers/dns/count_hosts' - # total number of hosts available for the specified zone. It is the same value as provided + # total number of hosts available for the specified zone. It is the same value as provided # in the X-Query-Count header in the list_hosts API method # # ==== Returns - # * response<~Excon::Response>: + # * response<~Excon::Response>: # * body<~Hash> - # * 'count'<~Integer> + # * 'count'<~Integer> # * 'status'<~Integer> - 200 indicates success def count_hosts(zone_id) request( diff --git a/lib/fog/zerigo/requests/dns/count_zones.rb b/lib/fog/zerigo/requests/dns/count_zones.rb index fe5a7a82c..76b83d7f5 100644 --- a/lib/fog/zerigo/requests/dns/count_zones.rb +++ b/lib/fog/zerigo/requests/dns/count_zones.rb @@ -5,13 +5,13 @@ module Fog require 'fog/zerigo/parsers/dns/count_zones' - # Total number of zones hosted Zerigo for this account. It is the same value as provided + # Total number of zones hosted Zerigo for this account. It is the same value as provided # in the X-Query-Count header in the list_zones API method # # ==== Returns - # * response<~Excon::Response>: + # * response<~Excon::Response>: # * body<~Hash> - # * 'count'<~Integer> + # * 'count'<~Integer> # * 'status'<~Integer> - 200 indicates success def count_zones request( diff --git a/lib/fog/zerigo/requests/dns/create_host.rb b/lib/fog/zerigo/requests/dns/create_host.rb index 61e73e013..668b444c8 100644 --- a/lib/fog/zerigo/requests/dns/create_host.rb +++ b/lib/fog/zerigo/requests/dns/create_host.rb @@ -17,7 +17,7 @@ module Fog # * priority<~Integer> - Note: required for MX or SRV records # * ttl<~Integer> # ==== Returns - # * response<~Excon::Response>: + # * response<~Excon::Response>: # * body<~Hash> # * 'created-at'<~String> # * 'data'<~String> @@ -30,9 +30,9 @@ module Fog # * 'ttl'<~Integer> # * 'updated-at'<~String> # * 'zone-id'<~String> - # * 'status'<~Integer> - 201 if successful + # * 'status'<~Integer> - 201 if successful def create_host(zone_id, host_type, data, options = {}) - + optional_tags= '' options.each { |option, value| case option @@ -46,7 +46,7 @@ module Fog optional_tags+= "#{value}" end } - + request( :body => %Q{#{host_type}#{data}#{optional_tags}}, :expects => 201, diff --git a/lib/fog/zerigo/requests/dns/create_zone.rb b/lib/fog/zerigo/requests/dns/create_zone.rb index 9d9f058dd..67f288996 100644 --- a/lib/fog/zerigo/requests/dns/create_zone.rb +++ b/lib/fog/zerigo/requests/dns/create_zone.rb @@ -43,9 +43,9 @@ module Fog # * 'updated-at'<~String> # * 'hosts'<~String> # * 'axfr-ips'<~String> - # * 'restrict-axfr'<~String> - # * 'status'<~Integer> - 201 if successful - + # * 'restrict-axfr'<~String> + # * 'status'<~Integer> - 201 if successful + def create_zone(domain, default_ttl, ns_type, options = {}) optional_tags= '' @@ -73,7 +73,7 @@ module Fog optional_tags+= "#{value}" end } - + request( :body => %Q{#{domain}#{default_ttl}#{ns_type}#{optional_tags}}, :expects => 201, diff --git a/lib/fog/zerigo/requests/dns/delete_host.rb b/lib/fog/zerigo/requests/dns/delete_host.rb index c57bbf09d..5eed49ae8 100644 --- a/lib/fog/zerigo/requests/dns/delete_host.rb +++ b/lib/fog/zerigo/requests/dns/delete_host.rb @@ -3,12 +3,12 @@ module Fog class Zerigo class Real - # Delete a host record + # Delete a host record # # ==== Parameters # * host_id<~Integer> - Id of host record to delete # ==== Returns - # * response<~Excon::Response>: + # * response<~Excon::Response>: # * 'status'<~Integer> - 200 indicates success def delete_host(host_id) request( diff --git a/lib/fog/zerigo/requests/dns/delete_zone.rb b/lib/fog/zerigo/requests/dns/delete_zone.rb index f6e2015b8..8a0a2d5d6 100644 --- a/lib/fog/zerigo/requests/dns/delete_zone.rb +++ b/lib/fog/zerigo/requests/dns/delete_zone.rb @@ -10,7 +10,7 @@ module Fog # ==== Returns # * response<~Excon::Response>: # * 'status'<~Integer> - 200 indicates success - + def delete_zone(zone_id) request( :expects => 200, diff --git a/lib/fog/zerigo/requests/dns/get_host.rb b/lib/fog/zerigo/requests/dns/get_host.rb index cb30c2774..7e914d846 100644 --- a/lib/fog/zerigo/requests/dns/get_host.rb +++ b/lib/fog/zerigo/requests/dns/get_host.rb @@ -10,7 +10,7 @@ module Fog # ==== Parameters # * host_id<~Integer> - ID of the host record to retrieve # ==== Returns - # * response<~Excon::Response>: + # * response<~Excon::Response>: # * body<~Hash>: # * 'created-at'<~String> # * 'data'<~String> diff --git a/lib/fog/zerigo/requests/dns/get_zone.rb b/lib/fog/zerigo/requests/dns/get_zone.rb index 9077a3e8a..933aaa5c9 100644 --- a/lib/fog/zerigo/requests/dns/get_zone.rb +++ b/lib/fog/zerigo/requests/dns/get_zone.rb @@ -5,7 +5,7 @@ module Fog require 'fog/zerigo/parsers/dns/get_zone' - # Get details of a DNS zone. The response is similar to list_zones, with the + # Get details of a DNS zone. The response is similar to list_zones, with the # addition of hosts-count and possibly hosts. # # ==== Parameters @@ -29,11 +29,11 @@ module Fog # * 'slave-nameservers'<~String> # * 'tag-list'<~String> # * 'updated-at'<~String> - # * 'hosts'<~Array> - a list of all host records. For the format of host info, see get_host() + # * 'hosts'<~Array> - a list of all host records. For the format of host info, see get_host() # * 'axfr-ips'<~String> - # * 'restrict-axfr'<~String> + # * 'restrict-axfr'<~String> # * 'status'<~Integer> - 200 indicates success - + def get_zone(zone_id_or_domain) request( :expects => 200, diff --git a/lib/fog/zerigo/requests/dns/get_zone_stats.rb b/lib/fog/zerigo/requests/dns/get_zone_stats.rb index 8af53f4e4..f21fdb041 100644 --- a/lib/fog/zerigo/requests/dns/get_zone_stats.rb +++ b/lib/fog/zerigo/requests/dns/get_zone_stats.rb @@ -5,11 +5,11 @@ module Fog require 'fog/zerigo/parsers/dns/get_zone_stats' - # returns current traffic statistics about this zone. Queries is measured from the + # returns current traffic statistics about this zone. Queries is measured from the # beginning of the current period through the time of the API call. # # ==== Parameters - # * zone_id<~Integer> - the zone ID + # * zone_id<~Integer> - the zone ID # # ==== Returns # * response<~Excon::Response>: @@ -20,7 +20,7 @@ module Fog # * 'period-end'<~String> - date # * 'queries'<~Integer> - # of queries for the zone during period # * 'status'<~Integer> - 200 indicates success - + def get_zone_stats(zone_id) request( :expects => 200, diff --git a/lib/fog/zerigo/requests/dns/list_zones.rb b/lib/fog/zerigo/requests/dns/list_zones.rb index 602958c8d..3a4a34f6b 100644 --- a/lib/fog/zerigo/requests/dns/list_zones.rb +++ b/lib/fog/zerigo/requests/dns/list_zones.rb @@ -33,7 +33,7 @@ module Fog # * 'updated-at'<~String> # * 'hosts'<~String> # * 'axfr-ips'<~String> - # * 'restrict-axfr'<~String> + # * 'restrict-axfr'<~String> # * 'status'<~Integer> - 200 indicates success def list_zones(options = {}) request( diff --git a/lib/fog/zerigo/requests/dns/update_host.rb b/lib/fog/zerigo/requests/dns/update_host.rb index 0520584cf..3f0b1e554 100644 --- a/lib/fog/zerigo/requests/dns/update_host.rb +++ b/lib/fog/zerigo/requests/dns/update_host.rb @@ -15,7 +15,7 @@ module Fog # * priority<~Integer> - Note: required for MX or SRV records # * ttl<~Integer> # ==== Returns - # * response<~Excon::Response>: + # * response<~Excon::Response>: # * 'status'<~Integer> - 200 for success # def update_host(host_id, options = {}) diff --git a/lib/fog/zerigo/requests/dns/update_zone.rb b/lib/fog/zerigo/requests/dns/update_zone.rb index f6c1ba4fe..bfcf313d5 100644 --- a/lib/fog/zerigo/requests/dns/update_zone.rb +++ b/lib/fog/zerigo/requests/dns/update_zone.rb @@ -55,7 +55,7 @@ module Fog optional_tags+= "#{value}" end } - + request( :body => %Q{#{optional_tags}}, :expects => 200,