fog 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.irbrc +87 -0
- data/Rakefile +3 -3
- data/bin/fog +1 -3
- data/docs/_layouts/default.html +2 -2
- data/docs/cdn/index.markdown +2 -2
- data/docs/compute/index.markdown +2 -2
- data/docs/dns/index.markdown +2 -2
- data/docs/public/js/libs/dd_belatedpng.js +289 -13
- data/docs/public/js/libs/dd_belatedpng.min.js +13 -0
- data/docs/public/js/libs/modernizr-1.6.js +892 -0
- data/docs/public/js/profiling/yahoo-profiling.js +1028 -0
- data/docs/storage/index.markdown +2 -2
- data/fog.gemspec +10 -4
- data/lib/fog.rb +4 -1
- data/lib/fog/aws.rb +46 -5
- data/lib/fog/aws/auto_scaling.rb +26 -11
- data/lib/fog/aws/beanstalk.rb +28 -16
- data/lib/fog/aws/cdn.rb +25 -9
- data/lib/fog/aws/cloud_formation.rb +18 -7
- data/lib/fog/aws/cloud_watch.rb +18 -8
- data/lib/fog/aws/compute.rb +52 -10
- data/lib/fog/aws/credential_fetcher.rb +64 -0
- data/lib/fog/aws/dns.rb +31 -11
- data/lib/fog/aws/dynamodb.rb +32 -18
- data/lib/fog/aws/elasticache.rb +18 -5
- data/lib/fog/aws/elb.rb +30 -10
- data/lib/fog/aws/elb/policy_types.rb +432 -1
- data/lib/fog/aws/emr.rb +20 -20
- data/lib/fog/aws/iam.rb +25 -2
- data/lib/fog/aws/models/beanstalk/environment.rb +16 -0
- data/lib/fog/aws/models/beanstalk/template.rb +16 -0
- data/lib/fog/aws/models/compute/address.rb +4 -0
- data/lib/fog/aws/models/compute/dhcp_option.rb +68 -0
- data/lib/fog/aws/models/compute/dhcp_options.rb +91 -0
- data/lib/fog/aws/models/compute/flavors.rb +10 -1
- data/lib/fog/aws/models/compute/internet_gateway.rb +81 -0
- data/lib/fog/aws/models/compute/internet_gateways.rb +91 -0
- data/lib/fog/aws/models/compute/network_interface.rb +70 -0
- data/lib/fog/aws/models/compute/network_interfaces.rb +136 -0
- data/lib/fog/aws/models/compute/security_group.rb +75 -17
- data/lib/fog/aws/models/compute/server.rb +16 -18
- data/lib/fog/aws/models/compute/servers.rb +1 -1
- data/lib/fog/aws/models/compute/spot_request.rb +20 -0
- data/lib/fog/aws/models/compute/spot_requests.rb +4 -4
- data/lib/fog/aws/models/compute/volume.rb +13 -0
- data/lib/fog/aws/models/dns/record.rb +12 -6
- data/lib/fog/aws/models/dns/records.rb +84 -12
- data/lib/fog/aws/models/dns/zones.rb +1 -1
- data/lib/fog/aws/models/elb/load_balancer.rb +36 -4
- data/lib/fog/aws/models/elb/load_balancers.rb +14 -4
- data/lib/fog/aws/models/iam/access_key.rb +38 -0
- data/lib/fog/aws/models/iam/access_keys.rb +36 -0
- data/lib/fog/aws/models/iam/policies.rb +44 -0
- data/lib/fog/aws/models/iam/policy.rb +39 -0
- data/lib/fog/aws/models/iam/user.rb +40 -0
- data/lib/fog/aws/models/iam/users.rb +27 -0
- data/lib/fog/aws/models/storage/directory.rb +34 -27
- data/lib/fog/aws/models/storage/file.rb +1 -1
- data/lib/fog/aws/models/storage/files.rb +5 -0
- data/lib/fog/aws/parsers/auto_scaling/put_notification_configuration.rb +27 -0
- data/lib/fog/aws/parsers/cloud_formation/describe_stacks.rb +12 -3
- data/lib/fog/aws/parsers/compute/associate_dhcp_options.rb +24 -0
- data/lib/fog/aws/parsers/compute/attach_internet_gateway.rb +24 -0
- data/lib/fog/aws/parsers/compute/attach_network_interface.rb +18 -0
- data/lib/fog/aws/parsers/compute/create_dhcp_options.rb +75 -0
- data/lib/fog/aws/parsers/compute/create_internet_gateway.rb +65 -0
- data/lib/fog/aws/parsers/compute/create_network_interface.rb +28 -0
- data/lib/fog/aws/parsers/compute/delete_dhcp_options.rb +24 -0
- data/lib/fog/aws/parsers/compute/delete_internet_gateway.rb +24 -0
- data/lib/fog/aws/parsers/compute/delete_network_interface.rb +24 -0
- data/lib/fog/aws/parsers/compute/describe_dhcp_options.rb +75 -0
- data/lib/fog/aws/parsers/compute/describe_instance_status.rb +32 -62
- data/lib/fog/aws/parsers/compute/describe_instances.rb +26 -8
- data/lib/fog/aws/parsers/compute/describe_internet_gateways.rb +65 -0
- data/lib/fog/aws/parsers/compute/describe_network_interface_attribute.rb +79 -0
- data/lib/fog/aws/parsers/compute/describe_network_interfaces.rb +43 -0
- data/lib/fog/aws/parsers/compute/describe_reserved_instances.rb +2 -2
- data/lib/fog/aws/parsers/compute/describe_volume_status.rb +62 -45
- data/lib/fog/aws/parsers/compute/describe_volumes.rb +0 -2
- data/lib/fog/aws/parsers/compute/detach_internet_gateway.rb +24 -0
- data/lib/fog/aws/parsers/compute/detach_network_interface.rb +24 -0
- data/lib/fog/aws/parsers/compute/network_interface_parser.rb +89 -0
- data/lib/fog/aws/parsers/dns/list_resource_record_sets.rb +2 -2
- data/lib/fog/aws/parsers/elb/apply_security_groups_to_load_balancer.rb +26 -0
- data/lib/fog/aws/parsers/elb/attach_load_balancer_to_subnets.rb +26 -0
- data/lib/fog/aws/parsers/elb/describe_load_balancers.rb +18 -2
- data/lib/fog/aws/parsers/elb/detach_load_balancer_from_subnets.rb +26 -0
- data/lib/fog/aws/parsers/iam/base_instance_profile.rb +79 -0
- data/lib/fog/aws/parsers/iam/get_role_policy.rb +32 -0
- data/lib/fog/aws/parsers/iam/get_user_policy.rb +9 -3
- data/lib/fog/aws/parsers/iam/instance_profile.rb +34 -0
- data/lib/fog/aws/parsers/iam/list_instance_profiles.rb +34 -0
- data/lib/fog/aws/parsers/iam/list_roles.rb +31 -0
- data/lib/fog/aws/parsers/iam/role_parser.rb +53 -0
- data/lib/fog/aws/parsers/iam/single_role.rb +29 -0
- data/lib/fog/aws/rds.rb +23 -11
- data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +4 -3
- data/lib/fog/aws/requests/auto_scaling/delete_notification_configuration.rb +47 -0
- data/lib/fog/aws/requests/auto_scaling/put_notification_configuration.rb +51 -0
- data/lib/fog/aws/requests/beanstalk/create_configuration_template.rb +3 -0
- data/lib/fog/aws/requests/compute/associate_dhcp_options.rb +57 -0
- data/lib/fog/aws/requests/compute/attach_internet_gateway.rb +56 -0
- data/lib/fog/aws/requests/compute/attach_network_interface.rb +57 -0
- data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +2 -2
- data/lib/fog/aws/requests/compute/create_dhcp_options.rb +75 -0
- data/lib/fog/aws/requests/compute/create_internet_gateway.rb +51 -0
- data/lib/fog/aws/requests/compute/create_network_interface.rb +118 -0
- data/lib/fog/aws/requests/compute/delete_dhcp_options.rb +50 -0
- data/lib/fog/aws/requests/compute/delete_internet_gateway.rb +48 -0
- data/lib/fog/aws/requests/compute/delete_network_interface.rb +52 -0
- data/lib/fog/aws/requests/compute/describe_dhcp_options.rb +62 -0
- data/lib/fog/aws/requests/compute/describe_instance_status.rb +11 -1
- data/lib/fog/aws/requests/compute/describe_instances.rb +3 -0
- data/lib/fog/aws/requests/compute/describe_internet_gateways.rb +61 -0
- data/lib/fog/aws/requests/compute/describe_network_interface_attribute.rb +67 -0
- data/lib/fog/aws/requests/compute/describe_network_interfaces.rb +85 -0
- data/lib/fog/aws/requests/compute/describe_volume_status.rb +3 -8
- data/lib/fog/aws/requests/compute/detach_internet_gateway.rb +56 -0
- data/lib/fog/aws/requests/compute/detach_network_interface.rb +49 -0
- data/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb +90 -0
- data/lib/fog/aws/requests/compute/register_image.rb +3 -3
- data/lib/fog/aws/requests/compute/release_address.rb +10 -2
- data/lib/fog/aws/requests/compute/reset_network_interface_attribute.rb +56 -0
- data/lib/fog/aws/requests/compute/run_instances.rb +1 -1
- data/lib/fog/aws/requests/compute/start_instances.rb +27 -0
- data/lib/fog/aws/requests/compute/stop_instances.rb +27 -0
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +109 -15
- data/lib/fog/aws/requests/dns/create_hosted_zone.rb +46 -1
- data/lib/fog/aws/requests/dns/get_hosted_zone.rb +24 -1
- data/lib/fog/aws/requests/dns/list_hosted_zones.rb +45 -0
- data/lib/fog/aws/requests/dns/list_resource_record_sets.rb +4 -2
- data/lib/fog/aws/requests/dynamodb/batch_get_item.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/batch_write_item.rb +35 -0
- data/lib/fog/aws/requests/dynamodb/create_table.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/delete_item.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/delete_table.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/describe_table.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/get_item.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/list_tables.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/put_item.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/query.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/scan.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/update_item.rb +1 -1
- data/lib/fog/aws/requests/dynamodb/update_table.rb +1 -1
- data/lib/fog/aws/requests/elb/apply_security_groups_to_load_balancer.rb +61 -0
- data/lib/fog/aws/requests/elb/attach_load_balancer_to_subnets.rb +61 -0
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +8 -3
- data/lib/fog/aws/requests/elb/describe_load_balancers.rb +35 -5
- data/lib/fog/aws/requests/elb/detach_load_balancer_from_subnets.rb +61 -0
- data/lib/fog/aws/requests/iam/add_role_to_instance_profile.rb +35 -0
- data/lib/fog/aws/requests/iam/create_instance_profile.rb +46 -0
- data/lib/fog/aws/requests/iam/create_role.rb +56 -0
- data/lib/fog/aws/requests/iam/delete_instance_profile.rb +32 -0
- data/lib/fog/aws/requests/iam/delete_role.rb +32 -0
- data/lib/fog/aws/requests/iam/delete_role_policy.rb +35 -0
- data/lib/fog/aws/requests/iam/get_group.rb +18 -0
- data/lib/fog/aws/requests/iam/get_instance_profile.rb +42 -0
- data/lib/fog/aws/requests/iam/get_role.rb +38 -0
- data/lib/fog/aws/requests/iam/get_role_policy.rb +36 -0
- data/lib/fog/aws/requests/iam/get_user.rb +23 -3
- data/lib/fog/aws/requests/iam/get_user_policy.rb +17 -0
- data/lib/fog/aws/requests/iam/list_instance_profiles.rb +50 -0
- data/lib/fog/aws/requests/iam/list_instance_profiles_for_role.rb +51 -0
- data/lib/fog/aws/requests/iam/list_role_policies.rb +39 -0
- data/lib/fog/aws/requests/iam/list_roles.rb +43 -0
- data/lib/fog/aws/requests/iam/put_group_policy.rb +1 -1
- data/lib/fog/aws/requests/iam/put_role_policy.rb +36 -0
- data/lib/fog/aws/requests/iam/put_user_policy.rb +1 -1
- data/lib/fog/aws/requests/iam/remove_role_from_instance_profile.rb +36 -0
- data/lib/fog/aws/requests/storage/get_bucket_policy.rb +1 -1
- data/lib/fog/aws/requests/storage/get_object_http_url.rb +2 -1
- data/lib/fog/aws/requests/storage/get_object_https_url.rb +1 -18
- data/lib/fog/aws/requests/storage/get_object_url.rb +29 -8
- data/lib/fog/aws/requests/storage/post_object_hidden_fields.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_policy.rb +1 -1
- data/lib/fog/aws/requests/storage/put_object_url.rb +22 -28
- data/lib/fog/aws/requests/sts/get_federation_token.rb +1 -1
- data/lib/fog/aws/ses.rb +21 -8
- data/lib/fog/aws/simpledb.rb +22 -9
- data/lib/fog/aws/sns.rb +18 -7
- data/lib/fog/aws/sqs.rb +20 -11
- data/lib/fog/aws/storage.rb +51 -18
- data/lib/fog/aws/sts.rb +1 -2
- data/lib/fog/bare_metal_cloud.rb +1 -1
- data/lib/fog/bare_metal_cloud/compute.rb +1 -1
- data/lib/fog/bin.rb +2 -1
- data/lib/fog/bin/aws.rb +2 -0
- data/lib/fog/bin/hp.rb +38 -0
- data/lib/fog/bin/openstack.rb +6 -1
- data/lib/fog/bin/xenserver.rb +31 -0
- data/lib/fog/bluebox.rb +1 -1
- data/lib/fog/bluebox/compute.rb +2 -3
- data/lib/fog/bluebox/dns.rb +2 -2
- data/lib/fog/bluebox/models/compute/server.rb +1 -1
- data/lib/fog/brightbox.rb +1 -1
- data/lib/fog/brightbox/compute.rb +6 -8
- data/lib/fog/brightbox/models/compute/server.rb +2 -1
- data/lib/fog/cdn.rb +3 -0
- data/lib/fog/clodo/compute.rb +1 -3
- data/lib/fog/clodo/models/compute/server.rb +1 -1
- data/lib/fog/clodo/requests/compute/create_server.rb +1 -1
- data/lib/fog/clodo/requests/compute/delete_ip_address.rb +1 -1
- data/lib/fog/clodo/requests/compute/move_ip_address.rb +1 -1
- data/lib/fog/clodo/requests/compute/server_action.rb +1 -1
- data/lib/fog/cloudstack.rb +13 -1
- data/lib/fog/cloudstack/compute.rb +238 -61
- data/lib/fog/cloudstack/models/compute/address.rb +17 -0
- data/lib/fog/cloudstack/models/compute/flavor.rb +33 -0
- data/lib/fog/cloudstack/models/compute/flavors.rb +28 -0
- data/lib/fog/cloudstack/models/compute/image.rb +72 -0
- data/lib/fog/cloudstack/models/compute/images.rb +32 -0
- data/lib/fog/cloudstack/models/compute/job.rb +29 -0
- data/lib/fog/cloudstack/models/compute/jobs.rb +28 -0
- data/lib/fog/cloudstack/models/compute/server.rb +92 -0
- data/lib/fog/cloudstack/models/compute/servers.rb +34 -0
- data/lib/fog/cloudstack/models/compute/volume.rb +119 -0
- data/lib/fog/cloudstack/models/compute/volumes.rb +28 -0
- data/lib/fog/cloudstack/models/compute/zone.rb +39 -0
- data/lib/fog/cloudstack/models/compute/zones.rb +33 -0
- data/lib/fog/cloudstack/requests/compute/attach_volume.rb +57 -10
- data/lib/fog/cloudstack/requests/compute/create_volume.rb +43 -0
- data/lib/fog/cloudstack/requests/compute/delete_template.rb +20 -0
- data/lib/fog/cloudstack/requests/compute/delete_volume.rb +24 -4
- data/lib/fog/cloudstack/requests/compute/deploy_virtual_machine.rb +110 -14
- data/lib/fog/cloudstack/requests/compute/destroy_virtual_machine.rb +12 -3
- data/lib/fog/cloudstack/requests/compute/detach_volume.rb +47 -6
- data/lib/fog/cloudstack/requests/compute/list_async_jobs.rb +17 -5
- data/lib/fog/cloudstack/requests/compute/list_capabilities.rb +1 -1
- data/lib/fog/cloudstack/requests/compute/list_service_offerings.rb +27 -5
- data/lib/fog/cloudstack/requests/compute/list_templates.rb +20 -5
- data/lib/fog/cloudstack/requests/compute/list_virtual_machines.rb +11 -5
- data/lib/fog/cloudstack/requests/compute/list_volumes.rb +23 -5
- data/lib/fog/cloudstack/requests/compute/list_zones.rb +18 -4
- data/lib/fog/cloudstack/requests/compute/reboot_virtual_machine.rb +11 -0
- data/lib/fog/compute.rb +6 -4
- data/lib/fog/compute/models/server.rb +19 -4
- data/lib/fog/core/collection.rb +4 -5
- data/lib/fog/core/credentials.rb +5 -3
- data/lib/fog/core/current_machine.rb +1 -5
- data/lib/fog/core/errors.rb +6 -3
- data/lib/fog/core/json.rb +27 -1
- data/lib/fog/core/model.rb +1 -2
- data/lib/fog/core/scp.rb +11 -3
- data/lib/fog/core/service.rb +29 -8
- data/lib/fog/core/ssh.rb +18 -5
- data/lib/fog/dns.rb +0 -4
- data/lib/fog/dnsimple.rb +1 -1
- data/lib/fog/dnsimple/dns.rb +2 -4
- data/lib/fog/dnsimple/requests/dns/create_domain.rb +1 -1
- data/lib/fog/dnsimple/requests/dns/create_record.rb +1 -1
- data/lib/fog/dnsimple/requests/dns/update_record.rb +1 -1
- data/lib/fog/dnsmadeeasy.rb +1 -1
- data/lib/fog/dnsmadeeasy/dns.rb +4 -5
- data/lib/fog/dnsmadeeasy/requests/dns/create_record.rb +1 -1
- data/lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb +1 -1
- data/lib/fog/dnsmadeeasy/requests/dns/update_record.rb +1 -1
- data/lib/fog/dnsmadeeasy/requests/dns/update_secondary.rb +1 -1
- data/lib/fog/dynect.rb +1 -1
- data/lib/fog/dynect/dns.rb +3 -5
- data/lib/fog/dynect/requests/dns/delete_record.rb +1 -0
- data/lib/fog/dynect/requests/dns/get_node_list.rb +1 -0
- data/lib/fog/dynect/requests/dns/get_record.rb +1 -0
- data/lib/fog/dynect/requests/dns/get_zone.rb +1 -0
- data/lib/fog/dynect/requests/dns/post_record.rb +1 -1
- data/lib/fog/dynect/requests/dns/post_session.rb +2 -1
- data/lib/fog/dynect/requests/dns/post_zone.rb +1 -1
- data/lib/fog/dynect/requests/dns/put_zone.rb +1 -1
- data/lib/fog/ecloud/collection.rb +26 -0
- data/lib/fog/ecloud/compute.rb +341 -1135
- data/lib/fog/ecloud/generate_collection.rb +130 -0
- data/lib/fog/ecloud/ipaddr.rb +5 -0
- data/lib/fog/ecloud/mock_data_classes.rb +768 -0
- data/lib/fog/ecloud/model.rb +22 -0
- data/lib/fog/ecloud/models/compute/admin_organization.rb +39 -0
- data/lib/fog/ecloud/models/compute/admin_organizations.rb +27 -0
- data/lib/fog/ecloud/models/compute/api_key.rb +21 -0
- data/lib/fog/ecloud/models/compute/api_keys.rb +27 -0
- data/lib/fog/ecloud/models/compute/association.rb +23 -0
- data/lib/fog/ecloud/models/compute/associations.rb +35 -0
- data/lib/fog/ecloud/models/compute/authentication_level.rb +22 -0
- data/lib/fog/ecloud/models/compute/authentication_levels.rb +27 -0
- data/lib/fog/ecloud/models/compute/backup_internet_service.rb +22 -33
- data/lib/fog/ecloud/models/compute/backup_internet_services.rb +20 -11
- data/lib/fog/ecloud/models/compute/catalog.rb +17 -5
- data/lib/fog/ecloud/models/compute/catalog_configuration.rb +23 -0
- data/lib/fog/ecloud/models/compute/catalog_configurations.rb +27 -0
- data/lib/fog/ecloud/models/compute/catalog_item.rb +12 -17
- data/lib/fog/ecloud/models/compute/compute_pool.rb +59 -0
- data/lib/fog/ecloud/models/compute/compute_pools.rb +34 -0
- data/lib/fog/ecloud/models/compute/cpu_usage_detail.rb +17 -0
- data/lib/fog/ecloud/models/compute/cpu_usage_detail_summary.rb +27 -0
- data/lib/fog/ecloud/models/compute/environment.rb +105 -0
- data/lib/fog/ecloud/models/compute/environments.rb +40 -0
- data/lib/fog/ecloud/models/compute/firewall_acl.rb +14 -11
- data/lib/fog/ecloud/models/compute/firewall_acls.rb +7 -10
- data/lib/fog/ecloud/models/compute/group.rb +39 -0
- data/lib/fog/ecloud/models/compute/groups.rb +28 -0
- data/lib/fog/ecloud/models/compute/guest_process.rb +15 -0
- data/lib/fog/ecloud/models/compute/guest_processes.rb +27 -0
- data/lib/fog/ecloud/models/compute/hardware_configuration.rb +18 -0
- data/lib/fog/ecloud/models/compute/hardware_configurations.rb +27 -0
- data/lib/fog/ecloud/models/compute/internet_service.rb +47 -73
- data/lib/fog/ecloud/models/compute/internet_services.rb +23 -10
- data/lib/fog/ecloud/models/compute/ip_address.rb +25 -0
- data/lib/fog/ecloud/models/compute/ip_addresses.rb +27 -0
- data/lib/fog/ecloud/models/compute/layout.rb +20 -0
- data/lib/fog/ecloud/models/compute/layouts.rb +27 -0
- data/lib/fog/ecloud/models/compute/location.rb +23 -0
- data/lib/fog/ecloud/models/compute/locations.rb +31 -0
- data/lib/fog/ecloud/models/compute/login_banner.rb +16 -0
- data/lib/fog/ecloud/models/compute/login_banners.rb +27 -0
- data/lib/fog/ecloud/models/compute/memory_usage_detail.rb +16 -0
- data/lib/fog/ecloud/models/compute/memory_usage_detail_summary.rb +27 -0
- data/lib/fog/ecloud/models/compute/monitor.rb +46 -0
- data/lib/fog/ecloud/models/compute/monitors.rb +31 -0
- data/lib/fog/ecloud/models/compute/network.rb +16 -55
- data/lib/fog/ecloud/models/compute/networks.rb +5 -10
- data/lib/fog/ecloud/models/compute/node.rb +22 -26
- data/lib/fog/ecloud/models/compute/nodes.rb +19 -6
- data/lib/fog/ecloud/models/compute/operating_system.rb +17 -0
- data/lib/fog/ecloud/models/compute/operating_system_families.rb +27 -0
- data/lib/fog/ecloud/models/compute/operating_system_family.rb +21 -0
- data/lib/fog/ecloud/models/compute/operating_systems.rb +26 -0
- data/lib/fog/ecloud/models/compute/organization.rb +79 -0
- data/lib/fog/ecloud/models/compute/organizations.rb +39 -0
- data/lib/fog/ecloud/models/compute/password_complexity_rule.rb +49 -0
- data/lib/fog/ecloud/models/compute/password_complexity_rules.rb +27 -0
- data/lib/fog/ecloud/models/compute/physical_device.rb +22 -0
- data/lib/fog/ecloud/models/compute/physical_devices.rb +27 -0
- data/lib/fog/ecloud/models/compute/public_ip.rb +14 -10
- data/lib/fog/ecloud/models/compute/public_ips.rb +8 -11
- data/lib/fog/ecloud/models/compute/rnat.rb +27 -0
- data/lib/fog/ecloud/models/compute/rnats.rb +27 -0
- data/lib/fog/ecloud/models/compute/role.rb +24 -0
- data/lib/fog/ecloud/models/compute/roles.rb +37 -0
- data/lib/fog/ecloud/models/compute/row.rb +53 -0
- data/lib/fog/ecloud/models/compute/rows.rb +37 -0
- data/lib/fog/ecloud/models/compute/server.rb +170 -132
- data/lib/fog/ecloud/models/compute/server_configuration_option.rb +17 -0
- data/lib/fog/ecloud/models/compute/server_configuration_options.rb +27 -0
- data/lib/fog/ecloud/models/compute/servers.rb +38 -28
- data/lib/fog/ecloud/models/compute/ssh_key.rb +20 -0
- data/lib/fog/ecloud/models/compute/ssh_keys.rb +27 -0
- data/lib/fog/ecloud/models/compute/storage_usage_detail.rb +16 -0
- data/lib/fog/ecloud/models/compute/storage_usage_detail_summary.rb +27 -0
- data/lib/fog/ecloud/models/compute/support_ticket.rb +29 -0
- data/lib/fog/ecloud/models/compute/support_tickets.rb +27 -0
- data/lib/fog/ecloud/models/compute/tag.rb +13 -0
- data/lib/fog/ecloud/models/compute/tags.rb +27 -0
- data/lib/fog/ecloud/models/compute/task.rb +10 -11
- data/lib/fog/ecloud/models/compute/tasks.rb +8 -8
- data/lib/fog/ecloud/models/compute/template.rb +24 -0
- data/lib/fog/ecloud/models/compute/templates.rb +40 -0
- data/lib/fog/ecloud/models/compute/trusted_network_group.rb +33 -0
- data/lib/fog/ecloud/models/compute/trusted_network_groups.rb +28 -0
- data/lib/fog/ecloud/models/compute/user.rb +35 -0
- data/lib/fog/ecloud/models/compute/users.rb +27 -0
- data/lib/fog/ecloud/requests/compute/admin_disable_support_access.rb +9 -0
- data/lib/fog/ecloud/requests/compute/admin_edit_authentication_levels.rb +34 -0
- data/lib/fog/ecloud/requests/compute/admin_edit_login_banner.rb +32 -0
- data/lib/fog/ecloud/requests/compute/admin_edit_password_complexity_rules.rb +74 -0
- data/lib/fog/ecloud/requests/compute/admin_enable_support_access.rb +9 -0
- data/lib/fog/ecloud/requests/compute/backup_internet_service_create.rb +47 -0
- data/lib/fog/ecloud/requests/compute/backup_internet_service_delete.rb +11 -0
- data/lib/fog/ecloud/requests/compute/backup_internet_service_edit.rb +47 -0
- data/lib/fog/ecloud/requests/compute/compute_pool_edit.rb +37 -0
- data/lib/fog/ecloud/requests/compute/firewall_acls_create.rb +79 -0
- data/lib/fog/ecloud/requests/compute/firewall_acls_delete.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_admin_organization.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_admin_organizations.rb +11 -0
- data/lib/fog/ecloud/requests/compute/{get_task_list.rb → get_api_key.rb} +1 -1
- data/lib/fog/ecloud/requests/compute/{get_vapp_template.rb → get_api_keys.rb} +1 -1
- data/lib/fog/ecloud/requests/compute/get_association.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_associations.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_authentication_level.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_authentication_levels.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_backup_internet_service.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_backup_internet_services.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_catalog.rb +0 -33
- data/lib/fog/ecloud/requests/compute/get_catalog_configuration.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_catalog_configurations.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_catalog_item.rb +0 -36
- data/lib/fog/ecloud/requests/compute/get_compute_pool.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_compute_pools.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_cpu_usage_detail.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_cpu_usage_detail_summary.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_environment.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_environments.rb +0 -0
- data/lib/fog/ecloud/requests/compute/get_group.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_groups.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_guest_process.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_guest_processes.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_hardware_configuration.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_hardware_configurations.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_internet_service.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_internet_services.rb +0 -71
- data/lib/fog/ecloud/requests/compute/get_ip_address.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_ip_addresses.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_layout.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_layouts.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_location.rb +12 -0
- data/lib/fog/ecloud/requests/compute/get_locations.rb +12 -0
- data/lib/fog/ecloud/requests/compute/get_login_banner.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_login_banners.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_memory_usage_detail.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_memory_usage_detail_summary.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_monitor.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_monitors.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_network.rb +1 -34
- data/lib/fog/ecloud/requests/compute/get_network_summary.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_networks.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_node.rb +0 -29
- data/lib/fog/ecloud/requests/compute/get_nodes.rb +0 -30
- data/lib/fog/ecloud/requests/compute/get_operating_system.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_operating_system_families.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_operating_system_family.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_organization.rb +0 -38
- data/lib/fog/ecloud/requests/compute/get_organizations.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_password_complexity_rule.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_password_complexity_rules.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_physical_device.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_physical_devices.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_process.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_processes.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_public_ip.rb +0 -23
- data/lib/fog/ecloud/requests/compute/get_public_ips.rb +0 -27
- data/lib/fog/ecloud/requests/compute/get_rnat.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_rnats.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_role.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_roles.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_row.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_rows.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_server.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_server_configuration_option.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_server_configuration_options.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_servers.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_ssh_key.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_ssh_keys.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_storage_usage_detail.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_storage_usage_detail_summary.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_support_ticket.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_support_tickets.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_tag.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_tags.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_tasks.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_template.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_templates.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_trusted_network_group.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_trusted_network_groups.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_user.rb +11 -0
- data/lib/fog/ecloud/requests/compute/get_users.rb +11 -0
- data/lib/fog/ecloud/requests/compute/groups_create.rb +31 -0
- data/lib/fog/ecloud/requests/compute/groups_delete.rb +11 -0
- data/lib/fog/ecloud/requests/compute/groups_edit.rb +29 -0
- data/lib/fog/ecloud/requests/compute/groups_movedown.rb +11 -0
- data/lib/fog/ecloud/requests/compute/groups_moveup.rb +11 -0
- data/lib/fog/ecloud/requests/compute/internet_service_create.rb +67 -0
- data/lib/fog/ecloud/requests/compute/internet_service_delete.rb +11 -0
- data/lib/fog/ecloud/requests/compute/internet_service_edit.rb +60 -0
- data/lib/fog/ecloud/requests/compute/monitors_create_default.rb +11 -0
- data/lib/fog/ecloud/requests/compute/monitors_create_ecv.rb +40 -0
- data/lib/fog/ecloud/requests/compute/monitors_create_http.rb +44 -0
- data/lib/fog/ecloud/requests/compute/monitors_create_loopback.rb +11 -0
- data/lib/fog/ecloud/requests/compute/monitors_create_ping.rb +35 -0
- data/lib/fog/ecloud/requests/compute/monitors_disable.rb +11 -0
- data/lib/fog/ecloud/requests/compute/monitors_edit_ecv.rb +40 -0
- data/lib/fog/ecloud/requests/compute/monitors_edit_http.rb +44 -0
- data/lib/fog/ecloud/requests/compute/monitors_edit_ping.rb +35 -0
- data/lib/fog/ecloud/requests/compute/monitors_enable.rb +11 -0
- data/lib/fog/ecloud/requests/compute/node_service_create.rb +45 -0
- data/lib/fog/ecloud/requests/compute/node_service_delete.rb +11 -0
- data/lib/fog/ecloud/requests/compute/node_service_edit.rb +41 -0
- data/lib/fog/ecloud/requests/compute/power_off.rb +0 -12
- data/lib/fog/ecloud/requests/compute/power_on.rb +0 -12
- data/lib/fog/ecloud/requests/compute/power_shutdown.rb +1 -1
- data/lib/fog/ecloud/requests/compute/public_ip_activate.rb +11 -0
- data/lib/fog/ecloud/requests/compute/rnat_associations_create_device.rb +32 -0
- data/lib/fog/ecloud/requests/compute/rnat_associations_delete.rb +9 -0
- data/lib/fog/ecloud/requests/compute/rnat_associations_edit_network.rb +31 -0
- data/lib/fog/ecloud/requests/compute/rows_create.rb +29 -0
- data/lib/fog/ecloud/requests/compute/rows_delete.rb +11 -0
- data/lib/fog/ecloud/requests/compute/rows_edit.rb +29 -0
- data/lib/fog/ecloud/requests/compute/rows_movedown.rb +11 -0
- data/lib/fog/ecloud/requests/compute/rows_moveup.rb +11 -0
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_create.rb +53 -0
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_delete.rb +11 -0
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_edit.rb +53 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_copy.rb +118 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_copy_identical.rb +45 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_create_from_template.rb +125 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_delete.rb +11 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit.rb +47 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_hardware_configuration.rb +53 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_import.rb +67 -0
- data/lib/fog/glesys/compute.rb +2 -2
- data/lib/fog/glesys/models/compute/server.rb +5 -0
- data/lib/fog/glesys/models/compute/servers.rb +14 -8
- data/lib/fog/glesys/requests/compute/reboot.rb +14 -0
- data/lib/fog/go_grid.rb +1 -1
- data/lib/fog/go_grid/compute.rb +2 -3
- data/lib/fog/go_grid/models/compute/server.rb +2 -2
- data/lib/fog/google.rb +1 -1
- data/lib/fog/google/storage.rb +3 -3
- data/lib/fog/hp.rb +234 -0
- data/lib/fog/hp/README_HP.rdoc +60 -0
- data/lib/fog/hp/cdn.rb +131 -0
- data/lib/fog/hp/compute.rb +182 -0
- data/lib/fog/hp/models/compute/address.rb +71 -0
- data/lib/fog/hp/models/compute/addresses.rb +29 -0
- data/lib/fog/hp/models/compute/flavor.rb +24 -0
- data/lib/fog/hp/models/compute/flavors.rb +28 -0
- data/lib/fog/hp/models/compute/image.rb +37 -0
- data/lib/fog/hp/models/compute/images.rb +34 -0
- data/lib/fog/hp/models/compute/key_pair.rb +59 -0
- data/lib/fog/hp/models/compute/key_pairs.rb +31 -0
- data/lib/fog/hp/models/compute/security_group.rb +50 -0
- data/lib/fog/hp/models/compute/security_groups.rb +29 -0
- data/lib/fog/hp/models/compute/server.rb +225 -0
- data/lib/fog/{slicehost → hp}/models/compute/servers.rb +6 -8
- data/lib/fog/hp/models/storage/directories.rb +50 -0
- data/lib/fog/hp/models/storage/directory.rb +160 -0
- data/lib/fog/hp/models/storage/file.rb +87 -0
- data/lib/fog/hp/models/storage/files.rb +103 -0
- data/lib/fog/hp/requests/cdn/delete_container.rb +38 -0
- data/lib/fog/hp/requests/cdn/get_containers.rb +44 -0
- data/lib/fog/hp/requests/cdn/head_container.rb +50 -0
- data/lib/fog/hp/requests/cdn/post_container.rb +52 -0
- data/lib/fog/hp/requests/cdn/put_container.rb +53 -0
- data/lib/fog/hp/requests/compute/allocate_address.rb +49 -0
- data/lib/fog/hp/requests/compute/associate_address.rb +42 -0
- data/lib/fog/hp/requests/compute/change_password_server.rb +33 -0
- data/lib/fog/hp/requests/compute/confirm_resized_server.rb +34 -0
- data/lib/fog/hp/requests/compute/create_image.rb +63 -0
- data/lib/fog/hp/requests/compute/create_key_pair.rb +81 -0
- data/lib/fog/hp/requests/compute/create_security_group.rb +83 -0
- data/lib/fog/hp/requests/compute/create_security_group_rule.rb +75 -0
- data/lib/fog/hp/requests/compute/create_server.rb +140 -0
- data/lib/fog/hp/requests/compute/delete_image.rb +45 -0
- data/lib/fog/hp/requests/compute/delete_key_pair.rb +39 -0
- data/lib/fog/hp/requests/compute/delete_security_group.rb +41 -0
- data/lib/fog/hp/requests/compute/delete_security_group_rule.rb +49 -0
- data/lib/fog/hp/requests/compute/delete_server.rb +43 -0
- data/lib/fog/hp/requests/compute/disassociate_address.rb +39 -0
- data/lib/fog/hp/requests/compute/get_address.rb +45 -0
- data/lib/fog/hp/requests/compute/get_flavor_details.rb +51 -0
- data/lib/fog/hp/requests/compute/get_image_details.rb +43 -0
- data/lib/fog/hp/requests/compute/get_security_group.rb +57 -0
- data/lib/fog/hp/requests/compute/get_server_details.rb +52 -0
- data/lib/fog/hp/requests/compute/list_addresses.rb +41 -0
- data/lib/fog/hp/requests/compute/list_flavors.rb +44 -0
- data/lib/fog/hp/requests/compute/list_flavors_detail.rb +46 -0
- data/lib/fog/hp/requests/compute/list_images.rb +40 -0
- data/lib/fog/hp/requests/compute/list_images_detail.rb +49 -0
- data/lib/fog/hp/requests/compute/list_key_pairs.rb +44 -0
- data/lib/fog/hp/requests/compute/list_security_groups.rb +54 -0
- data/lib/fog/hp/requests/compute/list_server_addresses.rb +42 -0
- data/lib/fog/hp/requests/compute/list_server_private_addresses.rb +58 -0
- data/lib/fog/hp/requests/compute/list_server_public_addresses.rb +58 -0
- data/lib/fog/hp/requests/compute/list_servers.rb +41 -0
- data/lib/fog/hp/requests/compute/list_servers_detail.rb +56 -0
- data/lib/fog/hp/requests/compute/reboot_server.rb +34 -0
- data/lib/fog/hp/requests/compute/rebuild_server.rb +32 -0
- data/lib/fog/hp/requests/compute/release_address.rb +39 -0
- data/lib/fog/hp/requests/compute/resize_server.rb +39 -0
- data/lib/fog/hp/requests/compute/revert_resized_server.rb +35 -0
- data/lib/fog/hp/requests/compute/server_action.rb +25 -0
- data/lib/fog/hp/requests/compute/update_server.rb +42 -0
- data/lib/fog/hp/requests/storage/delete_container.rb +43 -0
- data/lib/fog/hp/requests/storage/delete_object.rb +44 -0
- data/lib/fog/hp/requests/storage/get_container.rb +92 -0
- data/lib/fog/hp/requests/storage/get_containers.rb +71 -0
- data/lib/fog/hp/requests/storage/get_object.rb +77 -0
- data/lib/fog/hp/requests/storage/head_container.rb +40 -0
- data/lib/fog/hp/requests/storage/head_containers.rb +37 -0
- data/lib/fog/hp/requests/storage/head_object.rb +35 -0
- data/lib/fog/hp/requests/storage/put_container.rb +48 -0
- data/lib/fog/hp/requests/storage/put_object.rb +94 -0
- data/lib/fog/hp/storage.rb +201 -0
- data/lib/fog/ibm.rb +2 -3
- data/lib/fog/ibm/compute.rb +1 -1
- data/lib/fog/ibm/models/compute/server.rb +2 -2
- data/lib/fog/ibm/storage.rb +1 -1
- data/lib/fog/identity.rb +24 -0
- data/lib/fog/image.rb +24 -0
- data/lib/fog/joyent/compute.rb +23 -8
- data/lib/fog/joyent/models/compute/keys.rb +2 -2
- data/lib/fog/joyent/models/compute/server.rb +1 -2
- data/lib/fog/joyent/requests/compute/list_datacenters.rb +17 -0
- data/lib/fog/libvirt.rb +1 -1
- data/lib/fog/libvirt/compute.rb +56 -28
- data/lib/fog/libvirt/models/compute/interface.rb +5 -25
- data/lib/fog/libvirt/models/compute/interfaces.rb +7 -45
- data/lib/fog/libvirt/models/compute/network.rb +3 -34
- data/lib/fog/libvirt/models/compute/networks.rb +6 -43
- data/lib/fog/libvirt/models/compute/nic.rb +54 -0
- data/lib/fog/libvirt/models/compute/nics.rb +16 -0
- data/lib/fog/libvirt/models/compute/node.rb +5 -16
- data/lib/fog/libvirt/models/compute/nodes.rb +9 -24
- data/lib/fog/libvirt/models/compute/pool.rb +26 -138
- data/lib/fog/libvirt/models/compute/pools.rb +6 -42
- data/lib/fog/libvirt/models/compute/server.rb +206 -308
- data/lib/fog/libvirt/models/compute/servers.rb +8 -63
- data/lib/fog/libvirt/models/compute/templates/server.xml.erb +17 -21
- data/lib/fog/libvirt/models/compute/templates/volume.xml.erb +2 -2
- data/lib/fog/libvirt/models/compute/{uri.rb → util/uri.rb} +1 -2
- data/lib/fog/libvirt/models/compute/util/util.rb +33 -0
- data/lib/fog/libvirt/models/compute/volume.rb +54 -122
- data/lib/fog/libvirt/models/compute/volumes.rb +2 -65
- data/lib/fog/libvirt/requests/compute/create_domain.rb +17 -0
- data/lib/fog/libvirt/requests/compute/create_volume.rb +17 -0
- data/lib/fog/libvirt/requests/compute/define_domain.rb +17 -0
- data/lib/fog/libvirt/requests/compute/define_pool.rb +17 -0
- data/lib/fog/libvirt/requests/compute/destroy_interface.rb +18 -0
- data/lib/fog/libvirt/requests/compute/destroy_network.rb +17 -0
- data/lib/fog/libvirt/requests/compute/get_node_info.rb +39 -0
- data/lib/fog/libvirt/requests/compute/list_domains.rb +106 -0
- data/lib/fog/libvirt/requests/compute/list_interfaces.rb +59 -0
- data/lib/fog/libvirt/requests/compute/list_networks.rb +58 -0
- data/lib/fog/libvirt/requests/compute/list_pool_volumes.rb +21 -0
- data/lib/fog/libvirt/requests/compute/list_pools.rb +72 -0
- data/lib/fog/libvirt/requests/compute/list_volumes.rb +89 -0
- data/lib/fog/libvirt/requests/compute/mock_files/domain.xml +40 -0
- data/lib/fog/libvirt/requests/compute/pool_action.rb +19 -0
- data/lib/fog/libvirt/requests/compute/update_display.rb +31 -0
- data/lib/fog/libvirt/requests/compute/vm_action.rb +19 -0
- data/lib/fog/libvirt/requests/compute/volume_action.rb +18 -0
- data/lib/fog/linode.rb +1 -1
- data/lib/fog/linode/compute.rb +2 -3
- data/lib/fog/linode/dns.rb +2 -3
- data/lib/fog/linode/requests/compute/avail_datacenters.rb +20 -0
- data/lib/fog/linode/requests/compute/avail_distributions.rb +38 -1
- data/lib/fog/linode/requests/compute/avail_kernels.rb +36 -1
- data/lib/fog/linode/requests/compute/avail_linodeplans.rb +37 -2
- data/lib/fog/linode/requests/compute/avail_stackscripts.rb +44 -0
- data/lib/fog/linode/requests/compute/linode_boot.rb +13 -0
- data/lib/fog/linode/requests/compute/linode_config_create.rb +13 -0
- data/lib/fog/linode/requests/compute/linode_config_list.rb +51 -0
- data/lib/fog/linode/requests/compute/linode_create.rb +15 -2
- data/lib/fog/linode/requests/compute/linode_delete.rb +13 -0
- data/lib/fog/linode/requests/compute/linode_disk_create.rb +14 -0
- data/lib/fog/linode/requests/compute/linode_disk_createfromdistribution.rb +14 -0
- data/lib/fog/linode/requests/compute/linode_disk_createfromstackscript.rb +1 -1
- data/lib/fog/linode/requests/compute/linode_disk_delete.rb +14 -0
- data/lib/fog/linode/requests/compute/linode_disk_list.rb +40 -1
- data/lib/fog/linode/requests/compute/linode_ip_list.rb +38 -0
- data/lib/fog/linode/requests/compute/linode_list.rb +53 -0
- data/lib/fog/linode/requests/compute/linode_reboot.rb +14 -1
- data/lib/fog/linode/requests/compute/linode_shutdown.rb +13 -0
- data/lib/fog/linode/requests/compute/linode_update.rb +13 -0
- data/lib/fog/local.rb +1 -1
- data/lib/fog/local/storage.rb +1 -1
- data/lib/fog/ninefold.rb +1 -1
- data/lib/fog/ninefold/compute.rb +4 -8
- data/lib/fog/ninefold/storage.rb +3 -3
- data/lib/fog/openstack.rb +90 -38
- data/lib/fog/openstack/compute.rb +223 -64
- data/lib/fog/openstack/identity.rb +226 -0
- data/lib/fog/openstack/image.rb +203 -0
- data/lib/fog/openstack/models/compute/address.rb +71 -0
- data/lib/fog/openstack/models/compute/addresses.rb +33 -0
- data/lib/fog/openstack/models/compute/flavor.rb +24 -4
- data/lib/fog/openstack/models/compute/host.rb +28 -0
- data/lib/fog/openstack/models/compute/hosts.rb +32 -0
- data/lib/fog/openstack/models/compute/key_pair.rb +60 -0
- data/lib/fog/openstack/models/compute/key_pairs.rb +31 -0
- data/lib/fog/openstack/models/compute/metadata.rb +5 -5
- data/lib/fog/openstack/models/compute/{meta.rb → metadatum.rb} +1 -1
- data/lib/fog/openstack/models/compute/network.rb +13 -0
- data/lib/fog/openstack/models/compute/networks.rb +29 -0
- data/lib/fog/openstack/models/compute/security_group.rb +44 -0
- data/lib/fog/openstack/models/compute/security_groups.rb +27 -0
- data/lib/fog/openstack/models/compute/server.rb +82 -5
- data/lib/fog/openstack/models/compute/snapshot.rb +43 -0
- data/lib/fog/openstack/models/compute/snapshots.rb +26 -0
- data/lib/fog/openstack/models/compute/tenant.rb +24 -0
- data/lib/fog/openstack/models/compute/tenants.rb +20 -0
- data/lib/fog/openstack/models/compute/volume.rb +58 -0
- data/lib/fog/openstack/models/compute/volumes.rb +26 -0
- data/lib/fog/openstack/models/identity/role.rb +50 -0
- data/lib/fog/openstack/models/identity/roles.rb +21 -0
- data/lib/fog/openstack/models/identity/tenant.rb +62 -0
- data/lib/fog/openstack/models/identity/tenants.rb +27 -0
- data/lib/fog/openstack/models/identity/user.rb +64 -0
- data/lib/fog/openstack/models/identity/users.rb +30 -0
- data/lib/fog/openstack/models/image/image.rb +85 -0
- data/lib/fog/openstack/models/image/images.rb +60 -0
- data/lib/fog/openstack/models/volume/volume.rb +46 -0
- data/lib/fog/openstack/models/volume/volumes.rb +27 -0
- data/lib/fog/openstack/requests/compute/add_fixed_ip.rb +29 -0
- data/lib/fog/openstack/requests/compute/allocate_address.rb +42 -0
- data/lib/fog/openstack/requests/compute/associate_address.rb +27 -0
- data/lib/fog/openstack/requests/compute/attach_volume.rb +28 -0
- data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +41 -0
- data/lib/fog/openstack/requests/compute/{change_password_server.rb → change_server_password.rb} +2 -2
- data/lib/fog/openstack/requests/compute/{confirm_resized_server.rb → confirm_resize_server.rb} +2 -2
- data/lib/fog/openstack/requests/compute/create_flavor.rb +82 -0
- data/lib/fog/openstack/requests/compute/create_image.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_key_pair.rb +49 -0
- data/lib/fog/openstack/requests/compute/create_security_group.rb +47 -0
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +56 -0
- data/lib/fog/openstack/requests/compute/create_server.rb +16 -14
- data/lib/fog/openstack/requests/compute/create_volume.rb +54 -0
- data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +32 -0
- data/lib/fog/openstack/requests/compute/delete_flavor.rb +28 -0
- data/lib/fog/openstack/requests/compute/delete_key_pair.rb +31 -0
- data/lib/fog/openstack/requests/compute/{delete_meta.rb → delete_metadata.rb} +2 -2
- data/lib/fog/openstack/requests/compute/delete_security_group.rb +31 -0
- data/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +31 -0
- data/lib/fog/openstack/requests/compute/delete_snapshot.rb +26 -0
- data/lib/fog/openstack/requests/compute/delete_volume.rb +26 -0
- data/lib/fog/openstack/requests/compute/detach_volume.rb +21 -0
- data/lib/fog/openstack/requests/compute/disassociate_address.rb +27 -0
- data/lib/fog/openstack/requests/compute/get_address.rb +41 -0
- data/lib/fog/openstack/requests/compute/get_console_output.rb +28 -0
- data/lib/fog/openstack/requests/compute/get_host_details.rb +74 -0
- data/lib/fog/openstack/requests/compute/{get_meta.rb → get_metadata.rb} +2 -2
- data/lib/fog/openstack/requests/compute/get_quota.rb +42 -0
- data/lib/fog/openstack/requests/compute/get_quota_defaults.rb +42 -0
- data/lib/fog/openstack/requests/compute/get_security_group.rb +49 -0
- data/lib/fog/openstack/requests/compute/get_server_volumes.rb +23 -0
- data/lib/fog/openstack/requests/compute/get_snapshot_details.rb +39 -0
- data/lib/fog/openstack/requests/compute/get_usage.rb +53 -0
- data/lib/fog/openstack/requests/compute/get_vnc_console.rb +40 -0
- data/lib/fog/openstack/requests/compute/get_volume_details.rb +42 -0
- data/lib/fog/openstack/requests/compute/list_address_pools.rb +23 -0
- data/lib/fog/openstack/requests/compute/list_all_addresses.rb +64 -0
- data/lib/fog/openstack/requests/compute/list_hosts.rb +32 -0
- data/lib/fog/openstack/requests/compute/list_key_pairs.rb +39 -0
- data/lib/fog/openstack/requests/compute/list_private_addresses.rb +1 -1
- data/lib/fog/openstack/requests/compute/list_public_addresses.rb +1 -1
- data/lib/fog/openstack/requests/compute/list_security_groups.rb +74 -0
- data/lib/fog/openstack/requests/compute/list_servers.rb +6 -2
- data/lib/fog/openstack/requests/compute/list_servers_detail.rb +6 -2
- data/lib/fog/openstack/requests/compute/list_snapshots.rb +32 -0
- data/lib/fog/openstack/requests/compute/list_tenants.rb +43 -0
- data/lib/fog/openstack/requests/compute/list_usages.rb +43 -0
- data/lib/fog/openstack/requests/compute/list_volumes.rb +53 -0
- data/lib/fog/openstack/requests/compute/live_migrate_server.rb +31 -0
- data/lib/fog/openstack/requests/compute/migrate_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/pause_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/release_address.rb +22 -0
- data/lib/fog/openstack/requests/compute/remove_fixed_ip.rb +29 -0
- data/lib/fog/openstack/requests/compute/rescue_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/resume_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/{revert_resized_server.rb → revert_resize_server.rb} +0 -0
- data/lib/fog/openstack/requests/compute/server_action.rb +2 -2
- data/lib/fog/openstack/requests/compute/server_actions.rb +27 -0
- data/lib/fog/openstack/requests/compute/server_diagnostics.rb +25 -0
- data/lib/fog/openstack/requests/compute/set_metadata.rb +1 -1
- data/lib/fog/openstack/requests/compute/set_tenant.rb +21 -0
- data/lib/fog/openstack/requests/compute/suspend_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/unpause_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/update_metadata.rb +1 -1
- data/lib/fog/openstack/requests/compute/update_quota.rb +45 -0
- data/lib/fog/openstack/requests/compute/update_server.rb +1 -1
- data/lib/fog/openstack/requests/identity/add_user_to_tenant.rb +29 -0
- data/lib/fog/openstack/requests/identity/check_token.rb +23 -0
- data/lib/fog/openstack/requests/identity/create_role.rb +37 -0
- data/lib/fog/openstack/requests/identity/create_tenant.rb +34 -0
- data/lib/fog/openstack/requests/identity/create_user.rb +47 -0
- data/lib/fog/openstack/requests/identity/create_user_role.rb +26 -0
- data/lib/fog/openstack/requests/identity/delete_role.rb +32 -0
- data/lib/fog/openstack/requests/identity/delete_tenant.rb +31 -0
- data/lib/fog/openstack/requests/identity/delete_user.rb +32 -0
- data/lib/fog/openstack/requests/identity/delete_user_role.rb +26 -0
- data/lib/fog/openstack/requests/identity/get_role.rb +28 -0
- data/lib/fog/openstack/requests/identity/get_tenant.rb +31 -0
- data/lib/fog/openstack/requests/identity/get_tenants_by_id.rb +23 -0
- data/lib/fog/openstack/requests/identity/get_tenants_by_name.rb +23 -0
- data/lib/fog/openstack/requests/identity/get_user_by_id.rb +34 -0
- data/lib/fog/openstack/requests/identity/get_user_by_name.rb +23 -0
- data/lib/fog/openstack/requests/identity/list_endpoints_for_token.rb +23 -0
- data/lib/fog/openstack/requests/identity/list_roles.rb +29 -0
- data/lib/fog/openstack/requests/identity/list_roles_for_user_on_tenant.rb +24 -0
- data/lib/fog/openstack/requests/identity/list_tenants.rb +44 -0
- data/lib/fog/openstack/requests/identity/list_user_global_roles.rb +22 -0
- data/lib/fog/openstack/requests/identity/list_users.rb +25 -0
- data/lib/fog/openstack/requests/identity/remove_user_from_tenant.rb +20 -0
- data/lib/fog/openstack/requests/identity/update_tenant.rb +30 -0
- data/lib/fog/openstack/requests/identity/update_user.rb +36 -0
- data/lib/fog/openstack/requests/identity/validate_token.rb +23 -0
- data/lib/fog/openstack/requests/image/add_member_to_image.rb +23 -0
- data/lib/fog/openstack/requests/image/create_image.rb +77 -0
- data/lib/fog/openstack/requests/image/delete_image.rb +27 -0
- data/lib/fog/openstack/requests/image/get_image.rb +45 -0
- data/lib/fog/openstack/requests/image/get_image_by_id.rb +32 -0
- data/lib/fog/openstack/requests/image/get_image_members.rb +29 -0
- data/lib/fog/openstack/requests/image/get_shared_images.rb +29 -0
- data/lib/fog/openstack/requests/image/list_public_images.rb +32 -0
- data/lib/fog/openstack/requests/image/list_public_images_detailed.rb +52 -0
- data/lib/fog/openstack/requests/image/remove_member_from_image.rb +23 -0
- data/lib/fog/openstack/requests/image/set_tenant.rb +21 -0
- data/lib/fog/openstack/requests/image/update_image.rb +65 -0
- data/lib/fog/openstack/requests/volume/create_volume.rb +54 -0
- data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +32 -0
- data/lib/fog/openstack/requests/volume/delete_snapshot.rb +26 -0
- data/lib/fog/openstack/requests/volume/delete_volume.rb +26 -0
- data/lib/fog/openstack/requests/volume/get_snapshot_details.rb +39 -0
- data/lib/fog/openstack/requests/volume/get_volume_details.rb +42 -0
- data/lib/fog/openstack/requests/volume/list_snapshots.rb +32 -0
- data/lib/fog/openstack/requests/volume/list_volumes.rb +55 -0
- data/lib/fog/openstack/requests/volume/set_tenant.rb +21 -0
- data/lib/fog/openstack/volume.rb +204 -0
- data/lib/fog/ovirt/compute.rb +15 -6
- data/lib/fog/ovirt/models/compute/server.rb +18 -0
- data/lib/fog/ovirt/models/compute/template.rb +8 -1
- data/lib/fog/ovirt/models/compute/volume.rb +35 -0
- data/lib/fog/ovirt/models/compute/volumes.rb +32 -0
- data/lib/fog/ovirt/requests/compute/add_volume.rb +23 -0
- data/lib/fog/ovirt/requests/compute/destroy_volume.rb +25 -0
- data/lib/fog/ovirt/requests/compute/list_template_volumes.rb +20 -0
- data/lib/fog/ovirt/requests/compute/list_vm_volumes.rb +20 -0
- data/lib/fog/ovirt/requests/compute/mock_files/vm.xml +0 -2
- data/lib/fog/ovirt/requests/compute/mock_files/volumes.xml +40 -0
- data/lib/fog/ovirt/requests/compute/storage_domains.rb +2 -2
- data/lib/fog/providers.rb +2 -1
- data/lib/fog/rackspace.rb +2 -2
- data/lib/fog/rackspace/cdn.rb +2 -3
- data/lib/fog/rackspace/compute.rb +111 -7
- data/lib/fog/rackspace/dns.rb +2 -3
- data/lib/fog/rackspace/load_balancers.rb +2 -3
- data/lib/fog/rackspace/models/compute/images.rb +3 -1
- data/lib/fog/rackspace/models/compute/server.rb +2 -2
- data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +8 -1
- data/lib/fog/rackspace/models/storage/file.rb +2 -1
- data/lib/fog/rackspace/models/storage/files.rb +1 -1
- data/lib/fog/rackspace/requests/compute/create_image.rb +1 -1
- data/lib/fog/rackspace/requests/compute/create_server.rb +1 -1
- data/lib/fog/rackspace/requests/compute/get_server_details.rb +1 -1
- data/lib/fog/rackspace/requests/compute/server_action.rb +1 -1
- data/lib/fog/rackspace/requests/compute/update_server.rb +1 -1
- data/lib/fog/rackspace/requests/dns/add_records.rb +1 -1
- data/lib/fog/rackspace/requests/dns/create_domains.rb +1 -1
- data/lib/fog/rackspace/requests/dns/modify_domain.rb +1 -1
- data/lib/fog/rackspace/requests/dns/modify_record.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/create_access_rule.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb +5 -2
- data/lib/fog/rackspace/requests/load_balancers/create_node.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/create_virtual_ip.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/set_connection_logging.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/set_connection_throttling.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/set_error_page.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/set_monitor.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/set_session_persistence.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/update_load_balancer.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/update_node.rb +1 -1
- data/lib/fog/rackspace/storage.rb +37 -11
- data/lib/fog/storage.rb +3 -0
- data/lib/fog/storm_on_demand.rb +1 -1
- data/lib/fog/storm_on_demand/compute.rb +2 -3
- data/lib/fog/storm_on_demand/requests/compute/add_balancer_node.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/clone_server.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/create_server.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/delete_server.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/get_server.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/get_stats.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/list_balancers.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/list_configs.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/list_images.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/list_private_ips.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/list_servers.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/list_templates.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/reboot_server.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/remove_balancer_node.rb +1 -1
- data/lib/fog/storm_on_demand/requests/compute/resize_server.rb +1 -1
- data/lib/fog/terremark.rb +1 -1
- data/lib/fog/terremark/shared.rb +1 -1
- data/lib/fog/vcloud.rb +1 -1
- data/lib/fog/vcloud/compute.rb +2 -2
- data/lib/fog/vcloud/requests/compute/configure_vm.rb +1 -139
- data/lib/fog/virtual_box.rb +1 -1
- data/lib/fog/virtual_box/compute.rb +1 -1
- data/lib/fog/virtual_box/models/compute/server.rb +2 -2
- data/lib/fog/vmfusion.rb +1 -1
- data/lib/fog/vmfusion/compute.rb +1 -1
- data/lib/fog/volume.rb +25 -0
- data/lib/fog/voxel.rb +1 -1
- data/lib/fog/voxel/compute.rb +1 -1
- data/lib/fog/vsphere/compute.rb +6 -3
- data/lib/fog/vsphere/models/compute/server.rb +31 -1
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +16 -5
- data/lib/fog/vsphere/requests/compute/vm_config_vnc.rb +47 -0
- data/lib/fog/xenserver.rb +56 -0
- data/lib/fog/xenserver/compute.rb +122 -0
- data/lib/fog/xenserver/models/compute/guest_metrics.rb +28 -0
- data/lib/fog/xenserver/models/compute/host.rb +46 -0
- data/lib/fog/xenserver/models/compute/hosts.rb +29 -0
- data/lib/fog/xenserver/models/compute/network.rb +58 -0
- data/lib/fog/xenserver/models/compute/networks.rb +33 -0
- data/lib/fog/xenserver/models/compute/pbd.rb +33 -0
- data/lib/fog/xenserver/models/compute/pbds.rb +33 -0
- data/lib/fog/xenserver/models/compute/pif.rb +46 -0
- data/lib/fog/xenserver/models/compute/pifs.rb +33 -0
- data/lib/fog/xenserver/models/compute/pool.rb +40 -0
- data/lib/fog/xenserver/models/compute/pools.rb +33 -0
- data/lib/fog/xenserver/models/compute/server.rb +211 -0
- data/lib/fog/xenserver/models/compute/servers.rb +63 -0
- data/lib/fog/xenserver/models/compute/storage_repositories.rb +31 -0
- data/lib/fog/xenserver/models/compute/storage_repository.rb +47 -0
- data/lib/fog/xenserver/models/compute/vbd.rb +90 -0
- data/lib/fog/xenserver/models/compute/vbd_metrics.rb +27 -0
- data/lib/fog/xenserver/models/compute/vbds.rb +33 -0
- data/lib/fog/xenserver/models/compute/vdi.rb +102 -0
- data/lib/fog/xenserver/models/compute/vdis.rb +29 -0
- data/lib/fog/xenserver/models/compute/vif.rb +51 -0
- data/lib/fog/xenserver/models/compute/vifs.rb +29 -0
- data/lib/fog/xenserver/parser.rb +36 -0
- data/lib/fog/xenserver/parsers/get_hosts.rb +19 -0
- data/lib/fog/xenserver/parsers/get_networks.rb +19 -0
- data/lib/fog/xenserver/parsers/get_pools.rb +19 -0
- data/lib/fog/xenserver/parsers/get_records.rb +19 -0
- data/lib/fog/xenserver/parsers/get_storage_repositories.rb +19 -0
- data/lib/fog/xenserver/parsers/get_vbds.rb +19 -0
- data/lib/fog/xenserver/parsers/get_vifs.rb +19 -0
- data/lib/fog/xenserver/parsers/get_vms.rb +20 -0
- data/lib/fog/xenserver/requests/compute/clone_server.rb +31 -0
- data/lib/fog/xenserver/requests/compute/create_server.rb +126 -0
- data/lib/fog/xenserver/requests/compute/create_vbd.rb +40 -0
- data/lib/fog/xenserver/requests/compute/create_vdi.rb +33 -0
- data/lib/fog/xenserver/requests/compute/create_vif.rb +57 -0
- data/lib/fog/xenserver/requests/compute/destroy_server.rb +22 -0
- data/lib/fog/xenserver/requests/compute/destroy_vdi.rb +22 -0
- data/lib/fog/xenserver/requests/compute/destroy_vif.rb +22 -0
- data/lib/fog/xenserver/requests/compute/eject_vbd.rb +22 -0
- data/lib/fog/xenserver/requests/compute/get_record.rb +29 -0
- data/lib/fog/xenserver/requests/compute/get_records.rb +30 -0
- data/lib/fog/xenserver/requests/compute/insert_vbd.rb +22 -0
- data/lib/fog/xenserver/requests/compute/provision_server.rb +21 -0
- data/lib/fog/xenserver/requests/compute/reboot_server.rb +23 -0
- data/lib/fog/xenserver/requests/compute/scan_sr.rb +22 -0
- data/lib/fog/xenserver/requests/compute/set_affinity.rb +25 -0
- data/lib/fog/xenserver/requests/compute/set_attribute.rb +25 -0
- data/lib/fog/xenserver/requests/compute/shutdown_server.rb +23 -0
- data/lib/fog/xenserver/requests/compute/start_server.rb +23 -0
- data/lib/fog/xenserver/requests/compute/start_vm.rb +25 -0
- data/lib/fog/xenserver/requests/compute/unplug_vbd.rb +30 -0
- data/lib/fog/xenserver/utilities.rb +8 -0
- data/lib/fog/zerigo.rb +1 -1
- data/lib/fog/zerigo/dns.rb +1 -1
- data/spec/core/current_machine_spec.rb +14 -4
- data/spec/spec_helper.rb +1 -1
- data/tests/aws/credentials_tests.rb +57 -0
- data/tests/aws/models/compute/address_tests.rb +7 -0
- data/tests/aws/models/compute/dhcp_option_tests.rb +4 -0
- data/tests/aws/models/compute/dhcp_options_tests.rb +4 -0
- data/tests/aws/models/compute/internet_gateway_tests.rb +3 -0
- data/tests/aws/models/compute/internet_gateways_tests.rb +4 -0
- data/tests/aws/models/compute/network_interfaces_test.rb +12 -0
- data/tests/aws/models/compute/security_group_tests.rb +14 -0
- data/tests/aws/models/compute/volume_tests.rb +5 -1
- data/tests/aws/models/elb/model_tests.rb +36 -2
- data/tests/aws/models/iam/access_keys_tests.rb +53 -0
- data/tests/aws/models/iam/policies_tests.rb +56 -0
- data/tests/aws/models/iam/users_tests.rb +54 -0
- data/tests/aws/models/storage/url_tests.rb +22 -0
- data/tests/aws/requests/compute/dhcp_options_tests.rb +40 -0
- data/tests/aws/requests/compute/internet_gateway_tests.rb +44 -0
- data/tests/aws/requests/compute/network_interface_tests.rb +175 -0
- data/tests/aws/requests/compute/security_group_tests.rb +5 -4
- data/tests/aws/requests/compute/volume_tests.rb +34 -5
- data/tests/aws/requests/dns/dns_tests.rb +1 -1
- data/tests/aws/requests/dynamodb/item_tests.rb +20 -0
- data/tests/aws/requests/elb/helper.rb +1 -0
- data/tests/aws/requests/elb/load_balancer_tests.rb +2 -2
- data/tests/aws/requests/iam/role_tests.rb +168 -0
- data/tests/aws/requests/iam/user_policy_tests.rb +10 -0
- data/tests/aws/requests/iam/user_tests.rb +4 -0
- data/tests/aws/requests/sns/subscription_tests.rb +2 -2
- data/tests/aws/requests/storage/object_tests.rb +5 -0
- data/tests/brightbox/requests/compute/helper.rb +23 -3
- data/tests/cloudstack/requests/virtual_machine_tests.rb +10 -10
- data/tests/compute/helper.rb +37 -8
- data/tests/compute/models/flavors_tests.rb +1 -1
- data/tests/compute/models/server_tests.rb +1 -1
- data/tests/compute/models/servers_tests.rb +2 -1
- data/tests/dns/helper.rb +0 -3
- data/tests/glesys/requests/compute/helper.rb +7 -2
- data/tests/helper.rb +9 -1
- data/tests/helpers/mock_helper.rb +11 -4
- data/tests/helpers/succeeds_helper.rb +2 -3
- data/tests/hp/models/compute/address_tests.rb +18 -0
- data/tests/hp/models/compute/addresses_tests.rb +5 -0
- data/tests/hp/models/compute/key_pair_tests.rb +27 -0
- data/tests/hp/models/compute/key_pairs_tests.rb +5 -0
- data/tests/hp/models/compute/security_group_tests.rb +36 -0
- data/tests/hp/models/compute/security_groups_tests.rb +5 -0
- data/tests/hp/requests/cdn/container_tests.rb +56 -0
- data/tests/hp/requests/compute/address_tests.rb +72 -0
- data/tests/hp/requests/compute/flavor_tests.rb +45 -0
- data/tests/hp/requests/compute/image_tests.rb +79 -0
- data/tests/hp/requests/compute/key_pair_tests.rb +65 -0
- data/tests/hp/requests/compute/security_group_rule_tests.rb +54 -0
- data/tests/hp/requests/compute/security_group_tests.rb +64 -0
- data/tests/hp/requests/compute/server_address_tests.rb +45 -0
- data/tests/hp/requests/compute/server_tests.rb +127 -0
- data/tests/hp/requests/storage/container_tests.rb +78 -0
- data/tests/hp/requests/storage/object_tests.rb +81 -0
- data/tests/libvirt/compute_tests.rb +17 -0
- data/tests/libvirt/models/compute/interface_tests.rb +27 -0
- data/tests/libvirt/models/compute/interfaces_tests.rb +14 -0
- data/tests/libvirt/models/compute/network_tests.rb +27 -0
- data/tests/libvirt/models/compute/networks_tests.rb +13 -0
- data/tests/libvirt/models/compute/nic_tests.rb +31 -0
- data/tests/libvirt/models/compute/nics_tests.rb +10 -0
- data/tests/libvirt/models/compute/pool_tests.rb +27 -0
- data/tests/libvirt/models/compute/pools_tests.rb +13 -0
- data/tests/libvirt/models/compute/server_tests.rb +58 -0
- data/tests/libvirt/models/compute/servers_tests.rb +14 -0
- data/tests/libvirt/models/compute/volume_tests.rb +30 -0
- data/tests/libvirt/models/compute/volumes_tests.rb +14 -0
- data/tests/libvirt/requests/compute/create_domain_tests.rb +21 -0
- data/tests/libvirt/requests/compute/define_domain_tests.rb +11 -0
- data/tests/libvirt/requests/compute/update_display.rb +13 -0
- data/tests/openstack/models/identity/role_tests.rb +27 -0
- data/tests/openstack/models/identity/roles_tests.rb +19 -0
- data/tests/openstack/models/identity/tenant_tests.rb +24 -0
- data/tests/openstack/models/identity/tenants_tests.rb +26 -0
- data/tests/openstack/models/identity/user_tests.rb +46 -0
- data/tests/openstack/models/identity/users_tests.rb +33 -0
- data/tests/openstack/models/image/image_tests.rb +35 -0
- data/tests/openstack/models/image/images_tests.rb +14 -0
- data/tests/openstack/requests/compute/address_tests.rb +49 -0
- data/tests/openstack/requests/compute/flavor_tests.rb +18 -5
- data/tests/openstack/requests/compute/keypair_tests.rb +30 -0
- data/tests/openstack/requests/compute/quota_tests.rb +44 -0
- data/tests/openstack/requests/compute/security_group_tests.rb +51 -0
- data/tests/openstack/requests/compute/tenant_tests.rb +19 -0
- data/tests/openstack/requests/compute/volume_tests.rb +39 -0
- data/tests/openstack/requests/identity/role_tests.rb +41 -0
- data/tests/openstack/requests/identity/tenant_tests.rb +53 -0
- data/tests/openstack/requests/identity/user_tests.rb +29 -0
- data/tests/openstack/requests/image/image_tests.rb +98 -0
- data/tests/ovirt/requests/compute/list_storage_domains_tests.rb +1 -1
- data/tests/rackspace/helper.rb +1 -1
- data/tests/rackspace/models/load_balancers/access_list_tests.rb +1 -1
- data/tests/rackspace/models/load_balancers/access_lists_tests.rb +1 -1
- data/tests/rackspace/models/load_balancers/load_balancer_tests.rb +13 -1
- data/tests/rackspace/models/load_balancers/load_balancers_tests.rb +1 -1
- data/tests/rackspace/models/load_balancers/node_tests.rb +1 -1
- data/tests/rackspace/models/load_balancers/nodes_tests.rb +1 -1
- data/tests/rackspace/requests/load_balancers/helper.rb +10 -2
- data/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +13 -4
- data/tests/rackspace/requests/load_balancers/node_tests.rb +5 -5
- data/tests/storage/helper.rb +3 -0
- data/tests/vsphere/requests/compute/vm_config_vnc_tests.rb +19 -0
- data/tests/xenserver/README +21 -0
- data/tests/xenserver/compute_tests.rb +52 -0
- data/tests/xenserver/helper.rb +36 -0
- data/tests/xenserver/models/compute/host_tests.rb +68 -0
- data/tests/xenserver/models/compute/hosts_tests.rb +22 -0
- data/tests/xenserver/models/compute/network_tests.rb +67 -0
- data/tests/xenserver/models/compute/networks_tests.rb +22 -0
- data/tests/xenserver/models/compute/pbd_tests.rb +44 -0
- data/tests/xenserver/models/compute/pbds_tests.rb +22 -0
- data/tests/xenserver/models/compute/pif_tests.rb +58 -0
- data/tests/xenserver/models/compute/pifs_tests.rb +22 -0
- data/tests/xenserver/models/compute/pool_tests.rb +50 -0
- data/tests/xenserver/models/compute/pools_tests.rb +30 -0
- data/tests/xenserver/models/compute/server_tests.rb +167 -0
- data/tests/xenserver/models/compute/servers_tests.rb +88 -0
- data/tests/xenserver/models/compute/storage_repositories_tests.rb +30 -0
- data/tests/xenserver/models/compute/storage_repository_tests.rb +63 -0
- data/tests/xenserver/models/compute/vbd_tests.rb +115 -0
- data/tests/xenserver/models/compute/vbds_tests.rb +22 -0
- data/tests/xenserver/models/compute/vif_tests.rb +53 -0
- data/tests/xenserver/models/compute/vifs_tests.rb +22 -0
- data/tests/xenserver/requests/compute/clone_server_tests.rb +32 -0
- data/tests/xenserver/requests/compute/create_server_tests.rb +129 -0
- data/tests/xenserver/requests/compute/create_vdi_tests.rb +80 -0
- data/tests/xenserver/requests/compute/create_vif_tests.rb +88 -0
- data/tests/xenserver/requests/compute/destroy_vdi_tests.rb +25 -0
- data/tests/xenserver/requests/compute/get_record_tests.rb +15 -0
- data/tests/xenserver/requests/compute/set_attribute_tests.rb +66 -0
- data/tests/xenserver/xenserver_tests.rb +34 -0
- metadata +938 -232
- data/lib/fog/bin/slicehost.rb +0 -36
- data/lib/fog/brightbox/requests/compute/resize_server.rb +0 -19
- data/lib/fog/ecloud/models/compute/ip.rb +0 -49
- data/lib/fog/ecloud/models/compute/ips.rb +0 -32
- data/lib/fog/ecloud/models/compute/vdc.rb +0 -81
- data/lib/fog/ecloud/models/compute/vdcs.rb +0 -40
- data/lib/fog/ecloud/requests/compute/add_backup_internet_service.rb +0 -109
- data/lib/fog/ecloud/requests/compute/add_internet_service.rb +0 -149
- data/lib/fog/ecloud/requests/compute/add_node.rb +0 -62
- data/lib/fog/ecloud/requests/compute/clone_vapp.rb +0 -40
- data/lib/fog/ecloud/requests/compute/configure_internet_service.rb +0 -112
- data/lib/fog/ecloud/requests/compute/configure_network.rb +0 -44
- data/lib/fog/ecloud/requests/compute/configure_network_ip.rb +0 -66
- data/lib/fog/ecloud/requests/compute/configure_node.rb +0 -56
- data/lib/fog/ecloud/requests/compute/configure_vapp.rb +0 -144
- data/lib/fog/ecloud/requests/compute/delete_internet_service.rb +0 -22
- data/lib/fog/ecloud/requests/compute/delete_node.rb +0 -22
- data/lib/fog/ecloud/requests/compute/delete_vapp.rb +0 -29
- data/lib/fog/ecloud/requests/compute/get_customization_options.rb +0 -22
- data/lib/fog/ecloud/requests/compute/get_network_extensions.rb +0 -33
- data/lib/fog/ecloud/requests/compute/get_network_ip.rb +0 -43
- data/lib/fog/ecloud/requests/compute/get_network_ips.rb +0 -35
- data/lib/fog/ecloud/requests/compute/get_vapp.rb +0 -99
- data/lib/fog/ecloud/requests/compute/get_vdc.rb +0 -84
- data/lib/fog/ecloud/requests/compute/get_versions.rb +0 -37
- data/lib/fog/ecloud/requests/compute/instantiate_vapp_template.rb +0 -142
- data/lib/fog/ecloud/requests/compute/login.rb +0 -48
- data/lib/fog/libvirt/models/compute/util.rb +0 -24
- data/lib/fog/openstack/requests/compute/update_meta.rb +0 -45
- data/lib/fog/slicehost.rb +0 -12
- data/lib/fog/slicehost/compute.rb +0 -104
- data/lib/fog/slicehost/dns.rb +0 -101
- data/lib/fog/slicehost/models/compute/flavor.rb +0 -45
- data/lib/fog/slicehost/models/compute/flavors.rb +0 -28
- data/lib/fog/slicehost/models/compute/image.rb +0 -17
- data/lib/fog/slicehost/models/compute/images.rb +0 -27
- data/lib/fog/slicehost/models/compute/server.rb +0 -113
- data/lib/fog/slicehost/models/dns/record.rb +0 -73
- data/lib/fog/slicehost/models/dns/records.rb +0 -36
- data/lib/fog/slicehost/models/dns/zone.rb +0 -69
- data/lib/fog/slicehost/models/dns/zones.rb +0 -28
- data/lib/fog/slicehost/parsers/compute/create_slice.rb +0 -31
- data/lib/fog/slicehost/parsers/compute/get_backups.rb +0 -32
- data/lib/fog/slicehost/parsers/compute/get_flavor.rb +0 -26
- data/lib/fog/slicehost/parsers/compute/get_flavors.rb +0 -30
- data/lib/fog/slicehost/parsers/compute/get_image.rb +0 -26
- data/lib/fog/slicehost/parsers/compute/get_images.rb +0 -30
- data/lib/fog/slicehost/parsers/compute/get_slice.rb +0 -31
- data/lib/fog/slicehost/parsers/compute/get_slices.rb +0 -35
- data/lib/fog/slicehost/parsers/dns/create_record.rb +0 -32
- data/lib/fog/slicehost/parsers/dns/create_zone.rb +0 -26
- data/lib/fog/slicehost/parsers/dns/get_record.rb +0 -38
- data/lib/fog/slicehost/parsers/dns/get_records.rb +0 -38
- data/lib/fog/slicehost/parsers/dns/get_zone.rb +0 -26
- data/lib/fog/slicehost/parsers/dns/get_zones.rb +0 -30
- data/lib/fog/slicehost/requests/compute/create_slice.rb +0 -41
- data/lib/fog/slicehost/requests/compute/delete_slice.rb +0 -23
- data/lib/fog/slicehost/requests/compute/get_backups.rb +0 -29
- data/lib/fog/slicehost/requests/compute/get_flavor.rb +0 -32
- data/lib/fog/slicehost/requests/compute/get_flavors.rb +0 -29
- data/lib/fog/slicehost/requests/compute/get_image.rb +0 -30
- data/lib/fog/slicehost/requests/compute/get_images.rb +0 -27
- data/lib/fog/slicehost/requests/compute/get_slice.rb +0 -38
- data/lib/fog/slicehost/requests/compute/get_slices.rb +0 -35
- data/lib/fog/slicehost/requests/compute/reboot_slice.rb +0 -36
- data/lib/fog/slicehost/requests/dns/create_record.rb +0 -52
- data/lib/fog/slicehost/requests/dns/create_zone.rb +0 -46
- data/lib/fog/slicehost/requests/dns/delete_record.rb +0 -23
- data/lib/fog/slicehost/requests/dns/delete_zone.rb +0 -23
- data/lib/fog/slicehost/requests/dns/get_record.rb +0 -32
- data/lib/fog/slicehost/requests/dns/get_records.rb +0 -32
- data/lib/fog/slicehost/requests/dns/get_zone.rb +0 -32
- data/lib/fog/slicehost/requests/dns/get_zones.rb +0 -30
- data/lib/fog/slicehost/requests/dns/update_record.rb +0 -43
- data/spec/ecloud/bin_spec.rb +0 -28
- data/spec/ecloud/models/backup_internet_service_spec.rb +0 -48
- data/spec/ecloud/models/backup_internet_services_spec.rb +0 -28
- data/spec/ecloud/models/internet_service_spec.rb +0 -104
- data/spec/ecloud/models/internet_services_spec.rb +0 -29
- data/spec/ecloud/models/ip_spec.rb +0 -33
- data/spec/ecloud/models/ips_spec.rb +0 -28
- data/spec/ecloud/models/network_spec.rb +0 -71
- data/spec/ecloud/models/networks_spec.rb +0 -27
- data/spec/ecloud/models/node_spec.rb +0 -38
- data/spec/ecloud/models/nodes_spec.rb +0 -28
- data/spec/ecloud/models/public_ip_spec.rb +0 -36
- data/spec/ecloud/models/public_ips_spec.rb +0 -27
- data/spec/ecloud/models/server_spec.rb +0 -62
- data/spec/ecloud/models/vdc_spec.rb +0 -63
- data/spec/ecloud/models/vdcs_spec.rb +0 -28
- data/spec/ecloud/requests/add_backup_internet_service_spec.rb +0 -60
- data/spec/ecloud/requests/add_internet_service_spec.rb +0 -65
- data/spec/ecloud/requests/add_node_spec.rb +0 -56
- data/spec/ecloud/requests/configure_internet_service_spec.rb +0 -61
- data/spec/ecloud/requests/configure_network_ip_spec.rb +0 -55
- data/spec/ecloud/requests/configure_node_spec.rb +0 -52
- data/spec/ecloud/requests/configure_vapp_spec.rb +0 -71
- data/spec/ecloud/requests/delete_internet_service_spec.rb +0 -34
- data/spec/ecloud/requests/delete_node_spec.rb +0 -30
- data/spec/ecloud/requests/delete_vapp_spec.rb +0 -92
- data/spec/ecloud/requests/get_catalog_item_spec.rb +0 -62
- data/spec/ecloud/requests/get_catalog_spec.rb +0 -44
- data/spec/ecloud/requests/get_customization_options_spec.rb +0 -39
- data/spec/ecloud/requests/get_internet_services_spec.rb +0 -150
- data/spec/ecloud/requests/get_network_ip_spec.rb +0 -40
- data/spec/ecloud/requests/get_network_ips_spec.rb +0 -58
- data/spec/ecloud/requests/get_network_spec.rb +0 -49
- data/spec/ecloud/requests/get_node_spec.rb +0 -41
- data/spec/ecloud/requests/get_nodes_spec.rb +0 -58
- data/spec/ecloud/requests/get_organization_spec.rb +0 -52
- data/spec/ecloud/requests/get_public_ip_spec.rb +0 -38
- data/spec/ecloud/requests/get_public_ips_spec.rb +0 -52
- data/spec/ecloud/requests/get_vapp_spec.rb +0 -125
- data/spec/ecloud/requests/get_vdc_spec.rb +0 -112
- data/spec/ecloud/requests/get_versions_spec.rb +0 -57
- data/spec/ecloud/requests/instantiate_vapp_template_spec.rb +0 -95
- data/spec/ecloud/requests/login_spec.rb +0 -10
- data/spec/ecloud/requests/power_off_spec.rb +0 -34
- data/spec/ecloud/requests/power_on_spec.rb +0 -34
- data/spec/ecloud/spec_helper.rb +0 -387
- data/spec/ecloud/vcloud_spec.rb +0 -18
- data/tests/slicehost/requests/compute/backup_tests.rb +0 -18
- data/tests/slicehost/requests/compute/flavor_tests.rb +0 -33
- data/tests/slicehost/requests/compute/image_tests.rb +0 -31
- data/tests/slicehost/requests/compute/slice_tests.rb +0 -75
- data/tests/slicehost/requests/dns/dns_tests.rb +0 -314
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
|
3
|
+
* Author: Drew Diller
|
4
|
+
* Email: drew.diller@gmail.com
|
5
|
+
* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
|
6
|
+
* Version: 0.0.8a
|
7
|
+
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
|
8
|
+
*
|
9
|
+
* Example usage:
|
10
|
+
* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
|
11
|
+
* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
|
12
|
+
**/
|
13
|
+
var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();
|
@@ -0,0 +1,892 @@
|
|
1
|
+
/*!
|
2
|
+
* Modernizr v1.6
|
3
|
+
* http://www.modernizr.com
|
4
|
+
*
|
5
|
+
* Developed by:
|
6
|
+
* - Faruk Ates http://farukat.es/
|
7
|
+
* - Paul Irish http://paulirish.com/
|
8
|
+
*
|
9
|
+
* Copyright (c) 2009-2010
|
10
|
+
* Dual-licensed under the BSD or MIT licenses.
|
11
|
+
* http://www.modernizr.com/license/
|
12
|
+
*/
|
13
|
+
|
14
|
+
|
15
|
+
/*
|
16
|
+
* Modernizr is a script that detects native CSS3 and HTML5 features
|
17
|
+
* available in the current UA and provides an object containing all
|
18
|
+
* features with a true/false value, depending on whether the UA has
|
19
|
+
* native support for it or not.
|
20
|
+
*
|
21
|
+
* Modernizr will also add classes to the <html> element of the page,
|
22
|
+
* one for each feature it detects. If the UA supports it, a class
|
23
|
+
* like "cssgradients" will be added. If not, the class name will be
|
24
|
+
* "no-cssgradients". This allows for simple if-conditionals in your
|
25
|
+
* CSS, giving you fine control over the look & feel of your website.
|
26
|
+
*
|
27
|
+
* @author Faruk Ates
|
28
|
+
* @author Paul Irish
|
29
|
+
* @copyright (c) 2009-2010 Faruk Ates.
|
30
|
+
* @contributor Ben Alman
|
31
|
+
*/
|
32
|
+
|
33
|
+
window.Modernizr = (function(window,doc,undefined){
|
34
|
+
|
35
|
+
var version = '1.6',
|
36
|
+
|
37
|
+
ret = {},
|
38
|
+
|
39
|
+
/**
|
40
|
+
* !! DEPRECATED !!
|
41
|
+
*
|
42
|
+
* enableHTML5 is a private property for advanced use only. If enabled,
|
43
|
+
* it will make Modernizr.init() run through a brief while() loop in
|
44
|
+
* which it will create all HTML5 elements in the DOM to allow for
|
45
|
+
* styling them in Internet Explorer, which does not recognize any
|
46
|
+
* non-HTML4 elements unless created in the DOM this way.
|
47
|
+
*
|
48
|
+
* enableHTML5 is ON by default.
|
49
|
+
*
|
50
|
+
* The enableHTML5 toggle option is DEPRECATED as per 1.6, and will be
|
51
|
+
* replaced in 2.0 in lieu of the modular, configurable nature of 2.0.
|
52
|
+
*/
|
53
|
+
enableHTML5 = true,
|
54
|
+
|
55
|
+
|
56
|
+
docElement = doc.documentElement,
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Create our "modernizr" element that we do most feature tests on.
|
60
|
+
*/
|
61
|
+
mod = 'modernizr',
|
62
|
+
m = doc.createElement( mod ),
|
63
|
+
m_style = m.style,
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Create the input element for various Web Forms feature tests.
|
67
|
+
*/
|
68
|
+
f = doc.createElement( 'input' ),
|
69
|
+
|
70
|
+
smile = ':)',
|
71
|
+
|
72
|
+
tostring = Object.prototype.toString,
|
73
|
+
|
74
|
+
// List of property values to set for css tests. See ticket #21
|
75
|
+
prefixes = ' -webkit- -moz- -o- -ms- -khtml- '.split(' '),
|
76
|
+
|
77
|
+
// Following spec is to expose vendor-specific style properties as:
|
78
|
+
// elem.style.WebkitBorderRadius
|
79
|
+
// and the following would be incorrect:
|
80
|
+
// elem.style.webkitBorderRadius
|
81
|
+
|
82
|
+
// Webkit ghosts their properties in lowercase but Opera & Moz do not.
|
83
|
+
// Microsoft foregoes prefixes entirely <= IE8, but appears to
|
84
|
+
// use a lowercase `ms` instead of the correct `Ms` in IE9
|
85
|
+
|
86
|
+
// More here: http://github.com/Modernizr/Modernizr/issues/issue/21
|
87
|
+
domPrefixes = 'Webkit Moz O ms Khtml'.split(' '),
|
88
|
+
|
89
|
+
ns = {'svg': 'http://www.w3.org/2000/svg'},
|
90
|
+
|
91
|
+
tests = {},
|
92
|
+
inputs = {},
|
93
|
+
attrs = {},
|
94
|
+
|
95
|
+
classes = [],
|
96
|
+
|
97
|
+
featurename, // used in testing loop
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
// todo: consider using http://javascript.nwbox.com/CSSSupport/css-support.js instead
|
102
|
+
testMediaQuery = function(mq){
|
103
|
+
|
104
|
+
var st = document.createElement('style'),
|
105
|
+
div = doc.createElement('div'),
|
106
|
+
ret;
|
107
|
+
|
108
|
+
st.textContent = mq + '{#modernizr{height:3px}}';
|
109
|
+
(doc.head || doc.getElementsByTagName('head')[0]).appendChild(st);
|
110
|
+
div.id = 'modernizr';
|
111
|
+
docElement.appendChild(div);
|
112
|
+
|
113
|
+
ret = div.offsetHeight === 3;
|
114
|
+
|
115
|
+
st.parentNode.removeChild(st);
|
116
|
+
div.parentNode.removeChild(div);
|
117
|
+
|
118
|
+
return !!ret;
|
119
|
+
|
120
|
+
},
|
121
|
+
|
122
|
+
|
123
|
+
/**
|
124
|
+
* isEventSupported determines if a given element supports the given event
|
125
|
+
* function from http://yura.thinkweb2.com/isEventSupported/
|
126
|
+
*/
|
127
|
+
isEventSupported = (function(){
|
128
|
+
|
129
|
+
var TAGNAMES = {
|
130
|
+
'select':'input','change':'input',
|
131
|
+
'submit':'form','reset':'form',
|
132
|
+
'error':'img','load':'img','abort':'img'
|
133
|
+
};
|
134
|
+
|
135
|
+
function isEventSupported(eventName, element) {
|
136
|
+
|
137
|
+
element = element || document.createElement(TAGNAMES[eventName] || 'div');
|
138
|
+
eventName = 'on' + eventName;
|
139
|
+
|
140
|
+
// When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those
|
141
|
+
var isSupported = (eventName in element);
|
142
|
+
|
143
|
+
if (!isSupported) {
|
144
|
+
// If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element
|
145
|
+
if (!element.setAttribute) {
|
146
|
+
element = document.createElement('div');
|
147
|
+
}
|
148
|
+
if (element.setAttribute && element.removeAttribute) {
|
149
|
+
element.setAttribute(eventName, '');
|
150
|
+
isSupported = typeof element[eventName] == 'function';
|
151
|
+
|
152
|
+
// If property was created, "remove it" (by setting value to `undefined`)
|
153
|
+
if (typeof element[eventName] != 'undefined') {
|
154
|
+
element[eventName] = undefined;
|
155
|
+
}
|
156
|
+
element.removeAttribute(eventName);
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
element = null;
|
161
|
+
return isSupported;
|
162
|
+
}
|
163
|
+
return isEventSupported;
|
164
|
+
})();
|
165
|
+
|
166
|
+
|
167
|
+
// hasOwnProperty shim by kangax needed for Safari 2.0 support
|
168
|
+
var _hasOwnProperty = ({}).hasOwnProperty, hasOwnProperty;
|
169
|
+
if (typeof _hasOwnProperty !== 'undefined' && typeof _hasOwnProperty.call !== 'undefined') {
|
170
|
+
hasOwnProperty = function (object, property) {
|
171
|
+
return _hasOwnProperty.call(object, property);
|
172
|
+
};
|
173
|
+
}
|
174
|
+
else {
|
175
|
+
hasOwnProperty = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
|
176
|
+
return ((property in object) && typeof object.constructor.prototype[property] === 'undefined');
|
177
|
+
};
|
178
|
+
}
|
179
|
+
|
180
|
+
/**
|
181
|
+
* set_css applies given styles to the Modernizr DOM node.
|
182
|
+
*/
|
183
|
+
function set_css( str ) {
|
184
|
+
m_style.cssText = str;
|
185
|
+
}
|
186
|
+
|
187
|
+
/**
|
188
|
+
* set_css_all extrapolates all vendor-specific css strings.
|
189
|
+
*/
|
190
|
+
function set_css_all( str1, str2 ) {
|
191
|
+
return set_css(prefixes.join(str1 + ';') + ( str2 || '' ));
|
192
|
+
}
|
193
|
+
|
194
|
+
/**
|
195
|
+
* contains returns a boolean for if substr is found within str.
|
196
|
+
*/
|
197
|
+
function contains( str, substr ) {
|
198
|
+
return (''+str).indexOf( substr ) !== -1;
|
199
|
+
}
|
200
|
+
|
201
|
+
/**
|
202
|
+
* test_props is a generic CSS / DOM property test; if a browser supports
|
203
|
+
* a certain property, it won't return undefined for it.
|
204
|
+
* A supported CSS property returns empty string when its not yet set.
|
205
|
+
*/
|
206
|
+
function test_props( props, callback ) {
|
207
|
+
for ( var i in props ) {
|
208
|
+
if ( m_style[ props[i] ] !== undefined && ( !callback || callback( props[i], m ) ) ) {
|
209
|
+
return true;
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
/**
|
215
|
+
* test_props_all tests a list of DOM properties we want to check against.
|
216
|
+
* We specify literally ALL possible (known and/or likely) properties on
|
217
|
+
* the element including the non-vendor prefixed one, for forward-
|
218
|
+
* compatibility.
|
219
|
+
*/
|
220
|
+
function test_props_all( prop, callback ) {
|
221
|
+
|
222
|
+
var uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1),
|
223
|
+
props = (prop + ' ' + domPrefixes.join(uc_prop + ' ') + uc_prop).split(' ');
|
224
|
+
|
225
|
+
return !!test_props( props, callback );
|
226
|
+
}
|
227
|
+
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Tests
|
231
|
+
*/
|
232
|
+
|
233
|
+
tests['flexbox'] = function() {
|
234
|
+
/**
|
235
|
+
* set_prefixed_value_css sets the property of a specified element
|
236
|
+
* adding vendor prefixes to the VALUE of the property.
|
237
|
+
* @param {Element} element
|
238
|
+
* @param {string} property The property name. This will not be prefixed.
|
239
|
+
* @param {string} value The value of the property. This WILL be prefixed.
|
240
|
+
* @param {string=} extra Additional CSS to append unmodified to the end of
|
241
|
+
* the CSS string.
|
242
|
+
*/
|
243
|
+
function set_prefixed_value_css(element, property, value, extra) {
|
244
|
+
property += ':';
|
245
|
+
element.style.cssText = (property + prefixes.join(value + ';' + property)).slice(0, -property.length) + (extra || '');
|
246
|
+
}
|
247
|
+
|
248
|
+
/**
|
249
|
+
* set_prefixed_property_css sets the property of a specified element
|
250
|
+
* adding vendor prefixes to the NAME of the property.
|
251
|
+
* @param {Element} element
|
252
|
+
* @param {string} property The property name. This WILL be prefixed.
|
253
|
+
* @param {string} value The value of the property. This will not be prefixed.
|
254
|
+
* @param {string=} extra Additional CSS to append unmodified to the end of
|
255
|
+
* the CSS string.
|
256
|
+
*/
|
257
|
+
function set_prefixed_property_css(element, property, value, extra) {
|
258
|
+
element.style.cssText = prefixes.join(property + ':' + value + ';') + (extra || '');
|
259
|
+
}
|
260
|
+
|
261
|
+
var c = doc.createElement('div'),
|
262
|
+
elem = doc.createElement('div');
|
263
|
+
|
264
|
+
set_prefixed_value_css(c, 'display', 'box', 'width:42px;padding:0;');
|
265
|
+
set_prefixed_property_css(elem, 'box-flex', '1', 'width:10px;');
|
266
|
+
|
267
|
+
c.appendChild(elem);
|
268
|
+
docElement.appendChild(c);
|
269
|
+
|
270
|
+
var ret = elem.offsetWidth === 42;
|
271
|
+
|
272
|
+
c.removeChild(elem);
|
273
|
+
docElement.removeChild(c);
|
274
|
+
|
275
|
+
return ret;
|
276
|
+
};
|
277
|
+
|
278
|
+
// On the S60 and BB Storm, getContext exists, but always returns undefined
|
279
|
+
// http://github.com/Modernizr/Modernizr/issues/issue/97/
|
280
|
+
|
281
|
+
tests['canvas'] = function() {
|
282
|
+
var elem = doc.createElement( 'canvas' );
|
283
|
+
return !!(elem.getContext && elem.getContext('2d'));
|
284
|
+
};
|
285
|
+
|
286
|
+
tests['canvastext'] = function() {
|
287
|
+
return !!(ret['canvas'] && typeof doc.createElement( 'canvas' ).getContext('2d').fillText == 'function');
|
288
|
+
};
|
289
|
+
|
290
|
+
|
291
|
+
tests['webgl'] = function(){
|
292
|
+
|
293
|
+
var elem = doc.createElement( 'canvas' );
|
294
|
+
|
295
|
+
try {
|
296
|
+
if (elem.getContext('webgl')){ return true; }
|
297
|
+
} catch(e){ }
|
298
|
+
|
299
|
+
try {
|
300
|
+
if (elem.getContext('experimental-webgl')){ return true; }
|
301
|
+
} catch(e){ }
|
302
|
+
|
303
|
+
return false;
|
304
|
+
};
|
305
|
+
|
306
|
+
/*
|
307
|
+
* The Modernizr.touch test only indicates if the browser supports
|
308
|
+
* touch events, which does not necessarily reflect a touchscreen
|
309
|
+
* device, as evidenced by tablets running Windows 7 or, alas,
|
310
|
+
* the Palm Pre / WebOS (touch) phones.
|
311
|
+
*
|
312
|
+
* Additionally, Chrome (desktop) used to lie about its support on this,
|
313
|
+
* but that has since been rectified: http://crbug.com/36415
|
314
|
+
*
|
315
|
+
* We also test for Firefox 4 Multitouch Support.
|
316
|
+
*
|
317
|
+
* For more info, see: http://modernizr.github.com/Modernizr/touch.html
|
318
|
+
*/
|
319
|
+
|
320
|
+
tests['touch'] = function() {
|
321
|
+
|
322
|
+
return ('ontouchstart' in window) || testMediaQuery('@media ('+prefixes.join('touch-enabled),(')+'modernizr)');
|
323
|
+
|
324
|
+
};
|
325
|
+
|
326
|
+
|
327
|
+
/**
|
328
|
+
* geolocation tests for the new Geolocation API specification.
|
329
|
+
* This test is a standards compliant-only test; for more complete
|
330
|
+
* testing, including a Google Gears fallback, please see:
|
331
|
+
* http://code.google.com/p/geo-location-javascript/
|
332
|
+
* or view a fallback solution using google's geo API:
|
333
|
+
* http://gist.github.com/366184
|
334
|
+
*/
|
335
|
+
tests['geolocation'] = function() {
|
336
|
+
return !!navigator.geolocation;
|
337
|
+
};
|
338
|
+
|
339
|
+
// Per 1.6:
|
340
|
+
// This used to be Modernizr.crosswindowmessaging but the longer
|
341
|
+
// name has been deprecated in favor of a shorter and property-matching one.
|
342
|
+
// The old API is still available in 1.6, but as of 2.0 will throw a warning,
|
343
|
+
// and in the first release thereafter disappear entirely.
|
344
|
+
tests['postmessage'] = function() {
|
345
|
+
return !!window.postMessage;
|
346
|
+
};
|
347
|
+
|
348
|
+
// Web SQL database detection is tricky:
|
349
|
+
|
350
|
+
// In chrome incognito mode, openDatabase is truthy, but using it will
|
351
|
+
// throw an exception: http://crbug.com/42380
|
352
|
+
// We can create a dummy database, but there is no way to delete it afterwards.
|
353
|
+
|
354
|
+
// Meanwhile, Safari users can get prompted on any database creation.
|
355
|
+
// If they do, any page with Modernizr will give them a prompt:
|
356
|
+
// http://github.com/Modernizr/Modernizr/issues/closed#issue/113
|
357
|
+
|
358
|
+
// We have chosen to allow the Chrome incognito false positive, so that Modernizr
|
359
|
+
// doesn't litter the web with these test databases. As a developer, you'll have
|
360
|
+
// to account for this gotcha yourself.
|
361
|
+
tests['websqldatabase'] = function() {
|
362
|
+
var result = !!window.openDatabase;
|
363
|
+
/*
|
364
|
+
if (result){
|
365
|
+
try {
|
366
|
+
result = !!openDatabase( mod + "testdb", "1.0", mod + "testdb", 2e4);
|
367
|
+
} catch(e) {
|
368
|
+
}
|
369
|
+
}
|
370
|
+
*/
|
371
|
+
return result;
|
372
|
+
};
|
373
|
+
|
374
|
+
// Vendors have inconsistent prefixing with the experimental Indexed DB:
|
375
|
+
// - Firefox is shipping indexedDB in FF4 as moz_indexedDB
|
376
|
+
// - Webkit's implementation is accessible through webkitIndexedDB
|
377
|
+
// We test both styles.
|
378
|
+
tests['indexedDB'] = function(){
|
379
|
+
for (var i = -1, len = domPrefixes.length; ++i < len; ){
|
380
|
+
var prefix = domPrefixes[i].toLowerCase();
|
381
|
+
if (window[prefix + '_indexedDB'] || window[prefix + 'IndexedDB']){
|
382
|
+
return true;
|
383
|
+
}
|
384
|
+
}
|
385
|
+
return false;
|
386
|
+
};
|
387
|
+
|
388
|
+
// documentMode logic from YUI to filter out IE8 Compat Mode
|
389
|
+
// which false positives.
|
390
|
+
tests['hashchange'] = function() {
|
391
|
+
return isEventSupported('hashchange', window) && ( document.documentMode === undefined || document.documentMode > 7 );
|
392
|
+
};
|
393
|
+
|
394
|
+
// Per 1.6:
|
395
|
+
// This used to be Modernizr.historymanagement but the longer
|
396
|
+
// name has been deprecated in favor of a shorter and property-matching one.
|
397
|
+
// The old API is still available in 1.6, but as of 2.0 will throw a warning,
|
398
|
+
// and in the first release thereafter disappear entirely.
|
399
|
+
tests['history'] = function() {
|
400
|
+
return !!(window.history && history.pushState);
|
401
|
+
};
|
402
|
+
|
403
|
+
tests['draganddrop'] = function() {
|
404
|
+
return isEventSupported('drag') &&
|
405
|
+
isEventSupported('dragstart') &&
|
406
|
+
isEventSupported('dragenter') &&
|
407
|
+
isEventSupported('dragover') &&
|
408
|
+
isEventSupported('dragleave') &&
|
409
|
+
isEventSupported('dragend') &&
|
410
|
+
isEventSupported('drop');
|
411
|
+
};
|
412
|
+
|
413
|
+
tests['websockets'] = function(){
|
414
|
+
return ('WebSocket' in window);
|
415
|
+
};
|
416
|
+
|
417
|
+
|
418
|
+
// http://css-tricks.com/rgba-browser-support/
|
419
|
+
tests['rgba'] = function() {
|
420
|
+
// Set an rgba() color and check the returned value
|
421
|
+
|
422
|
+
set_css( 'background-color:rgba(150,255,150,.5)' );
|
423
|
+
|
424
|
+
return contains( m_style.backgroundColor, 'rgba' );
|
425
|
+
};
|
426
|
+
|
427
|
+
tests['hsla'] = function() {
|
428
|
+
// Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,
|
429
|
+
// except IE9 who retains it as hsla
|
430
|
+
|
431
|
+
set_css('background-color:hsla(120,40%,100%,.5)' );
|
432
|
+
|
433
|
+
return contains( m_style.backgroundColor, 'rgba' ) || contains( m_style.backgroundColor, 'hsla' );
|
434
|
+
};
|
435
|
+
|
436
|
+
tests['multiplebgs'] = function() {
|
437
|
+
// Setting multiple images AND a color on the background shorthand property
|
438
|
+
// and then querying the style.background property value for the number of
|
439
|
+
// occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
|
440
|
+
|
441
|
+
set_css( 'background:url(//:),url(//:),red url(//:)' );
|
442
|
+
|
443
|
+
// If the UA supports multiple backgrounds, there should be three occurrences
|
444
|
+
// of the string "url(" in the return value for elem_style.background
|
445
|
+
|
446
|
+
return new RegExp("(url\\s*\\(.*?){3}").test(m_style.background);
|
447
|
+
};
|
448
|
+
|
449
|
+
|
450
|
+
// In testing support for a given CSS property, it's legit to test:
|
451
|
+
// elem.style[styleName] !== undefined
|
452
|
+
// If the property is supported it will return an empty string,
|
453
|
+
// if unsupported it will return undefined.
|
454
|
+
// We'll take advantage of this quick test and skip setting a style
|
455
|
+
// on our modernizr element, but instead just testing undefined vs
|
456
|
+
// empty string.
|
457
|
+
// The legacy set_css_all calls will remain in the source
|
458
|
+
// (however, commented) for clarity, yet functionally they are
|
459
|
+
// no longer needed.
|
460
|
+
|
461
|
+
|
462
|
+
tests['backgroundsize'] = function() {
|
463
|
+
return test_props_all( 'backgroundSize' );
|
464
|
+
};
|
465
|
+
|
466
|
+
tests['borderimage'] = function() {
|
467
|
+
// set_css_all( 'border-image:url(m.png) 1 1 stretch' );
|
468
|
+
return test_props_all( 'borderImage' );
|
469
|
+
};
|
470
|
+
|
471
|
+
|
472
|
+
// Super comprehensive table about all the unique implementations of
|
473
|
+
// border-radius: http://muddledramblings.com/table-of-css3-border-radius-compliance
|
474
|
+
|
475
|
+
tests['borderradius'] = function() {
|
476
|
+
// set_css_all( 'border-radius:10px' );
|
477
|
+
return test_props_all( 'borderRadius', '', function( prop ) {
|
478
|
+
return contains( prop, 'orderRadius' );
|
479
|
+
});
|
480
|
+
};
|
481
|
+
|
482
|
+
|
483
|
+
tests['boxshadow'] = function() {
|
484
|
+
// set_css_all( 'box-shadow:#000 1px 1px 3px' );
|
485
|
+
return test_props_all( 'boxShadow' );
|
486
|
+
};
|
487
|
+
|
488
|
+
// Note: FF3.0 will false positive on this test
|
489
|
+
tests['textshadow'] = function(){
|
490
|
+
return doc.createElement('div').style.textShadow === '';
|
491
|
+
};
|
492
|
+
|
493
|
+
|
494
|
+
tests['opacity'] = function() {
|
495
|
+
// Browsers that actually have CSS Opacity implemented have done so
|
496
|
+
// according to spec, which means their return values are within the
|
497
|
+
// range of [0.0,1.0] - including the leading zero.
|
498
|
+
|
499
|
+
set_css_all( 'opacity:.5' );
|
500
|
+
|
501
|
+
return contains( m_style.opacity, '0.5' );
|
502
|
+
};
|
503
|
+
|
504
|
+
|
505
|
+
tests['cssanimations'] = function() {
|
506
|
+
// set_css_all( 'animation:"animate" 2s ease 2', 'position:relative' );
|
507
|
+
return test_props_all( 'animationName' );
|
508
|
+
};
|
509
|
+
|
510
|
+
|
511
|
+
tests['csscolumns'] = function() {
|
512
|
+
// set_css_all( 'column-count:3' );
|
513
|
+
return test_props_all( 'columnCount' );
|
514
|
+
};
|
515
|
+
|
516
|
+
|
517
|
+
tests['cssgradients'] = function() {
|
518
|
+
/**
|
519
|
+
* For CSS Gradients syntax, please see:
|
520
|
+
* http://webkit.org/blog/175/introducing-css-gradients/
|
521
|
+
* https://developer.mozilla.org/en/CSS/-moz-linear-gradient
|
522
|
+
* https://developer.mozilla.org/en/CSS/-moz-radial-gradient
|
523
|
+
* http://dev.w3.org/csswg/css3-images/#gradients-
|
524
|
+
*/
|
525
|
+
|
526
|
+
var str1 = 'background-image:',
|
527
|
+
str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
|
528
|
+
str3 = 'linear-gradient(left top,#9f9, white);';
|
529
|
+
|
530
|
+
set_css(
|
531
|
+
(str1 + prefixes.join(str2 + str1) + prefixes.join(str3 + str1)).slice(0,-str1.length)
|
532
|
+
);
|
533
|
+
|
534
|
+
return contains( m_style.backgroundImage, 'gradient' );
|
535
|
+
};
|
536
|
+
|
537
|
+
|
538
|
+
tests['cssreflections'] = function() {
|
539
|
+
// set_css_all( 'box-reflect:right 1px' );
|
540
|
+
return test_props_all( 'boxReflect' );
|
541
|
+
};
|
542
|
+
|
543
|
+
|
544
|
+
tests['csstransforms'] = function() {
|
545
|
+
// set_css_all( 'transform:rotate(3deg)' );
|
546
|
+
return !!test_props([ 'transformProperty', 'WebkitTransform', 'MozTransform', 'OTransform', 'msTransform' ]);
|
547
|
+
};
|
548
|
+
|
549
|
+
|
550
|
+
tests['csstransforms3d'] = function() {
|
551
|
+
// set_css_all( 'perspective:500' );
|
552
|
+
|
553
|
+
var ret = !!test_props([ 'perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective' ]);
|
554
|
+
|
555
|
+
// Webkit’s 3D transforms are passed off to the browser's own graphics renderer.
|
556
|
+
// It works fine in Safari on Leopard and Snow Leopard, but not in Chrome (yet?).
|
557
|
+
// As a result, Webkit typically recognizes the syntax but will sometimes throw a false
|
558
|
+
// positive, thus we must do a more thorough check:
|
559
|
+
if (ret){
|
560
|
+
|
561
|
+
// Webkit allows this media query to succeed only if the feature is enabled.
|
562
|
+
// "@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){ ... }"
|
563
|
+
ret = testMediaQuery('@media ('+prefixes.join('transform-3d),(')+'modernizr)');
|
564
|
+
}
|
565
|
+
return ret;
|
566
|
+
};
|
567
|
+
|
568
|
+
|
569
|
+
tests['csstransitions'] = function() {
|
570
|
+
// set_css_all( 'transition:all .5s linear' );
|
571
|
+
return test_props_all( 'transitionProperty' );
|
572
|
+
};
|
573
|
+
|
574
|
+
|
575
|
+
// @font-face detection routine by Diego Perini
|
576
|
+
// http://javascript.nwbox.com/CSSSupport/
|
577
|
+
tests['fontface'] = function(){
|
578
|
+
|
579
|
+
var
|
580
|
+
sheet,
|
581
|
+
head = doc.head || doc.getElementsByTagName('head')[0] || docElement,
|
582
|
+
style = doc.createElement("style"),
|
583
|
+
impl = doc.implementation || { hasFeature: function() { return false; } };
|
584
|
+
|
585
|
+
style.type = 'text/css';
|
586
|
+
head.insertBefore(style, head.firstChild);
|
587
|
+
sheet = style.sheet || style.styleSheet;
|
588
|
+
|
589
|
+
// removing it crashes IE browsers
|
590
|
+
//head.removeChild(style);
|
591
|
+
|
592
|
+
var supportAtRule = impl.hasFeature('CSS2', '') ?
|
593
|
+
function(rule) {
|
594
|
+
if (!(sheet && rule)) return false;
|
595
|
+
var result = false;
|
596
|
+
try {
|
597
|
+
sheet.insertRule(rule, 0);
|
598
|
+
result = !(/unknown/i).test(sheet.cssRules[0].cssText);
|
599
|
+
sheet.deleteRule(sheet.cssRules.length - 1);
|
600
|
+
} catch(e) { }
|
601
|
+
return result;
|
602
|
+
} :
|
603
|
+
function(rule) {
|
604
|
+
if (!(sheet && rule)) return false;
|
605
|
+
sheet.cssText = rule;
|
606
|
+
|
607
|
+
return sheet.cssText.length !== 0 && !(/unknown/i).test(sheet.cssText) &&
|
608
|
+
sheet.cssText
|
609
|
+
.replace(/\r+|\n+/g, '')
|
610
|
+
.indexOf(rule.split(' ')[0]) === 0;
|
611
|
+
};
|
612
|
+
|
613
|
+
|
614
|
+
// DEPRECATED - allow for a callback
|
615
|
+
ret._fontfaceready = function(fn){
|
616
|
+
fn(ret.fontface);
|
617
|
+
};
|
618
|
+
|
619
|
+
return supportAtRule('@font-face { font-family: "font"; src: "font.ttf"; }');
|
620
|
+
|
621
|
+
};
|
622
|
+
|
623
|
+
|
624
|
+
// These tests evaluate support of the video/audio elements, as well as
|
625
|
+
// testing what types of content they support.
|
626
|
+
//
|
627
|
+
// We're using the Boolean constructor here, so that we can extend the value
|
628
|
+
// e.g. Modernizr.video // true
|
629
|
+
// Modernizr.video.ogg // 'probably'
|
630
|
+
//
|
631
|
+
// Codec values from : http://github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
|
632
|
+
// thx to NielsLeenheer and zcorpan
|
633
|
+
|
634
|
+
// Note: in FF 3.5.1 and 3.5.0, "no" was a return value instead of empty string.
|
635
|
+
// Modernizr does not normalize for that.
|
636
|
+
|
637
|
+
tests['video'] = function() {
|
638
|
+
var elem = doc.createElement('video'),
|
639
|
+
bool = !!elem.canPlayType;
|
640
|
+
|
641
|
+
if (bool){
|
642
|
+
bool = new Boolean(bool);
|
643
|
+
bool.ogg = elem.canPlayType('video/ogg; codecs="theora"');
|
644
|
+
|
645
|
+
// Workaround required for IE9, which doesn't report video support without audio codec specified.
|
646
|
+
// bug 599718 @ msft connect
|
647
|
+
var h264 = 'video/mp4; codecs="avc1.42E01E';
|
648
|
+
bool.h264 = elem.canPlayType(h264 + '"') || elem.canPlayType(h264 + ', mp4a.40.2"');
|
649
|
+
|
650
|
+
bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"');
|
651
|
+
}
|
652
|
+
return bool;
|
653
|
+
};
|
654
|
+
|
655
|
+
tests['audio'] = function() {
|
656
|
+
var elem = doc.createElement('audio'),
|
657
|
+
bool = !!elem.canPlayType;
|
658
|
+
|
659
|
+
if (bool){
|
660
|
+
bool = new Boolean(bool);
|
661
|
+
bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"');
|
662
|
+
bool.mp3 = elem.canPlayType('audio/mpeg;');
|
663
|
+
|
664
|
+
// Mimetypes accepted:
|
665
|
+
// https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
|
666
|
+
// http://bit.ly/iphoneoscodecs
|
667
|
+
bool.wav = elem.canPlayType('audio/wav; codecs="1"');
|
668
|
+
bool.m4a = elem.canPlayType('audio/x-m4a;') || elem.canPlayType('audio/aac;');
|
669
|
+
}
|
670
|
+
return bool;
|
671
|
+
};
|
672
|
+
|
673
|
+
|
674
|
+
// Both localStorage and sessionStorage are
|
675
|
+
// tested via the `in` operator because otherwise Firefox will
|
676
|
+
// throw an error: https://bugzilla.mozilla.org/show_bug.cgi?id=365772
|
677
|
+
// if cookies are disabled
|
678
|
+
|
679
|
+
// They require try/catch because of possible firefox configuration:
|
680
|
+
// http://github.com/Modernizr/Modernizr/issues#issue/92
|
681
|
+
|
682
|
+
// FWIW miller device resolves to [object Storage] in all supporting browsers
|
683
|
+
// except for IE who does [object Object]
|
684
|
+
|
685
|
+
// IE8 Compat mode supports these features completely:
|
686
|
+
// http://www.quirksmode.org/dom/html5.html
|
687
|
+
|
688
|
+
tests['localstorage'] = function() {
|
689
|
+
try {
|
690
|
+
return ('localStorage' in window) && window.localStorage !== null;
|
691
|
+
} catch(e) {
|
692
|
+
return false;
|
693
|
+
}
|
694
|
+
};
|
695
|
+
|
696
|
+
tests['sessionstorage'] = function() {
|
697
|
+
try {
|
698
|
+
return ('sessionStorage' in window) && window.sessionStorage !== null;
|
699
|
+
} catch(e){
|
700
|
+
return false;
|
701
|
+
}
|
702
|
+
};
|
703
|
+
|
704
|
+
|
705
|
+
tests['webWorkers'] = function () {
|
706
|
+
return !!window.Worker;
|
707
|
+
};
|
708
|
+
|
709
|
+
|
710
|
+
tests['applicationcache'] = function() {
|
711
|
+
return !!window.applicationCache;
|
712
|
+
};
|
713
|
+
|
714
|
+
|
715
|
+
// Thanks to Erik Dahlstrom
|
716
|
+
tests['svg'] = function(){
|
717
|
+
return !!doc.createElementNS && !!doc.createElementNS(ns.svg, "svg").createSVGRect;
|
718
|
+
};
|
719
|
+
|
720
|
+
tests['inlinesvg'] = function() {
|
721
|
+
var div = document.createElement('div');
|
722
|
+
div.innerHTML = '<svg/>';
|
723
|
+
return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
|
724
|
+
};
|
725
|
+
|
726
|
+
// Thanks to F1lt3r and lucideer
|
727
|
+
// http://github.com/Modernizr/Modernizr/issues#issue/35
|
728
|
+
tests['smil'] = function(){
|
729
|
+
return !!doc.createElementNS && /SVG/.test(tostring.call(doc.createElementNS(ns.svg,'animate')));
|
730
|
+
};
|
731
|
+
|
732
|
+
tests['svgclippaths'] = function(){
|
733
|
+
// Possibly returns a false positive in Safari 3.2?
|
734
|
+
return !!doc.createElementNS && /SVG/.test(tostring.call(doc.createElementNS(ns.svg,'clipPath')));
|
735
|
+
};
|
736
|
+
|
737
|
+
|
738
|
+
// input features and input types go directly onto the ret object, bypassing the tests loop.
|
739
|
+
// Hold this guy to execute in a moment.
|
740
|
+
function webforms(){
|
741
|
+
|
742
|
+
// Run through HTML5's new input attributes to see if the UA understands any.
|
743
|
+
// We're using f which is the <input> element created early on
|
744
|
+
// Mike Taylr has created a comprehensive resource for testing these attributes
|
745
|
+
// when applied to all input types:
|
746
|
+
// http://miketaylr.com/code/input-type-attr.html
|
747
|
+
// spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
|
748
|
+
ret['input'] = (function(props) {
|
749
|
+
for (var i = 0,len=props.length;i<len;i++) {
|
750
|
+
attrs[ props[i] ] = !!(props[i] in f);
|
751
|
+
}
|
752
|
+
return attrs;
|
753
|
+
})('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
|
754
|
+
|
755
|
+
// Run through HTML5's new input types to see if the UA understands any.
|
756
|
+
// This is put behind the tests runloop because it doesn't return a
|
757
|
+
// true/false like all the other tests; instead, it returns an object
|
758
|
+
// containing each input type with its corresponding true/false value
|
759
|
+
|
760
|
+
// Big thanks to @miketaylr for the html5 forms expertise. http://miketaylr.com/
|
761
|
+
ret['inputtypes'] = (function(props) {
|
762
|
+
for (var i = 0, bool, len=props.length ; i < len ; i++) {
|
763
|
+
|
764
|
+
f.setAttribute('type', props[i]);
|
765
|
+
bool = f.type !== 'text';
|
766
|
+
|
767
|
+
// Chrome likes to falsely purport support, so we feed it a textual value;
|
768
|
+
// if that doesnt succeed then we know there's a custom UI
|
769
|
+
if (bool){
|
770
|
+
|
771
|
+
f.value = smile;
|
772
|
+
|
773
|
+
if (/^range$/.test(f.type) && f.style.WebkitAppearance !== undefined){
|
774
|
+
|
775
|
+
docElement.appendChild(f);
|
776
|
+
var defaultView = doc.defaultView;
|
777
|
+
|
778
|
+
// Safari 2-4 allows the smiley as a value, despite making a slider
|
779
|
+
bool = defaultView.getComputedStyle &&
|
780
|
+
defaultView.getComputedStyle(f, null).WebkitAppearance !== 'textfield' &&
|
781
|
+
|
782
|
+
// Mobile android web browser has false positive, so must
|
783
|
+
// check the height to see if the widget is actually there.
|
784
|
+
(f.offsetHeight !== 0);
|
785
|
+
|
786
|
+
docElement.removeChild(f);
|
787
|
+
|
788
|
+
} else if (/^(search|tel)$/.test(f.type)){
|
789
|
+
// Spec doesnt define any special parsing or detectable UI
|
790
|
+
// behaviors so we pass these through as true
|
791
|
+
|
792
|
+
// Interestingly, opera fails the earlier test, so it doesn't
|
793
|
+
// even make it here.
|
794
|
+
|
795
|
+
} else if (/^(url|email)$/.test(f.type)) {
|
796
|
+
|
797
|
+
// Real url and email support comes with prebaked validation.
|
798
|
+
bool = f.checkValidity && f.checkValidity() === false;
|
799
|
+
|
800
|
+
} else {
|
801
|
+
// If the upgraded input compontent rejects the :) text, we got a winner
|
802
|
+
bool = f.value != smile;
|
803
|
+
}
|
804
|
+
}
|
805
|
+
|
806
|
+
inputs[ props[i] ] = !!bool;
|
807
|
+
}
|
808
|
+
return inputs;
|
809
|
+
})('search tel url email datetime date month week time datetime-local number range color'.split(' '));
|
810
|
+
|
811
|
+
}
|
812
|
+
|
813
|
+
|
814
|
+
|
815
|
+
// End of test definitions
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
// Run through all tests and detect their support in the current UA.
|
820
|
+
// todo: hypothetically we could be doing an array of tests and use a basic loop here.
|
821
|
+
for ( var feature in tests ) {
|
822
|
+
if ( hasOwnProperty( tests, feature ) ) {
|
823
|
+
// run the test, throw the return value into the Modernizr,
|
824
|
+
// then based on that boolean, define an appropriate className
|
825
|
+
// and push it into an array of classes we'll join later.
|
826
|
+
featurename = feature.toLowerCase();
|
827
|
+
ret[ featurename ] = tests[ feature ]();
|
828
|
+
|
829
|
+
classes.push( ( ret[ featurename ] ? '' : 'no-' ) + featurename );
|
830
|
+
}
|
831
|
+
}
|
832
|
+
|
833
|
+
// input tests need to run.
|
834
|
+
if (!ret.input) webforms();
|
835
|
+
|
836
|
+
|
837
|
+
|
838
|
+
// Per 1.6: deprecated API is still accesible for now:
|
839
|
+
ret.crosswindowmessaging = ret.postmessage;
|
840
|
+
ret.historymanagement = ret.history;
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
/**
|
845
|
+
* Addtest allows the user to define their own feature tests
|
846
|
+
* the result will be added onto the Modernizr object,
|
847
|
+
* as well as an appropriate className set on the html element
|
848
|
+
*
|
849
|
+
* @param feature - String naming the feature
|
850
|
+
* @param test - Function returning true if feature is supported, false if not
|
851
|
+
*/
|
852
|
+
ret.addTest = function (feature, test) {
|
853
|
+
feature = feature.toLowerCase();
|
854
|
+
|
855
|
+
if (ret[ feature ]) {
|
856
|
+
return; // quit if you're trying to overwrite an existing test
|
857
|
+
}
|
858
|
+
test = !!(test());
|
859
|
+
docElement.className += ' ' + (test ? '' : 'no-') + feature;
|
860
|
+
ret[ feature ] = test;
|
861
|
+
return ret; // allow chaining.
|
862
|
+
};
|
863
|
+
|
864
|
+
/**
|
865
|
+
* Reset m.style.cssText to nothing to reduce memory footprint.
|
866
|
+
*/
|
867
|
+
set_css( '' );
|
868
|
+
m = f = null;
|
869
|
+
|
870
|
+
// Enable HTML 5 elements for styling in IE.
|
871
|
+
// fyi: jscript version does not reflect trident version
|
872
|
+
// therefore ie9 in ie7 mode will still have a jScript v.9
|
873
|
+
if ( enableHTML5 && window.attachEvent && (function(){ var elem = doc.createElement("div");
|
874
|
+
elem.innerHTML = "<elem></elem>";
|
875
|
+
return elem.childNodes.length !== 1; })()) {
|
876
|
+
// iepp v1.6 by @jon_neal : code.google.com/p/ie-print-protector
|
877
|
+
(function(f,l){var j="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",n=j.split("|"),k=n.length,g=new RegExp("<(/*)("+j+")","gi"),h=new RegExp("\\b("+j+")\\b(?!.*[;}])","gi"),m=l.createDocumentFragment(),d=l.documentElement,i=d.firstChild,b=l.createElement("style"),e=l.createElement("body");b.media="all";function c(p){var o=-1;while(++o<k){p.createElement(n[o])}}c(l);c(m);function a(t,s){var r=t.length,q=-1,o,p=[];while(++q<r){o=t[q];s=o.media||s;p.push(a(o.imports,s));p.push(o.cssText)}return p.join("")}f.attachEvent("onbeforeprint",function(){var r=-1;while(++r<k){var o=l.getElementsByTagName(n[r]),q=o.length,p=-1;while(++p<q){if(o[p].className.indexOf("iepp_")<0){o[p].className+=" iepp_"+n[r]}}}i.insertBefore(b,i.firstChild);b.styleSheet.cssText=a(l.styleSheets,"all").replace(h,".iepp_$1");m.appendChild(l.body);d.appendChild(e);e.innerHTML=m.firstChild.innerHTML.replace(g,"<$1bdo")});f.attachEvent("onafterprint",function(){e.innerHTML="";d.removeChild(e);i.removeChild(b);d.appendChild(m.firstChild)})})(this,document);
|
878
|
+
}
|
879
|
+
|
880
|
+
// Assign private properties to the return object with prefix
|
881
|
+
ret._enableHTML5 = enableHTML5;
|
882
|
+
ret._version = version;
|
883
|
+
|
884
|
+
// Remove "no-js" class from <html> element, if it exists:
|
885
|
+
docElement.className=docElement.className.replace(/\bno-js\b/,'') + ' js';
|
886
|
+
|
887
|
+
// Add the new classes to the <html> element.
|
888
|
+
docElement.className += ' ' + classes.join( ' ' );
|
889
|
+
|
890
|
+
return ret;
|
891
|
+
|
892
|
+
})(this,this.document);
|