fog-ecloud 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.rubocop.yml +20 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +17 -0
- data/CONTRIBUTING.md +18 -0
- data/CONTRIBUTORS.md +16 -0
- data/Gemfile +4 -0
- data/LICENSE.md +20 -0
- data/README.md +38 -0
- data/Rakefile +18 -0
- data/fog-ecloud.gemspec +35 -0
- data/gemfiles/Gemfile.1.9.2- +8 -0
- data/gemfiles/Gemfile.1.9.3+ +7 -0
- data/lib/fog/ecloud/collection.rb +24 -0
- data/lib/fog/ecloud/compute.rb +824 -0
- data/lib/fog/ecloud/core.rb +32 -0
- data/lib/fog/ecloud/generate_collection.rb +127 -0
- data/lib/fog/ecloud/ipaddr.rb +5 -0
- data/lib/fog/ecloud/mock_data_classes.rb +766 -0
- data/lib/fog/ecloud/model.rb +20 -0
- data/lib/fog/ecloud/models/compute/admin_organization.rb +43 -0
- data/lib/fog/ecloud/models/compute/admin_organizations.rb +21 -0
- data/lib/fog/ecloud/models/compute/api_key.rb +20 -0
- data/lib/fog/ecloud/models/compute/api_keys.rb +26 -0
- data/lib/fog/ecloud/models/compute/association.rb +23 -0
- data/lib/fog/ecloud/models/compute/associations.rb +34 -0
- data/lib/fog/ecloud/models/compute/authentication_level.rb +21 -0
- data/lib/fog/ecloud/models/compute/authentication_levels.rb +26 -0
- data/lib/fog/ecloud/models/compute/backup_internet_service.rb +45 -0
- data/lib/fog/ecloud/models/compute/backup_internet_services.rb +41 -0
- data/lib/fog/ecloud/models/compute/catalog.rb +39 -0
- data/lib/fog/ecloud/models/compute/catalog_configuration.rb +22 -0
- data/lib/fog/ecloud/models/compute/catalog_configurations.rb +26 -0
- data/lib/fog/ecloud/models/compute/catalog_item.rb +24 -0
- data/lib/fog/ecloud/models/compute/compute_pool.rb +70 -0
- data/lib/fog/ecloud/models/compute/compute_pools.rb +33 -0
- data/lib/fog/ecloud/models/compute/cpu_usage_detail.rb +16 -0
- data/lib/fog/ecloud/models/compute/cpu_usage_detail_summary.rb +26 -0
- data/lib/fog/ecloud/models/compute/detached_disk.rb +27 -0
- data/lib/fog/ecloud/models/compute/detached_disks.rb +26 -0
- data/lib/fog/ecloud/models/compute/environment.rb +111 -0
- data/lib/fog/ecloud/models/compute/environments.rb +39 -0
- data/lib/fog/ecloud/models/compute/firewall_acl.rb +27 -0
- data/lib/fog/ecloud/models/compute/firewall_acls.rb +27 -0
- data/lib/fog/ecloud/models/compute/group.rb +41 -0
- data/lib/fog/ecloud/models/compute/groups.rb +38 -0
- data/lib/fog/ecloud/models/compute/guest_process.rb +15 -0
- data/lib/fog/ecloud/models/compute/guest_processes.rb +26 -0
- data/lib/fog/ecloud/models/compute/hardware_configuration.rb +18 -0
- data/lib/fog/ecloud/models/compute/hardware_configurations.rb +26 -0
- data/lib/fog/ecloud/models/compute/internet_service.rb +97 -0
- data/lib/fog/ecloud/models/compute/internet_services.rb +44 -0
- data/lib/fog/ecloud/models/compute/ip_address.rb +39 -0
- data/lib/fog/ecloud/models/compute/ip_addresses.rb +32 -0
- data/lib/fog/ecloud/models/compute/layout.rb +20 -0
- data/lib/fog/ecloud/models/compute/layouts.rb +26 -0
- data/lib/fog/ecloud/models/compute/location.rb +22 -0
- data/lib/fog/ecloud/models/compute/locations.rb +28 -0
- data/lib/fog/ecloud/models/compute/login_banner.rb +16 -0
- data/lib/fog/ecloud/models/compute/login_banners.rb +26 -0
- data/lib/fog/ecloud/models/compute/memory_usage_detail.rb +16 -0
- data/lib/fog/ecloud/models/compute/memory_usage_detail_summary.rb +26 -0
- data/lib/fog/ecloud/models/compute/monitor.rb +46 -0
- data/lib/fog/ecloud/models/compute/monitors.rb +30 -0
- data/lib/fog/ecloud/models/compute/network.rb +46 -0
- data/lib/fog/ecloud/models/compute/networks.rb +32 -0
- data/lib/fog/ecloud/models/compute/node.rb +45 -0
- data/lib/fog/ecloud/models/compute/nodes.rb +42 -0
- data/lib/fog/ecloud/models/compute/operating_system.rb +16 -0
- data/lib/fog/ecloud/models/compute/operating_system_families.rb +26 -0
- data/lib/fog/ecloud/models/compute/operating_system_family.rb +21 -0
- data/lib/fog/ecloud/models/compute/operating_systems.rb +25 -0
- data/lib/fog/ecloud/models/compute/organization.rb +78 -0
- data/lib/fog/ecloud/models/compute/organizations.rb +38 -0
- data/lib/fog/ecloud/models/compute/password_complexity_rule.rb +49 -0
- data/lib/fog/ecloud/models/compute/password_complexity_rules.rb +26 -0
- data/lib/fog/ecloud/models/compute/physical_device.rb +21 -0
- data/lib/fog/ecloud/models/compute/physical_devices.rb +26 -0
- data/lib/fog/ecloud/models/compute/public_ip.rb +26 -0
- data/lib/fog/ecloud/models/compute/public_ips.rb +31 -0
- data/lib/fog/ecloud/models/compute/rnat.rb +27 -0
- data/lib/fog/ecloud/models/compute/rnats.rb +26 -0
- data/lib/fog/ecloud/models/compute/role.rb +23 -0
- data/lib/fog/ecloud/models/compute/roles.rb +36 -0
- data/lib/fog/ecloud/models/compute/row.rb +56 -0
- data/lib/fog/ecloud/models/compute/rows.rb +39 -0
- data/lib/fog/ecloud/models/compute/server.rb +323 -0
- data/lib/fog/ecloud/models/compute/server_configuration_option.rb +16 -0
- data/lib/fog/ecloud/models/compute/server_configuration_options.rb +26 -0
- data/lib/fog/ecloud/models/compute/servers.rb +65 -0
- data/lib/fog/ecloud/models/compute/ssh_key.rb +19 -0
- data/lib/fog/ecloud/models/compute/ssh_keys.rb +26 -0
- data/lib/fog/ecloud/models/compute/storage_usage_detail.rb +16 -0
- data/lib/fog/ecloud/models/compute/storage_usage_detail_summary.rb +26 -0
- data/lib/fog/ecloud/models/compute/support_ticket.rb +28 -0
- data/lib/fog/ecloud/models/compute/support_tickets.rb +26 -0
- data/lib/fog/ecloud/models/compute/tag.rb +13 -0
- data/lib/fog/ecloud/models/compute/tags.rb +26 -0
- data/lib/fog/ecloud/models/compute/task.rb +23 -0
- data/lib/fog/ecloud/models/compute/tasks.rb +29 -0
- data/lib/fog/ecloud/models/compute/template.rb +23 -0
- data/lib/fog/ecloud/models/compute/templates.rb +41 -0
- data/lib/fog/ecloud/models/compute/trusted_network_group.rb +33 -0
- data/lib/fog/ecloud/models/compute/trusted_network_groups.rb +27 -0
- data/lib/fog/ecloud/models/compute/user.rb +35 -0
- data/lib/fog/ecloud/models/compute/users.rb +26 -0
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +32 -0
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ips.rb +26 -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 +32 -0
- data/lib/fog/ecloud/requests/compute/admin_edit_login_banner.rb +30 -0
- data/lib/fog/ecloud/requests/compute/admin_edit_password_complexity_rules.rb +72 -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 +9 -0
- data/lib/fog/ecloud/requests/compute/backup_internet_service_edit.rb +47 -0
- data/lib/fog/ecloud/requests/compute/compute_pool_edit.rb +35 -0
- data/lib/fog/ecloud/requests/compute/firewall_acls_create.rb +78 -0
- data/lib/fog/ecloud/requests/compute/firewall_acls_delete.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_admin_organization.rb +23 -0
- data/lib/fog/ecloud/requests/compute/get_api_key.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_api_keys.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_association.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_associations.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_authentication_level.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_authentication_levels.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_backup_internet_service.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_backup_internet_services.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_catalog.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_catalog_configuration.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_catalog_configurations.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_catalog_item.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_compute_pool.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_compute_pools.rb +31 -0
- data/lib/fog/ecloud/requests/compute/get_cpu_usage_detail.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_cpu_usage_detail_summary.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_detached_disk.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_detached_disks.rb +31 -0
- data/lib/fog/ecloud/requests/compute/get_environment.rb +31 -0
- data/lib/fog/ecloud/requests/compute/get_environments.rb +0 -0
- data/lib/fog/ecloud/requests/compute/get_firewall_acl.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_firewall_acls.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_group.rb +18 -0
- data/lib/fog/ecloud/requests/compute/get_groups.rb +18 -0
- data/lib/fog/ecloud/requests/compute/get_guest_process.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_guest_processes.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_hardware_configuration.rb +29 -0
- data/lib/fog/ecloud/requests/compute/get_hardware_configurations.rb +14 -0
- data/lib/fog/ecloud/requests/compute/get_internet_service.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_internet_services.rb +18 -0
- data/lib/fog/ecloud/requests/compute/get_ip_address.rb +20 -0
- data/lib/fog/ecloud/requests/compute/get_layout.rb +18 -0
- data/lib/fog/ecloud/requests/compute/get_layouts.rb +18 -0
- data/lib/fog/ecloud/requests/compute/get_location.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_locations.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_login_banner.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_login_banners.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_memory_usage_detail.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_memory_usage_detail_summary.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_monitor.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_monitors.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_network.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_network_summary.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_networks.rb +30 -0
- data/lib/fog/ecloud/requests/compute/get_node.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_nodes.rb +18 -0
- data/lib/fog/ecloud/requests/compute/get_operating_system.rb +24 -0
- data/lib/fog/ecloud/requests/compute/get_operating_system_families.rb +30 -0
- data/lib/fog/ecloud/requests/compute/get_organization.rb +24 -0
- data/lib/fog/ecloud/requests/compute/get_organizations.rb +23 -0
- data/lib/fog/ecloud/requests/compute/get_password_complexity_rule.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_password_complexity_rules.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_physical_device.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_physical_devices.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_process.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_processes.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_public_ip.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_public_ips.rb +31 -0
- data/lib/fog/ecloud/requests/compute/get_rnat.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_rnats.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_role.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_roles.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_row.rb +18 -0
- data/lib/fog/ecloud/requests/compute/get_rows.rb +12 -0
- data/lib/fog/ecloud/requests/compute/get_server.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_server_configuration_option.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_server_configuration_options.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_servers.rb +42 -0
- data/lib/fog/ecloud/requests/compute/get_ssh_key.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_ssh_keys.rb +30 -0
- data/lib/fog/ecloud/requests/compute/get_storage_usage_detail.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_storage_usage_detail_summary.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_support_ticket.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_support_tickets.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_tag.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_tags.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_task.rb +13 -0
- data/lib/fog/ecloud/requests/compute/get_tasks.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_template.rb +21 -0
- data/lib/fog/ecloud/requests/compute/get_templates.rb +48 -0
- data/lib/fog/ecloud/requests/compute/get_trusted_network_group.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_trusted_network_groups.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_user.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_users.rb +9 -0
- data/lib/fog/ecloud/requests/compute/get_virtual_machine_assigned_ips.rb +42 -0
- data/lib/fog/ecloud/requests/compute/groups_create.rb +31 -0
- data/lib/fog/ecloud/requests/compute/groups_delete.rb +26 -0
- data/lib/fog/ecloud/requests/compute/groups_edit.rb +29 -0
- data/lib/fog/ecloud/requests/compute/groups_movedown.rb +9 -0
- data/lib/fog/ecloud/requests/compute/groups_moveup.rb +9 -0
- data/lib/fog/ecloud/requests/compute/internet_service_create.rb +102 -0
- data/lib/fog/ecloud/requests/compute/internet_service_delete.rb +33 -0
- data/lib/fog/ecloud/requests/compute/internet_service_edit.rb +58 -0
- data/lib/fog/ecloud/requests/compute/monitors_create_default.rb +9 -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 +9 -0
- data/lib/fog/ecloud/requests/compute/monitors_create_ping.rb +35 -0
- data/lib/fog/ecloud/requests/compute/monitors_disable.rb +9 -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 +9 -0
- data/lib/fog/ecloud/requests/compute/node_service_create.rb +93 -0
- data/lib/fog/ecloud/requests/compute/node_service_delete.rb +33 -0
- data/lib/fog/ecloud/requests/compute/node_service_edit.rb +39 -0
- data/lib/fog/ecloud/requests/compute/power_off.rb +9 -0
- data/lib/fog/ecloud/requests/compute/power_on.rb +9 -0
- data/lib/fog/ecloud/requests/compute/power_reset.rb +9 -0
- data/lib/fog/ecloud/requests/compute/power_shutdown.rb +9 -0
- data/lib/fog/ecloud/requests/compute/public_ip_activate.rb +9 -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 +21 -0
- data/lib/fog/ecloud/requests/compute/rows_edit.rb +29 -0
- data/lib/fog/ecloud/requests/compute/rows_movedown.rb +9 -0
- data/lib/fog/ecloud/requests/compute/rows_moveup.rb +9 -0
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_create.rb +51 -0
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_delete.rb +9 -0
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_edit.rb +51 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_attach_disk.rb +61 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_copy.rb +116 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_copy_identical.rb +43 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_create_from_template.rb +244 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_delete.rb +46 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_detach_disk.rb +70 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit.rb +45 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_assigned_ips.rb +80 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_hardware_configuration.rb +75 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_import.rb +179 -0
- data/lib/fog/ecloud/requests/compute/virtual_machine_upload_file.rb +28 -0
- data/lib/fog/ecloud/version.rb +5 -0
- data/lib/fog/ecloud.rb +8 -0
- data/spec/minitest_helper.rb +31 -0
- data/tests/compute/helper.rb +27 -0
- data/tests/compute/models/admin_organization_tests.rb +16 -0
- data/tests/compute/models/compute_pool_tests.rb +17 -0
- data/tests/compute/models/detached_disk_tests.rb +26 -0
- data/tests/compute/models/environment_tests.rb +23 -0
- data/tests/compute/models/internet_service_tests.rb +28 -0
- data/tests/compute/models/ip_address_tests.rb +19 -0
- data/tests/compute/models/network_tests.rb +17 -0
- data/tests/compute/models/operating_system_families_tests.rb +13 -0
- data/tests/compute/models/operating_system_tests.rb +22 -0
- data/tests/compute/models/organization_tests.rb +21 -0
- data/tests/compute/models/public_ip_tests.rb +19 -0
- data/tests/compute/models/server_tests.rb +25 -0
- data/tests/compute/models/ssh_key_tests.rb +19 -0
- data/tests/compute/models/template_tests.rb +20 -0
- data/tests/helper.rb +24 -0
- data/tests/helpers/collection_helper.rb +97 -0
- data/tests/helpers/compute/flavors_helper.rb +32 -0
- data/tests/helpers/compute/server_helper.rb +25 -0
- data/tests/helpers/compute/servers_helper.rb +10 -0
- data/tests/helpers/formats_helper.rb +98 -0
- data/tests/helpers/formats_helper_tests.rb +110 -0
- data/tests/helpers/mock_helper.rb +115 -0
- data/tests/helpers/model_helper.rb +31 -0
- data/tests/helpers/responds_to_helper.rb +11 -0
- data/tests/helpers/schema_validator_tests.rb +107 -0
- data/tests/helpers/succeeds_helper.rb +9 -0
- metadata +457 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/location'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class Locations < Fog::Ecloud::Collection
|
7
|
+
model Fog::Compute::Ecloud::Location
|
8
|
+
|
9
|
+
undef_method :create
|
10
|
+
|
11
|
+
identity :href
|
12
|
+
|
13
|
+
def all
|
14
|
+
data = service.get_organization(href).body[:Locations][:Location]
|
15
|
+
load(data)
|
16
|
+
end
|
17
|
+
|
18
|
+
def get(uri)
|
19
|
+
if data = service.get_location(uri)
|
20
|
+
new(data.body)
|
21
|
+
end
|
22
|
+
rescue Fog::Errors::NotFound
|
23
|
+
nil
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class LoginBanner < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :display, :aliases => :Display, :type => :boolean
|
8
|
+
attribute :text, :aliases => :Text
|
9
|
+
|
10
|
+
def id
|
11
|
+
href.scan(/\d+/)[0]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/login_banner'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class LoginBanners < Fog::Ecloud::Collection
|
7
|
+
identity :href
|
8
|
+
|
9
|
+
model Fog::Compute::Ecloud::LoginBanner
|
10
|
+
|
11
|
+
def all
|
12
|
+
data = service.get_login_banners(href).body
|
13
|
+
load(data)
|
14
|
+
end
|
15
|
+
|
16
|
+
def get(uri)
|
17
|
+
if data = service.get_login_banner(uri)
|
18
|
+
new(data.body)
|
19
|
+
end
|
20
|
+
rescue Fog::Errors::NotFound
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class MemoryUsageDetail < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :time, :aliases => :Time
|
8
|
+
attribute :value, :aliases => :Value
|
9
|
+
|
10
|
+
def id
|
11
|
+
href.scan(/\d+/)[0]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/memory_usage_detail'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class MemoryUsageDetailSummary < Fog::Ecloud::Collection
|
7
|
+
identity :href
|
8
|
+
|
9
|
+
model Fog::Compute::Ecloud::MemoryUsageDetail
|
10
|
+
|
11
|
+
def all
|
12
|
+
data = service.get_memory_usage_detail_summary(href).body[:MemoryUsageDetailSummary][:MemoryUsageDetail]
|
13
|
+
load(data)
|
14
|
+
end
|
15
|
+
|
16
|
+
def get(uri)
|
17
|
+
if data = service.get_memory_usage_detail(uri)
|
18
|
+
new(data.body)
|
19
|
+
end
|
20
|
+
rescue Fog::Errors::NotFound
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class Monitor < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :type, :aliases => :Type
|
8
|
+
attribute :other_links, :aliases => :Links
|
9
|
+
attribute :interval, :aliases => :Interval, :type => :integer
|
10
|
+
attribute :response_timeout, :aliases => :ResponseTimeout, :type => :integer
|
11
|
+
attribute :retries, :aliases => :Retries, :type => :integer
|
12
|
+
attribute :downtime, :aliases => :Downtime, :type => :integer
|
13
|
+
attribute :enabled, :aliases => :Enabled, :type => :boolean
|
14
|
+
attribute :request_uri, :aliases => :RequestUri
|
15
|
+
attribute :http_headers, :aliases => :HttpHeaders
|
16
|
+
attribute :response_codes, :aliases => :ResponseCodes
|
17
|
+
attribute :send_string, :aliases => :SendString
|
18
|
+
attribute :receive_string, :aliases => :ReceiveString
|
19
|
+
|
20
|
+
def edit(options = {})
|
21
|
+
href = "#{service.base_path}/internetServices/#{internet_service_id}/monitor?type="
|
22
|
+
case type
|
23
|
+
when "application/vnd.tmrk.cloud.pingMonitor"
|
24
|
+
options[:uri] = href + "ping"
|
25
|
+
data = service.monitors_edit_ping(options).body
|
26
|
+
when "application/vnd.tmrk.cloud.httpMonitor"
|
27
|
+
options[:uri] = href + "http"
|
28
|
+
data = service.monitors_edit_http(options).body
|
29
|
+
when "application/vnd.tmrk.cloud.ecvMonitor"
|
30
|
+
options[:uri] = href + "ecv"
|
31
|
+
data = service.monitors_edit_ecv(options).body
|
32
|
+
end
|
33
|
+
object = collection.from_data(data)
|
34
|
+
end
|
35
|
+
|
36
|
+
def internet_service_id
|
37
|
+
other_links[:Link][:href].scan(/\d+/)[0]
|
38
|
+
end
|
39
|
+
|
40
|
+
def id
|
41
|
+
href.scan(/\d+/)[0]
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/monitor'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class Monitors < Fog::Ecloud::Collection
|
7
|
+
identity :href
|
8
|
+
|
9
|
+
model Fog::Compute::Ecloud::Monitor
|
10
|
+
|
11
|
+
def all
|
12
|
+
data = service.get_monitors(href).body
|
13
|
+
load(data)
|
14
|
+
end
|
15
|
+
|
16
|
+
def get(uri)
|
17
|
+
if data = service.get_monitor(uri)
|
18
|
+
new(data.body)
|
19
|
+
end
|
20
|
+
rescue Fog::Errors::NotFound
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_data(data)
|
25
|
+
new(data)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class Network < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :name, :aliases => :Name
|
8
|
+
attribute :type, :aliases => :Type
|
9
|
+
attribute :other_links, :aliases => :Links, :squash => :Link
|
10
|
+
attribute :address, :aliases => :Address
|
11
|
+
attribute :network_type, :aliases => :NetworkType
|
12
|
+
attribute :broadcast_address, :aliases => :BroadcastAddress
|
13
|
+
attribute :gateway_address, :aliases => :GatewayAddress
|
14
|
+
attribute :rnat_address, :aliases => :RnatAddress
|
15
|
+
|
16
|
+
def rnats
|
17
|
+
@rnats ||= Fog::Compute::Ecloud::Rnats.new(:service => service, :href => "#{service.base_path}/rnats/networks/#{id}")
|
18
|
+
end
|
19
|
+
|
20
|
+
def ips
|
21
|
+
@ips ||= Fog::Compute::Ecloud::IpAddresses.new(:service => service, :href => href)
|
22
|
+
end
|
23
|
+
|
24
|
+
def edit_rnat_association(options)
|
25
|
+
options[:uri] = href
|
26
|
+
data = service.rnat_associations_edit_network(options).body
|
27
|
+
task = Fog::Compute::Ecloud::Tasks.new(:service => service, :href => data[:href])[0]
|
28
|
+
end
|
29
|
+
|
30
|
+
def id
|
31
|
+
href.scan(/\d+/)[0]
|
32
|
+
end
|
33
|
+
|
34
|
+
def environment
|
35
|
+
reload if other_links.nil?
|
36
|
+
environment_href = other_links.find { |l| l[:type] == "application/vnd.tmrk.cloud.environment" }[:href]
|
37
|
+
self.service.environments.get(environment_href)
|
38
|
+
end
|
39
|
+
|
40
|
+
def location
|
41
|
+
environment.id
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/network'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class Networks < Fog::Ecloud::Collection
|
7
|
+
attribute :href, :aliases => :Href
|
8
|
+
|
9
|
+
model Fog::Compute::Ecloud::Network
|
10
|
+
|
11
|
+
def all
|
12
|
+
body = service.get_networks(self.href).body
|
13
|
+
body = body[:Networks] ? body[:Networks][:Network] : body[:Network]
|
14
|
+
data = case body
|
15
|
+
when NilClass then []
|
16
|
+
when Array then body
|
17
|
+
when Hash then [body]
|
18
|
+
end
|
19
|
+
load(data)
|
20
|
+
end
|
21
|
+
|
22
|
+
def get(uri)
|
23
|
+
if data = service.get_network(uri)
|
24
|
+
new(data.body)
|
25
|
+
end
|
26
|
+
rescue Fog::Errors::NotFound
|
27
|
+
nil
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class Node < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :name, :aliases => :Name
|
8
|
+
attribute :type, :aliases => :Type
|
9
|
+
attribute :other_links, :aliases => :Links
|
10
|
+
attribute :ip_address, :aliases => :IpAddress
|
11
|
+
attribute :protocol, :aliases => :Protocol
|
12
|
+
attribute :port, :aliases => :Port, :type => :integer
|
13
|
+
attribute :enabled, :aliases => :Enabled, :type => :boolean
|
14
|
+
attribute :description, :aliases => :Description
|
15
|
+
|
16
|
+
def ready?
|
17
|
+
!self.name.nil?
|
18
|
+
end
|
19
|
+
|
20
|
+
def tasks
|
21
|
+
@tasks ||= Fog::Compute::Ecloud::Tasks.new(:service => service, :href => "#{service.base_path}/tasks/virtualMachines/#{id}")
|
22
|
+
end
|
23
|
+
|
24
|
+
def delete
|
25
|
+
data = service.node_service_delete(href).body
|
26
|
+
self.service.tasks.new(data)
|
27
|
+
end
|
28
|
+
|
29
|
+
def edit(options)
|
30
|
+
options[:uri] = href
|
31
|
+
options[:description] ||= ""
|
32
|
+
options = {:name => name}.merge(options)
|
33
|
+
data = service.node_service_edit(options).body
|
34
|
+
task = Fog::Compute::Ecloud::Tasks.new(:service => service, :href => data[:href])[0]
|
35
|
+
end
|
36
|
+
|
37
|
+
def id
|
38
|
+
href.scan(/\d+/)[0]
|
39
|
+
end
|
40
|
+
|
41
|
+
alias_method :destroy, :delete
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/node'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class Nodes < Fog::Ecloud::Collection
|
7
|
+
identity :href
|
8
|
+
|
9
|
+
model Fog::Compute::Ecloud::Node
|
10
|
+
|
11
|
+
def all
|
12
|
+
data = service.get_nodes(href).body
|
13
|
+
if data[:NodeServices]
|
14
|
+
load(data[:NodeServices][:NodeService])
|
15
|
+
else
|
16
|
+
load([])
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(uri)
|
21
|
+
data = service.get_node(uri).body
|
22
|
+
new(data)
|
23
|
+
rescue Fog::Errors::NotFound
|
24
|
+
nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def create(options)
|
28
|
+
options[:uri] = "#{service.base_path}/nodeServices/internetServices/#{internet_service_id}/action/createNodeService"
|
29
|
+
options[:protocol] ||= "TCP"
|
30
|
+
options[:enabled] ||= true
|
31
|
+
options[:description] ||= ""
|
32
|
+
data = service.node_service_create(options).body
|
33
|
+
object = new(data)
|
34
|
+
end
|
35
|
+
|
36
|
+
def internet_service_id
|
37
|
+
href.scan(/\d+/)[0]
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class OperatingSystem < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :name, :aliases => :Name
|
8
|
+
attribute :type, :aliases => :Type
|
9
|
+
|
10
|
+
def id
|
11
|
+
href.scan(/\d+/)[0]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/operating_system_family'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class OperatingSystemFamilies < Fog::Ecloud::Collection
|
7
|
+
identity :href
|
8
|
+
|
9
|
+
model Fog::Compute::Ecloud::OperatingSystemFamily
|
10
|
+
|
11
|
+
def all
|
12
|
+
data = service.get_operating_system_families(href).body[:OperatingSystemFamily]
|
13
|
+
load(data)
|
14
|
+
end
|
15
|
+
|
16
|
+
def get(uri)
|
17
|
+
if data = service.get_operating_system(uri)
|
18
|
+
new(data.body)
|
19
|
+
end
|
20
|
+
rescue Fog::Errors::NotFound
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class OperatingSystemFamily < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :name, :aliases => :Name
|
8
|
+
attribute :type, :aliases => :Type
|
9
|
+
attribute :operating_system_family, :aliases => :OperatingSystems
|
10
|
+
|
11
|
+
def operating_systems
|
12
|
+
@operating_systems ||= self.service.operating_systems(:data => operating_system_family[:OperatingSystem])
|
13
|
+
end
|
14
|
+
|
15
|
+
def id
|
16
|
+
href.scan(/\d+/)[0]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/operating_system'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class OperatingSystems < Fog::Ecloud::Collection
|
7
|
+
model Fog::Compute::Ecloud::OperatingSystem
|
8
|
+
|
9
|
+
identity :data
|
10
|
+
|
11
|
+
def all
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get(uri)
|
16
|
+
if data = service.get_operating_system(uri)
|
17
|
+
new(data.body)
|
18
|
+
end
|
19
|
+
rescue Fog::Errors::NotFound
|
20
|
+
nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class Organization < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
ignore_attributes :xmlns, :xmlns_xsi, :xmlns_xsd, :xmlns_i
|
8
|
+
|
9
|
+
attribute :name, :aliases => :Name
|
10
|
+
attribute :type, :aliases => :Type
|
11
|
+
attribute :other_links, :aliases => :Links, :squash => :Link
|
12
|
+
|
13
|
+
def locations
|
14
|
+
@locations ||= Fog::Compute::Ecloud::Locations.new( :service => service, :href => href )
|
15
|
+
end
|
16
|
+
|
17
|
+
def environments
|
18
|
+
@environments ||= self.service.environments(:href => href)
|
19
|
+
end
|
20
|
+
|
21
|
+
def tags
|
22
|
+
@tags ||= self.service.tags(:href => "#{service.base_path}/deviceTags/organizations/#{id}")
|
23
|
+
end
|
24
|
+
|
25
|
+
def admin
|
26
|
+
@admin ||= self.service.admin_organizations.new(:href => "#{service.base_path}/admin/organizations/#{id}")
|
27
|
+
end
|
28
|
+
|
29
|
+
def users
|
30
|
+
@users ||= self.service.users(:href => "#{service.base_path}/admin/users/organizations/#{id}")
|
31
|
+
end
|
32
|
+
|
33
|
+
def support_tickets(type = :open)
|
34
|
+
case type
|
35
|
+
when :open
|
36
|
+
@support_tickets ||= Fog::Compute::Ecloud::SupportTickets.new(:service => service, :href => "#{service.base_path}/admin/tickets/organizations/#{id}/active")
|
37
|
+
when :closed
|
38
|
+
@support_tickets ||= Fog::Compute::Ecloud::SupportTickets.new(:service => service, :href => "#{service.base_path}/admin/tickets/organizations/#{id}/closed")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def edit_authentication_levels(options = {})
|
43
|
+
options[:uri] = "#{service.base_path}/admin/organizations/#{id}/authenticationLevels"
|
44
|
+
data = service.admin_edit_authentication_levels(options).body
|
45
|
+
level = Fog::Compute::Ecloud::AdminOrganizations.new(:service => service, :href => data[:href])[0]
|
46
|
+
end
|
47
|
+
|
48
|
+
def edit_password_complexity_rules(options = {})
|
49
|
+
options[:uri] = "#{service.base_path}/admin/organizations/#{id}/passwordComplexityRules"
|
50
|
+
data = service.admin_edit_password_complexity_rules(options).body
|
51
|
+
level = Fog::Compute::Ecloud::PasswordComplexityRules.new(:service => service, :href => data[:href])[0]
|
52
|
+
end
|
53
|
+
|
54
|
+
def edit_login_banner(options = {})
|
55
|
+
options[:uri] = "#{service.base_path}/admin/organizations/#{id}/loginBanner"
|
56
|
+
data = service.admin_edit_login_banner(options).body
|
57
|
+
banner = Fog::Compute::Ecloud::LoginBanners.new(:service => service, :href => data[:href])[0]
|
58
|
+
end
|
59
|
+
|
60
|
+
def enable_support_access(options = {})
|
61
|
+
options[:uri] = "#{service.base_path}/admin/organizations/#{id}/action/enableSupportAccess"
|
62
|
+
service.admin_enable_support_access(options[:uri])
|
63
|
+
end
|
64
|
+
|
65
|
+
def disable_support_access(options = {})
|
66
|
+
options[:uri] = "#{service.base_path}/admin/organizations/#{id}/action/disableSupportAccess"
|
67
|
+
service.admin_disable_support_access(options[:uri])
|
68
|
+
end
|
69
|
+
|
70
|
+
def id
|
71
|
+
href.scan(/\d+/)[0]
|
72
|
+
end
|
73
|
+
|
74
|
+
alias_method :vdcs, :environments
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/organization'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class Organizations < Fog::Ecloud::Collection
|
7
|
+
model Fog::Compute::Ecloud::Organization
|
8
|
+
|
9
|
+
undef_method :create
|
10
|
+
|
11
|
+
identity :href
|
12
|
+
|
13
|
+
def all
|
14
|
+
data = service.get_organizations(organization_uri).body
|
15
|
+
load(data[:Organization])
|
16
|
+
end
|
17
|
+
|
18
|
+
def get(uri)
|
19
|
+
if data = service.get_organization(uri)
|
20
|
+
new(data.body)
|
21
|
+
end
|
22
|
+
rescue Fog::Errors::NotFound
|
23
|
+
nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def organization_uri
|
27
|
+
@organization_uri ||= service.default_organization_uri
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def organization_uri=(new_organization_uri)
|
33
|
+
@organization_uri = new_organization_uri
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class PasswordComplexityRule < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :rule_type, :aliases => :RuleType
|
8
|
+
attribute :custom_rules, :aliases => :CustomRules
|
9
|
+
attribute :description, :aliases => :Description
|
10
|
+
|
11
|
+
def minimum_characters
|
12
|
+
custom_rules[:MinimumCharacters]
|
13
|
+
end
|
14
|
+
|
15
|
+
def minimum_upper_case_characters
|
16
|
+
custom_rules[:MinimumUpperCaseCharacters]
|
17
|
+
end
|
18
|
+
|
19
|
+
def minimum_lower_case_characters
|
20
|
+
custom_rules[:MinimumLowerCaseCharacters]
|
21
|
+
end
|
22
|
+
|
23
|
+
def minimum_numeric_characters
|
24
|
+
custom_rules[:MinimumNumericCharacters]
|
25
|
+
end
|
26
|
+
|
27
|
+
def minimum_special_characters
|
28
|
+
custom_rules[:MinimumSpecialCharacters]
|
29
|
+
end
|
30
|
+
|
31
|
+
def maximum_consecutive_characters_from_prior_password
|
32
|
+
custom_rules[:MaximumConsecutiveCharactersFromPriorPassword]
|
33
|
+
end
|
34
|
+
|
35
|
+
def minimum_lifetime_restriction
|
36
|
+
custom_rules[:MinimumLifetimeRestriction]
|
37
|
+
end
|
38
|
+
|
39
|
+
def minimum_generations_before_reuse
|
40
|
+
custom_rules[:MinimumGenerationsBeforeReuse]
|
41
|
+
end
|
42
|
+
|
43
|
+
def id
|
44
|
+
href.scan(/\d+/)[0]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'fog/ecloud/models/compute/password_complexity_rule'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Ecloud
|
6
|
+
class PasswordComplexityRules < Fog::Ecloud::Collection
|
7
|
+
identity :href
|
8
|
+
|
9
|
+
model Fog::Compute::Ecloud::PasswordComplexityRule
|
10
|
+
|
11
|
+
def all
|
12
|
+
data = service.get_password_complexity_rules(href).body
|
13
|
+
load(data)
|
14
|
+
end
|
15
|
+
|
16
|
+
def get(uri)
|
17
|
+
if data = service.get_password_complexity_rule(uri)
|
18
|
+
new(data.body)
|
19
|
+
end
|
20
|
+
rescue Fog::Errors::NotFound
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Ecloud
|
4
|
+
class PhysicalDevice < Fog::Ecloud::Model
|
5
|
+
identity :href
|
6
|
+
|
7
|
+
attribute :name, :aliases => :Name
|
8
|
+
attribute :type, :aliases => :Type
|
9
|
+
attribute :tags, :aliases => :Tags
|
10
|
+
attribute :layout, :aliases => :Layout
|
11
|
+
attribute :network_host, :aliases => :NetworkHost
|
12
|
+
attribute :classification, :aliases => :Classification
|
13
|
+
attribute :model, :aliases => :Model
|
14
|
+
|
15
|
+
def id
|
16
|
+
href.scan(/\d+/)[0]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|