fog-xenserver 0.0.1.beta1 → 0.0.1.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.hound.yml +14 -15
- data/.travis.yml +5 -7
- data/CONTRIBUTORS.md +2 -1
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/fog-xenserver.gemspec +5 -2
- data/gemfiles/Gemfile.1.9.2+ +1 -1
- data/gemfiles/{Gemfile.1.8.7 → Gemfile.1.9.2-} +1 -1
- data/lib/fog/compute/xen_server.rb +284 -59
- data/lib/fog/compute/xen_server/mock.rb +4 -0
- data/lib/fog/compute/xen_server/models.rb +4 -0
- data/lib/fog/compute/xen_server/models/blob.rb +2 -1
- data/lib/fog/compute/xen_server/models/blobs.rb +1 -1
- data/lib/fog/compute/xen_server/models/bond.rb +5 -4
- data/lib/fog/compute/xen_server/models/bonds.rb +1 -1
- data/lib/fog/compute/xen_server/models/class_methods.rb +24 -0
- data/lib/fog/compute/xen_server/models/collection.rb +45 -0
- data/lib/fog/compute/xen_server/models/console.rb +3 -2
- data/lib/fog/compute/xen_server/models/consoles.rb +1 -1
- data/lib/fog/compute/xen_server/models/crash_dump.rb +4 -3
- data/lib/fog/compute/xen_server/models/crash_dumps.rb +1 -1
- data/lib/fog/compute/xen_server/models/dr_task.rb +3 -2
- data/lib/fog/compute/xen_server/models/dr_tasks.rb +1 -1
- data/lib/fog/compute/xen_server/models/gpu_group.rb +5 -4
- data/lib/fog/compute/xen_server/models/gpu_groups.rb +1 -1
- data/lib/fog/compute/xen_server/models/guest_metrics.rb +4 -3
- data/lib/fog/compute/xen_server/models/guests_metrics.rb +1 -1
- data/lib/fog/compute/xen_server/models/host.rb +23 -65
- data/lib/fog/compute/xen_server/models/host_cpu.rb +4 -3
- data/lib/fog/compute/xen_server/models/host_cpus.rb +1 -1
- data/lib/fog/compute/xen_server/models/host_crash_dump.rb +3 -2
- data/lib/fog/compute/xen_server/models/host_crash_dumps.rb +1 -1
- data/lib/fog/compute/xen_server/models/host_metrics.rb +3 -7
- data/lib/fog/compute/xen_server/models/host_patch.rb +4 -3
- data/lib/fog/compute/xen_server/models/host_patchs.rb +1 -1
- data/lib/fog/compute/xen_server/models/hosts.rb +1 -1
- data/lib/fog/compute/xen_server/models/hosts_metrics.rb +1 -1
- data/lib/fog/compute/xen_server/models/instance_methods.rb +54 -0
- data/lib/fog/compute/xen_server/models/model.rb +12 -0
- data/lib/fog/compute/xen_server/models/network.rb +9 -40
- data/lib/fog/compute/xen_server/models/networks.rb +1 -1
- data/lib/fog/compute/xen_server/models/pbd.rb +4 -7
- data/lib/fog/compute/xen_server/models/pbds.rb +1 -1
- data/lib/fog/compute/xen_server/models/pci.rb +4 -3
- data/lib/fog/compute/xen_server/models/pcis.rb +1 -1
- data/lib/fog/compute/xen_server/models/pgpu.rb +5 -4
- data/lib/fog/compute/xen_server/models/pgpus.rb +1 -1
- data/lib/fog/compute/xen_server/models/pif.rb +27 -16
- data/lib/fog/compute/xen_server/models/pif_metrics.rb +2 -1
- data/lib/fog/compute/xen_server/models/pifs.rb +1 -1
- data/lib/fog/compute/xen_server/models/pifs_metrics.rb +4 -2
- data/lib/fog/compute/xen_server/models/pool.rb +24 -6
- data/lib/fog/compute/xen_server/models/pool_patch.rb +3 -2
- data/lib/fog/compute/xen_server/models/pool_patchs.rb +1 -1
- data/lib/fog/compute/xen_server/models/pools.rb +1 -1
- data/lib/fog/compute/xen_server/models/role.rb +3 -2
- data/lib/fog/compute/xen_server/models/roles.rb +2 -2
- data/lib/fog/compute/xen_server/models/server.rb +89 -118
- data/lib/fog/compute/xen_server/models/server_appliance.rb +3 -2
- data/lib/fog/compute/xen_server/models/server_appliances.rb +1 -1
- data/lib/fog/compute/xen_server/models/server_metrics.rb +7 -6
- data/lib/fog/compute/xen_server/models/servers.rb +4 -4
- data/lib/fog/compute/xen_server/models/servers_metrics.rb +1 -1
- data/lib/fog/compute/xen_server/models/storage_manager.rb +2 -1
- data/lib/fog/compute/xen_server/models/storage_managers.rb +1 -1
- data/lib/fog/compute/xen_server/models/storage_repositories.rb +1 -1
- data/lib/fog/compute/xen_server/models/storage_repository.rb +17 -44
- data/lib/fog/compute/xen_server/models/tunnel.rb +4 -3
- data/lib/fog/compute/xen_server/models/tunnels.rb +1 -1
- data/lib/fog/compute/xen_server/models/vbd.rb +29 -28
- data/lib/fog/compute/xen_server/models/vbd_metrics.rb +3 -7
- data/lib/fog/compute/xen_server/models/vbds.rb +1 -1
- data/lib/fog/compute/xen_server/models/vbds_metrics.rb +1 -1
- data/lib/fog/compute/xen_server/models/vdi.rb +22 -34
- data/lib/fog/compute/xen_server/models/vdis.rb +1 -1
- data/lib/fog/compute/xen_server/models/vif.rb +17 -20
- data/lib/fog/compute/xen_server/models/vif_metrics.rb +2 -1
- data/lib/fog/compute/xen_server/models/vifs.rb +1 -1
- data/lib/fog/compute/xen_server/models/vifs_metrics.rb +1 -1
- data/lib/fog/compute/xen_server/models/vlan.rb +5 -44
- data/lib/fog/compute/xen_server/models/vlans.rb +1 -1
- data/lib/fog/compute/xen_server/models/vmpp.rb +3 -2
- data/lib/fog/compute/xen_server/models/vmpps.rb +1 -1
- data/lib/fog/compute/xen_server/models/vtpm.rb +4 -3
- data/lib/fog/compute/xen_server/models/vtpms.rb +1 -1
- data/lib/fog/compute/xen_server/real.rb +11 -1
- data/lib/fog/compute/xen_server/requests/add_ipv4_allowed_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/add_ipv6_allowed_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/add_to_vcpus_params_live_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/apply_edition_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/apply_edition_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/assert_agile_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/assert_attachable_vbd.rb +11 -0
- data/lib/fog/compute/xen_server/requests/assert_can_be_recovered_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/assert_can_boot_here_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/assert_can_evacuate_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/assert_can_host_ha_statefile_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/assert_can_migrate_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/assert_operation_valid_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/assert_supports_database_replication_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/backup_rrds_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/bugreport_upload_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/builtin_templates.rb +1 -7
- data/lib/fog/compute/xen_server/requests/call_plugin_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/certificate_install_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/certificate_list_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/certificate_sync_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/certificate_uninstall_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/checkpoint_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/clean_reboot_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/clean_shutdown_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/clone_server.rb +4 -18
- data/lib/fog/compute/xen_server/requests/clone_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/compute_free_memory_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/compute_memory_overhead_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/compute_memory_overhead_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/copy_bios_strings_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/copy_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/copy_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/create_network.rb +2 -28
- data/lib/fog/compute/xen_server/requests/create_new_blob_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/create_new_blob_network.rb +11 -0
- data/lib/fog/compute/xen_server/requests/create_new_blob_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/create_new_blob_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/create_new_blob_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/create_server.rb +3 -107
- data/lib/fog/compute/xen_server/requests/create_sr.rb +5 -57
- data/lib/fog/compute/xen_server/requests/create_vbd.rb +2 -26
- data/lib/fog/compute/xen_server/requests/create_vdi.rb +2 -19
- data/lib/fog/compute/xen_server/requests/create_vif.rb +2 -43
- data/lib/fog/compute/xen_server/requests/create_vlan.rb +3 -21
- data/lib/fog/compute/xen_server/requests/create_vlan_from_pif_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/create_vlan_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/crl_install_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/crl_list_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/crl_uninstall_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/custom_templates.rb +0 -6
- data/lib/fog/compute/xen_server/requests/db_forget_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/db_forget_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/db_introduce_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/db_introduce_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/declare_dead_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/designate_new_master_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/destroy_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/destroy_record.rb +11 -0
- data/lib/fog/compute/xen_server/requests/destroy_sr.rb +3 -17
- data/lib/fog/compute/xen_server/requests/detect_nonhomogeneous_external_auth_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/disable_database_replication_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/disable_external_auth_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/disable_external_auth_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/disable_ha_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/disable_host.rb +4 -16
- data/lib/fog/compute/xen_server/requests/disable_local_storage_caching_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/disable_local_storage_caching_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/disable_redo_log_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/dmesg_clear_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/dmesg_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/eject_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/eject_vbd.rb +3 -9
- data/lib/fog/compute/xen_server/requests/emergency_ha_disable_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/emergency_reset_master_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/emergency_transition_to_master_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/enable_database_replication_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/enable_external_auth_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/enable_external_auth_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/enable_ha_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/enable_host.rb +4 -15
- data/lib/fog/compute/xen_server/requests/enable_local_storage_caching_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/enable_local_storage_caching_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/enable_redo_log_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/evacuate_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/forget_data_source_archives_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/forget_data_source_archives_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/forget_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/forget_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/forget_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_allowed_vbd_devices_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/get_allowed_vif_devices_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/get_boot_record_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/get_data_sources_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_data_sources_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/get_license_state_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_log_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_management_interface_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_possible_hosts_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/get_record.rb +4 -22
- data/lib/fog/compute/xen_server/requests/get_records.rb +5 -14
- data/lib/fog/compute/xen_server/requests/get_server_certificate_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_server_localtime_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_servertime_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_supported_types_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_system_status_capabilities_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/get_vms_which_prevent_evacuation_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/ha_compute_hypothetical_max_host_failures_to_tolerate_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/ha_compute_max_host_failures_to_tolerate_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/ha_compute_vm_failover_plan_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/ha_failover_plan_exists_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/ha_prevent_restarts_for_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/hard_reboot_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/hard_shutdown_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/import_convert_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/insert_vbd.rb +3 -9
- data/lib/fog/compute/xen_server/requests/introduce_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/introduce_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/introduce_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/join_force_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/join_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/list_methods_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/local_management_reconfigure_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/management_disable_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/management_reconfigure_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/maximise_memory_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/migrate_receive_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/migrate_send_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/open_database_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/pause_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/plug_pbd.rb +11 -0
- data/lib/fog/compute/xen_server/requests/plug_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/plug_vbd.rb +11 -0
- data/lib/fog/compute/xen_server/requests/plug_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/pool_migrate_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/pool_migrate_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/power_on_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/power_state_reset_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/probe_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/provision_server.rb +4 -8
- data/lib/fog/compute/xen_server/requests/query_data_source_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/query_data_source_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/query_services_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/read_database_pool_uuid_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/reboot_host.rb +3 -9
- data/lib/fog/compute/xen_server/requests/reboot_server.rb +13 -5
- data/lib/fog/compute/xen_server/requests/reconfigure_ip_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/reconfigure_ipv6_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/record_data_source_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/record_data_source_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/recover_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/recover_slaves_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/refresh_pack_info_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/remove_ipv4_allowed_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/remove_ipv6_allowed_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/reset_cpu_features_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/resize_online_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/resize_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/restart_agent_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/resume_on_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/resume_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/revert_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/revert_to_server.rb +18 -0
- data/lib/fog/compute/xen_server/requests/scan_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/scan_sr.rb +3 -9
- data/lib/fog/compute/xen_server/requests/send_debug_keys_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/send_sysrq_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/send_test_post_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/send_trigger_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_affinity.rb +1 -7
- data/lib/fog/compute/xen_server/requests/set_allow_caching_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_appliance_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_attribute.rb +1 -7
- data/lib/fog/compute/xen_server/requests/set_cpu_features_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_default_locking_mode_network.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_device_config_pbd.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_ha_host_failures_to_tolerate_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_ha_restart_priority_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_hostname_live_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_hvm_shadow_multiplier_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_ipv4_allowed_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_ipv6_allowed_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_is_a_snapshot_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_locking_mode_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_managed_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_memory_dynamic_max_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_memory_dynamic_min_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_memory_dynamic_range_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_memory_limits_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_memory_static_max_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_memory_static_min_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_memory_static_range_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_metadata_of_pool_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_missing_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_name_description_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_name_description_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_name_label_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_name_label_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_on_boot_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_order_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_physical_size_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_physical_utilisation_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_physical_utilisation_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_power_on_mode_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_primary_address_type_pif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_protection_policy_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_read_only_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_shadow_multiplier_live_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_sharable_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_shared_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_shutdown_delay_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_snapshot_of_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_snapshot_time_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_start_delay_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_suspend_vdi_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_vcpus_at_startup_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_vcpus_max_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_vcpus_number_live_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/set_virtual_allocation_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_virtual_size_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/set_vswitch_controller_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/shutdown_agent_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/shutdown_host.rb +3 -9
- data/lib/fog/compute/xen_server/requests/shutdown_server.rb +5 -8
- data/lib/fog/compute/xen_server/requests/snapshot_server.rb +4 -8
- data/lib/fog/compute/xen_server/requests/snapshot_vdi.rb +11 -0
- data/lib/fog/compute/xen_server/requests/snapshot_with_quiesce_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/snapshots.rb +15 -0
- data/lib/fog/compute/xen_server/requests/start_on_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/start_server.rb +4 -8
- data/lib/fog/compute/xen_server/requests/suspend_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/sync_data_host.rb +11 -0
- data/lib/fog/compute/xen_server/requests/sync_database_pool.rb +11 -0
- data/lib/fog/compute/xen_server/requests/templates.rb +0 -6
- data/lib/fog/compute/xen_server/requests/unpause_server.rb +13 -0
- data/lib/fog/compute/xen_server/requests/unplug_force_vbd.rb +11 -0
- data/lib/fog/compute/xen_server/requests/unplug_pbd.rb +3 -12
- data/lib/fog/compute/xen_server/requests/unplug_vbd.rb +3 -17
- data/lib/fog/compute/xen_server/requests/unplug_vif.rb +11 -0
- data/lib/fog/compute/xen_server/requests/update_sr.rb +11 -0
- data/lib/fog/compute/xen_server/requests/update_vdi.rb +11 -0
- data/lib/fog/parsers/xen_server.rb +0 -7
- data/lib/fog/xen_server/connection.rb +1 -0
- data/lib/fog/xen_server/version.rb +1 -1
- data/lib/fog/xenserver.rb +0 -2
- data/spec/cassettes/builtin_templates.yml +48 -0
- data/spec/cassettes/clone_server.yml +130 -0
- data/spec/cassettes/create_network.yml +87 -0
- data/spec/cassettes/create_server_create_vm.yml +144 -0
- data/spec/cassettes/create_server_get_all_hosts.yml +59 -0
- data/spec/cassettes/create_server_open_connection.yml +45 -0
- data/spec/cassettes/create_vbd_create_vbd.yml +173 -0
- data/spec/cassettes/create_vbd_create_vdi.yml +132 -0
- data/spec/cassettes/create_vbd_create_vm.yml +144 -0
- data/spec/cassettes/create_vbd_get_all_hosts.yml +59 -0
- data/spec/cassettes/create_vbd_get_storage_repository.yml +89 -0
- data/spec/cassettes/create_vbd_open_connection.yml +45 -0
- data/spec/cassettes/create_vdi.yml +132 -0
- data/spec/cassettes/create_vif_create_vif.yml +173 -0
- data/spec/cassettes/create_vif_get_network_by_name.yml +88 -0
- data/spec/cassettes/create_vif_open_connection.yml +45 -0
- data/spec/cassettes/create_vif_vif_set_device_number.yml +89 -0
- data/spec/cassettes/get_all_hosts.yml +73 -0
- data/spec/cassettes/get_network_by_name.yml +88 -0
- data/spec/cassettes/get_storage_repository.yml +89 -0
- data/spec/cassettes/get_vm_by_name.yml +130 -0
- data/spec/cassettes/open_connection.yml +45 -0
- data/spec/cassettes/sync_database_pool.yml +129 -0
- data/spec/cassettes/vif_set_device_number.yml +342 -0
- data/spec/fog/compute/xen_server/models/blob_spec.rb +63 -0
- data/spec/fog/compute/xen_server/models/blobs_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/bond_spec.rb +63 -0
- data/spec/fog/compute/xen_server/models/bonds_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/console_spec.rb +57 -0
- data/spec/fog/compute/xen_server/models/consoles_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/crash_dump_spec.rb +56 -0
- data/spec/fog/compute/xen_server/models/crash_dumps_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/dr_task_spec.rb +51 -0
- data/spec/fog/compute/xen_server/models/dr_tasks_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/gpu_group_spec.rb +65 -0
- data/spec/fog/compute/xen_server/models/gpu_groups_spec.rb +9 -0
- data/{test/fog/compute/xen_server/models/guest_metrics_test.rb → spec/fog/compute/xen_server/models/guest_metrics_spec.rb} +32 -5
- data/spec/fog/compute/xen_server/models/guests_metrics_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/host_cpu_spec.rb +73 -0
- data/spec/fog/compute/xen_server/models/host_cpus_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/host_crash_dump_spec.rb +57 -0
- data/spec/fog/compute/xen_server/models/host_crash_dumps_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/host_metrics_spec.rb +72 -0
- data/spec/fog/compute/xen_server/models/host_patch_spec.rb +68 -0
- data/spec/fog/compute/xen_server/models/host_patchs_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/host_spec.rb +231 -0
- data/spec/fog/compute/xen_server/models/hosts_metrics_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/hosts_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/network_spec.rb +79 -0
- data/spec/fog/compute/xen_server/models/networks_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/pbd_spec.rb +67 -0
- data/spec/fog/compute/xen_server/models/pbds_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/pci_spec.rb +61 -0
- data/spec/fog/compute/xen_server/models/pcis_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/pgpu_spec.rb +58 -0
- data/spec/fog/compute/xen_server/models/pgpus_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/pif_metrics_spec.rb +74 -0
- data/spec/fog/compute/xen_server/models/pif_spec.rb +118 -0
- data/spec/fog/compute/xen_server/models/pifs_metrics_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/pifs_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/pool_patch_spec.rb +66 -0
- data/spec/fog/compute/xen_server/models/pool_patchs_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/pool_spec.rb +106 -0
- data/spec/fog/compute/xen_server/models/pools_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/role_spec.rb +56 -0
- data/spec/fog/compute/xen_server/models/roles_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/server_appliance_spec.rb +61 -0
- data/spec/fog/compute/xen_server/models/server_appliances_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/server_metrics_spec.rb +76 -0
- data/spec/fog/compute/xen_server/models/server_spec.rb +554 -0
- data/spec/fog/compute/xen_server/models/servers_metrics_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/servers_spec.rb +9 -0
- data/{test/fog/compute/xen_server/models/storage_manger_test.rb → spec/fog/compute/xen_server/models/storage_manager_spec.rb} +34 -5
- data/spec/fog/compute/xen_server/models/storage_managers_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/storage_repositories_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/storage_repository_spec.rb +92 -0
- data/spec/fog/compute/xen_server/models/tunnel_spec.rb +57 -0
- data/spec/fog/compute/xen_server/models/tunnels_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/vbd_metrics_spec.rb +70 -0
- data/spec/fog/compute/xen_server/models/vbd_spec.rb +194 -0
- data/spec/fog/compute/xen_server/models/vbds_metrics_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/vbds_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/vdi_spec.rb +162 -0
- data/spec/fog/compute/xen_server/models/vdis_spec.rb +9 -0
- data/{test/fog/compute/xen_server/models/vif_metrics_test.rb → spec/fog/compute/xen_server/models/vif_metrics_spec.rb} +26 -5
- data/spec/fog/compute/xen_server/models/vif_spec.rb +141 -0
- data/spec/fog/compute/xen_server/models/vifs_metrics_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/vifs_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/vlan_spec.rb +58 -0
- data/spec/fog/compute/xen_server/models/vlans_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/vmpp_spec.rb +89 -0
- data/spec/fog/compute/xen_server/models/vmpps_spec.rb +9 -0
- data/spec/fog/compute/xen_server/models/vtpm_spec.rb +53 -0
- data/spec/fog/compute/xen_server/models/vtpms_spec.rb +9 -0
- data/spec/fog/compute/xen_server/requests/builtin_templates_spec.rb +18 -0
- data/spec/fog/compute/xen_server/requests/clone_server_spec.rb +36 -0
- data/spec/fog/compute/xen_server/requests/create_network_spec.rb +24 -0
- data/spec/fog/compute/xen_server/requests/create_server_spec.rb +30 -0
- data/spec/fog/compute/xen_server/requests/create_vbd_spec.rb +45 -0
- data/spec/fog/compute/xen_server/requests/create_vdi_spec.rb +27 -0
- data/spec/fog/compute/xen_server/requests/create_vif_spec.rb +46 -0
- data/spec/fog/compute/xen_server/requests/sync_database_pool_spec.rb +16 -0
- data/spec/fog/compute/xen_server_spec.rb +13 -0
- data/{test → spec}/minitest_helper.rb +17 -5
- metadata +470 -94
- data/lib/fog.rb +0 -3
- data/lib/fog/collection.rb +0 -37
- data/lib/fog/compute/xen_server/requests/destroy_network.rb +0 -28
- data/lib/fog/compute/xen_server/requests/destroy_server.rb +0 -17
- data/lib/fog/compute/xen_server/requests/destroy_vdi.rb +0 -17
- data/lib/fog/compute/xen_server/requests/destroy_vif.rb +0 -17
- data/lib/fog/compute/xen_server/requests/destroy_vlan.rb +0 -27
- data/lib/fog/compute/xen_server/requests/snapshot_revert.rb +0 -17
- data/lib/fog/compute/xen_server/requests/start_vm.rb +0 -19
- data/lib/fog/model.rb +0 -48
- data/lib/fog/parsers/xen_server/get_hosts.rb +0 -16
- data/lib/fog/parsers/xen_server/get_networks.rb +0 -16
- data/lib/fog/parsers/xen_server/get_pools.rb +0 -16
- data/lib/fog/parsers/xen_server/get_storage_repositories.rb +0 -16
- data/lib/fog/parsers/xen_server/get_vbds.rb +0 -16
- data/lib/fog/parsers/xen_server/get_vifs.rb +0 -16
- data/lib/fog/parsers/xen_server/get_vms.rb +0 -16
- data/test/fog/compute/xen_server/models/blob_test.rb +0 -40
- data/test/fog/compute/xen_server/models/bond_test.rb +0 -42
- data/test/fog/compute/xen_server/models/console_test.rb +0 -38
- data/test/fog/compute/xen_server/models/crash_dump_test.rb +0 -39
- data/test/fog/compute/xen_server/models/dr_task_test.rb +0 -35
- data/test/fog/compute/xen_server/models/gpu_group_test.rb +0 -45
- data/test/fog/compute/xen_server/models/host_cpu_test.rb +0 -46
- data/test/fog/compute/xen_server/models/host_crash_dump_test.rb +0 -37
- data/test/fog/compute/xen_server/models/host_metrics_test.rb +0 -38
- data/test/fog/compute/xen_server/models/host_patch_test.rb +0 -45
- data/test/fog/compute/xen_server/models/host_test.rb +0 -102
- data/test/fog/compute/xen_server/models/network_test.rb +0 -51
- data/test/fog/compute/xen_server/models/pbd_test.rb +0 -40
- data/test/fog/compute/xen_server/models/pci_test.rb +0 -40
- data/test/fog/compute/xen_server/models/pgpu_test.rb +0 -41
- data/test/fog/compute/xen_server/models/pif_metrics_test.rb +0 -45
- data/test/fog/compute/xen_server/models/pif_test.rb +0 -81
- data/test/fog/compute/xen_server/models/pool_patch_test.rb +0 -43
- data/test/fog/compute/xen_server/models/pool_test.rb +0 -69
- data/test/fog/compute/xen_server/models/role_test.rb +0 -38
- data/test/fog/compute/xen_server/models/server_appliance_test.rb +0 -41
- data/test/fog/compute/xen_server/models/server_metrics_test.rb +0 -48
- data/test/fog/compute/xen_server/models/server_test.rb +0 -149
- data/test/fog/compute/xen_server/models/storage_repository_test.rb +0 -56
- data/test/fog/compute/xen_server/models/tunnel_test.rb +0 -40
- data/test/fog/compute/xen_server/models/vbd_metrics_test.rb +0 -37
- data/test/fog/compute/xen_server/models/vbd_test.rb +0 -58
- data/test/fog/compute/xen_server/models/vdi_test.rb +0 -71
- data/test/fog/compute/xen_server/models/vif_test.rb +0 -59
- data/test/fog/compute/xen_server/models/vlan_test.rb +0 -40
- data/test/fog/compute/xen_server/models/vmpp_test.rb +0 -55
- data/test/fog/compute/xen_server/models/vtpm_test.rb +0 -36
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Vlans do
|
4
|
+
let(:vlans_class) { Fog::Compute::XenServer::Models::Vlans }
|
5
|
+
|
6
|
+
it 'should be a collection of Servers' do
|
7
|
+
vlans_class.model.must_equal(Fog::Compute::XenServer::Models::Vlan)
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Vmpp do
|
4
|
+
let(:vmpp_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Vmpp
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
end
|
10
|
+
Fog::Compute::XenServer::Models::Vmpp
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should associate to a provider class' do
|
14
|
+
vmpp_class.provider_class.must_equal('VMPP')
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should have a collection name' do
|
18
|
+
vmpp_class.collection_name.must_equal(:vmpps)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
vmpp_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 20 attributes' do
|
26
|
+
vmpp_class.attributes.must_equal([ :reference,
|
27
|
+
:alarm_config,
|
28
|
+
:archive_frequency,
|
29
|
+
:archive_last_run_time,
|
30
|
+
:archive_schedule,
|
31
|
+
:archive_target_config,
|
32
|
+
:archive_target_type,
|
33
|
+
:backup_frequency,
|
34
|
+
:backup_last_run_time,
|
35
|
+
:backup_retention_value,
|
36
|
+
:backup_schedule,
|
37
|
+
:backup_type,
|
38
|
+
:description,
|
39
|
+
:is_alarm_enabled,
|
40
|
+
:is_archive_running,
|
41
|
+
:is_backup_running,
|
42
|
+
:is_policy_enabled,
|
43
|
+
:name,
|
44
|
+
:recent_alerts,
|
45
|
+
:uuid ])
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'should have 1 association' do
|
49
|
+
vmpp_class.associations.must_equal(:vms => :servers)
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'should have 21 masks' do
|
53
|
+
vmpp_class.masks.must_equal(:reference => :reference,
|
54
|
+
:alarm_config => :alarm_config,
|
55
|
+
:archive_frequency => :archive_frequency,
|
56
|
+
:archive_last_run_time => :archive_last_run_time,
|
57
|
+
:archive_schedule => :archive_schedule,
|
58
|
+
:archive_target_config => :archive_target_config,
|
59
|
+
:archive_target_type => :archive_target_type,
|
60
|
+
:backup_frequency => :backup_frequency,
|
61
|
+
:backup_last_run_time => :backup_last_run_time,
|
62
|
+
:backup_retention_value => :backup_retention_value,
|
63
|
+
:backup_schedule => :backup_schedule,
|
64
|
+
:backup_type => :backup_type,
|
65
|
+
:description => :description,
|
66
|
+
:is_alarm_enabled => :is_alarm_enabled,
|
67
|
+
:is_archive_running => :is_archive_running,
|
68
|
+
:is_backup_running => :is_backup_running,
|
69
|
+
:is_policy_enabled => :is_policy_enabled,
|
70
|
+
:name => :name,
|
71
|
+
:recent_alerts => :recent_alerts,
|
72
|
+
:uuid => :uuid,
|
73
|
+
:vms => :VMs)
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'should have 2 aliases' do
|
77
|
+
vmpp_class.aliases.must_equal(:name_description => :description,
|
78
|
+
:name_label => :name,
|
79
|
+
:VMs => :vms)
|
80
|
+
end
|
81
|
+
|
82
|
+
it "shouldn't have default values" do
|
83
|
+
vmpp_class.default_values.must_equal({})
|
84
|
+
end
|
85
|
+
|
86
|
+
it "shouldn't require attributes before save" do
|
87
|
+
vmpp_class.require_before_save.must_equal([])
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Vmpps do
|
4
|
+
let(:vmpps_class) { Fog::Compute::XenServer::Models::Vmpps }
|
5
|
+
|
6
|
+
it 'should be a collection of Servers' do
|
7
|
+
vmpps_class.model.must_equal(Fog::Compute::XenServer::Models::Vmpp)
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Vtpm do
|
4
|
+
let(:vtpm_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Vtpm
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
end
|
10
|
+
Fog::Compute::XenServer::Models::Vtpm
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should associate to a provider class' do
|
14
|
+
vtpm_class.provider_class.must_equal('VTPM')
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should have a collection name' do
|
18
|
+
vtpm_class.collection_name.must_equal(:vtpms)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
vtpm_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 2 attributes' do
|
26
|
+
vtpm_class.attributes.must_equal([ :reference,
|
27
|
+
:uuid ])
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should have 2 associations' do
|
31
|
+
vtpm_class.associations.must_equal(:backend => :servers,
|
32
|
+
:vm => :servers)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should have 4 masks' do
|
36
|
+
vtpm_class.masks.must_equal(:reference => :reference,
|
37
|
+
:uuid => :uuid,
|
38
|
+
:backend => :backend,
|
39
|
+
:vm => :vm)
|
40
|
+
end
|
41
|
+
|
42
|
+
it "shouldn't have aliases" do
|
43
|
+
vtpm_class.aliases.must_equal({})
|
44
|
+
end
|
45
|
+
|
46
|
+
it "shouldn't have default values" do
|
47
|
+
vtpm_class.default_values.must_equal({})
|
48
|
+
end
|
49
|
+
|
50
|
+
it "shouldn't require attributes before save" do
|
51
|
+
vtpm_class.require_before_save.must_equal([])
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Vtpms do
|
4
|
+
let(:vtpms_class) { Fog::Compute::XenServer::Models::Vtpms }
|
5
|
+
|
6
|
+
it 'should be a collection of Servers' do
|
7
|
+
vtpms_class.model.must_equal(Fog::Compute::XenServer::Models::Vtpm)
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe "#builtin_templates" do
|
4
|
+
let(:connection) do
|
5
|
+
VCR.use_cassette('open_connection') do
|
6
|
+
Fog::Compute.new(:provider => 'XenServer',
|
7
|
+
:xenserver_url => '192.168.10.2',
|
8
|
+
:xenserver_username => 'root',
|
9
|
+
:xenserver_password => '123456')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should return all builtin templates" do
|
14
|
+
VCR.use_cassette('builtin_templates') do
|
15
|
+
connection.builtin_templates.size.must_equal 63
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe "#clone_vm" do
|
4
|
+
let(:connection) do
|
5
|
+
VCR.use_cassette('open_connection') do
|
6
|
+
Fog::Compute.new(:provider => 'XenServer',
|
7
|
+
:xenserver_url => '192.168.10.2',
|
8
|
+
:xenserver_username => 'root',
|
9
|
+
:xenserver_password => '123456')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
let(:server) do
|
13
|
+
host = VCR.use_cassette('create_server_get_all_hosts') do
|
14
|
+
connection.hosts.first
|
15
|
+
end
|
16
|
+
@server = connection.servers.new(:name => 'CrazyName')
|
17
|
+
@server.affinity = host
|
18
|
+
VCR.use_cassette('create_server_create_vm') do
|
19
|
+
@server.save
|
20
|
+
end
|
21
|
+
@server
|
22
|
+
end
|
23
|
+
|
24
|
+
before :each do
|
25
|
+
@template_uuid = server.uuid
|
26
|
+
VCR.use_cassette('clone_server') do
|
27
|
+
server.clone('Awesome Server')
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should create a new template' do
|
32
|
+
server.persisted?.must_equal(true)
|
33
|
+
server.uuid.wont_equal(@template_uuid)
|
34
|
+
server.name.must_equal('Awesome Server')
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe "#create_network" do
|
4
|
+
let(:connection) do
|
5
|
+
VCR.use_cassette('open_connection') do
|
6
|
+
Fog::Compute.new(:provider => 'XenServer',
|
7
|
+
:xenserver_url => '192.168.10.2',
|
8
|
+
:xenserver_username => 'root',
|
9
|
+
:xenserver_password => '123456')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
before :each do
|
14
|
+
@network = connection.networks.new(:name => 'CrazyName')
|
15
|
+
VCR.use_cassette('create_network') do
|
16
|
+
@network.save
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should create a new network' do
|
21
|
+
@network.persisted?.must_equal(true)
|
22
|
+
@network.name.must_equal('CrazyName')
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe "#create_vm" do
|
4
|
+
let(:connection) do
|
5
|
+
VCR.use_cassette('create_server_open_connection') do
|
6
|
+
Fog::Compute.new(:provider => 'XenServer',
|
7
|
+
:xenserver_url => '192.168.10.2',
|
8
|
+
:xenserver_username => 'root',
|
9
|
+
:xenserver_password => '123456')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
let(:host) do
|
13
|
+
VCR.use_cassette('create_server_get_all_hosts') do
|
14
|
+
connection.hosts.first
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
before :each do
|
19
|
+
@server = connection.servers.new(:name => 'CrazyName')
|
20
|
+
@server.affinity = host
|
21
|
+
VCR.use_cassette('create_server_create_vm') do
|
22
|
+
@server.save
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should create a new server' do
|
27
|
+
@server.persisted?.must_equal(true)
|
28
|
+
@server.name.must_equal('CrazyName')
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe "#create_vbd" do
|
4
|
+
let(:connection) do
|
5
|
+
VCR.use_cassette('create_vbd_open_connection') do
|
6
|
+
Fog::Compute.new(:provider => 'XenServer',
|
7
|
+
:xenserver_url => '192.168.10.2',
|
8
|
+
:xenserver_username => 'root',
|
9
|
+
:xenserver_password => '123456')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
let(:sr) do
|
13
|
+
VCR.use_cassette('create_vbd_get_storage_repository') do
|
14
|
+
connection.storage_repositories.get_by_name('Local storage')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
let(:vdi) do
|
18
|
+
VCR.use_cassette('create_vbd_create_vdi') do
|
19
|
+
connection.vdis.create(:name => 'Craziest Vdi Ever', :storage_repository => sr)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
let(:host) do
|
23
|
+
VCR.use_cassette('create_vbd_get_all_hosts') do
|
24
|
+
connection.hosts.first
|
25
|
+
end
|
26
|
+
end
|
27
|
+
let(:vm) do
|
28
|
+
VCR.use_cassette('create_vbd_create_vm') do
|
29
|
+
connection.servers.create(:name => "CrazyName", :affinity => host)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
before :each do
|
34
|
+
@vbd = connection.vbds.new
|
35
|
+
@vbd.vdi = vdi
|
36
|
+
@vbd.vm = vm
|
37
|
+
VCR.use_cassette('create_vbd_create_vbd') do
|
38
|
+
@vbd.save
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should create a new vbd' do
|
43
|
+
@vbd.persisted?.must_equal(true)
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe "#create_vdi" do
|
4
|
+
let(:connection) do
|
5
|
+
VCR.use_cassette('open_connection') do
|
6
|
+
Fog::Compute.new(:provider => 'XenServer',
|
7
|
+
:xenserver_url => '192.168.10.2',
|
8
|
+
:xenserver_username => 'root',
|
9
|
+
:xenserver_password => '123456')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
let(:sr) do
|
13
|
+
VCR.use_cassette('get_storage_repository') do
|
14
|
+
connection.storage_repositories.get_by_name('Local storage')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
before :each do
|
19
|
+
VCR.use_cassette('create_vdi') do
|
20
|
+
@vdi = connection.vdis.create(:name => 'Craziest Vdi Ever', :storage_repository => sr)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should create a new vdi' do
|
25
|
+
@vdi.persisted?.must_equal(true)
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe "#create_vif" do
|
4
|
+
let(:connection) do
|
5
|
+
VCR.use_cassette('create_vif_open_connection') do
|
6
|
+
Fog::Compute.new(:provider => 'XenServer',
|
7
|
+
:xenserver_url => '192.168.10.2',
|
8
|
+
:xenserver_username => 'root',
|
9
|
+
:xenserver_password => '123456')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
let(:network) do
|
13
|
+
VCR.use_cassette('create_vif_get_network_by_name') do
|
14
|
+
connection.networks.get_by_name('Pool-wide network associated with eth0')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
let(:host) do
|
18
|
+
VCR.use_cassette('create_server_get_all_hosts') do
|
19
|
+
connection.hosts.first
|
20
|
+
end
|
21
|
+
end
|
22
|
+
let(:vm) do
|
23
|
+
@server = connection.servers.new(:name => 'CrazyName')
|
24
|
+
@server.affinity = host
|
25
|
+
VCR.use_cassette('create_server_create_vm') do
|
26
|
+
@server.save
|
27
|
+
end
|
28
|
+
@server
|
29
|
+
end
|
30
|
+
|
31
|
+
before :each do
|
32
|
+
@vif = connection.vifs.new
|
33
|
+
@vif.network = network
|
34
|
+
@vif.vm = vm
|
35
|
+
VCR.use_cassette('create_vif_vif_set_device_number') do
|
36
|
+
@vif.set_device_number
|
37
|
+
end
|
38
|
+
VCR.use_cassette('create_vif_create_vif') do
|
39
|
+
@vif.save
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'should create a new vif' do
|
44
|
+
@vif.persisted?.must_equal(true)
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe "#sync_database_pool" do
|
4
|
+
let(:connection) do
|
5
|
+
Fog::Compute.new(:provider => 'XenServer',
|
6
|
+
:xenserver_url => '192.168.10.2',
|
7
|
+
:xenserver_username => 'root',
|
8
|
+
:xenserver_password => '123456')
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should return success" do
|
12
|
+
VCR.use_cassette('sync_database_pool') do
|
13
|
+
connection.pools.first.sync_database.size.must_equal 0
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer do
|
4
|
+
describe '.const_missing' do
|
5
|
+
before :each do
|
6
|
+
Fog::Compute::XenServer::Models::Abc = Class.new
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should look for missing constants in the Models namespace' do
|
10
|
+
Fog::Compute::XenServer::Abc.must_equal Fog::Compute::XenServer::Models::Abc
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|