You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by dk...@apache.org on 2013/06/04 13:20:21 UTC
git commit: CIMI Systems: fixed id not being set for
SystemSystemCollection. This was missed in the patch for DTACLOUD-559 (commit
640405627827bdf0d38e3418647d2d36fd272d74) Also,
applied name change of add_/remove_ methods to collections.
Updated Branches:
refs/heads/master 93e0f7f97 -> 51fe82160
CIMI Systems: fixed id not being set for SystemSystemCollection.
This was missed in the patch for DTACLOUD-559
(commit 640405627827bdf0d38e3418647d2d36fd272d74)
Also, applied name change of add_/remove_ methods to collections.
https://issues.apache.org/jira/browse/DTACLOUD-559
https://github.com/deltacloud/deltacloud-core/pull/28
https://github.com/deltacloud/deltacloud-core/pull/27
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/51fe8216
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/51fe8216
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/51fe8216
Branch: refs/heads/master
Commit: 51fe82160f07bef9460b4e6ca519b56b73cb2169
Parents: 93e0f7f
Author: Dies Koper <di...@fast.au.fujitsu.com>
Authored: Mon Jun 3 13:14:31 2013 +1000
Committer: Dies Koper <di...@fast.au.fujitsu.com>
Committed: Tue Jun 4 21:17:59 2013 +1000
----------------------------------------------------------------------
server/lib/cimi/collections/systems.rb | 32 ++++++++++++------------
server/lib/cimi/service/system_system.rb | 4 +-
2 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/51fe8216/server/lib/cimi/collections/systems.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/systems.rb b/server/lib/cimi/collections/systems.rb
index db8fe68..d08d581 100644
--- a/server/lib/cimi/collections/systems.rb
+++ b/server/lib/cimi/collections/systems.rb
@@ -114,64 +114,64 @@ module CIMI::Collections
description 'List system\'s systems'
generate_system_subcollection_index_operation :with_capability => :system_systems
generate_system_subcollection_show_operation :with_capability => :system_systems
- generate_add_to_system_operation :with_capability => :add_system_to_system
- generate_remove_from_system_operation :with_capability => :remove_system_from_system
+ generate_add_to_system_operation :with_capability => :create_system_system
+ generate_remove_from_system_operation :with_capability => :destroy_system_system
end
collection :machines, :with_id => :ent_id do
description 'List system\'s machines'
generate_system_subcollection_index_operation :with_capability => :system_machines
generate_system_subcollection_show_operation :with_capability => :system_machines
- generate_add_to_system_operation :with_capability => :add_machine_to_system
- generate_remove_from_system_operation :with_capability => :remove_machine_from_system
+ generate_add_to_system_operation :with_capability => :create_system_machine
+ generate_remove_from_system_operation :with_capability => :destroy_system_machine
end
collection :credentials, :with_id => :ent_id do
description 'List system\'s credentials'
generate_system_subcollection_index_operation :with_capability => :system_credentials
generate_system_subcollection_show_operation :with_capability => :system_credentials
- generate_add_to_system_operation :with_capability => :add_credential_to_system
- generate_remove_from_system_operation :with_capability => :remove_credential_from_system
+ generate_add_to_system_operation :with_capability => :create_system_credential
+ generate_remove_from_system_operation :with_capability => :destroy_system_credential
end
collection :volumes, :with_id => :ent_id do
description 'List system\'s volumes'
generate_system_subcollection_index_operation :with_capability => :system_volumes
generate_system_subcollection_show_operation :with_capability => :system_volumes
- generate_add_to_system_operation :with_capability => :add_volume_to_system
- generate_remove_from_system_operation :with_capability => :remove_volume_from_system
+ generate_add_to_system_operation :with_capability => :create_system_volume
+ generate_remove_from_system_operation :with_capability => :destroy_system_volume
end
collection :networks, :with_id => :ent_id do
description 'List system\'s networks'
generate_system_subcollection_index_operation :with_capability => :system_networks
generate_system_subcollection_show_operation :with_capability => :system_networks
- generate_add_to_system_operation :with_capability => :add_network_to_system
- generate_remove_from_system_operation :with_capability => :remove_network_from_system
+ generate_add_to_system_operation :with_capability => :create_system_network
+ generate_remove_from_system_operation :with_capability => :destroy_system_network
end
collection :network_ports, :with_id => :ent_id do
description 'List system\'s network ports'
generate_system_subcollection_index_operation :with_capability => :system_network_ports
generate_system_subcollection_show_operation :with_capability => :system_network_ports
- generate_add_to_system_operation :with_capability => :add_network_port_to_system
- generate_remove_from_system_operation :with_capability => :remove_network_port_from_system
+ generate_add_to_system_operation :with_capability => :create_system_network_port
+ generate_remove_from_system_operation :with_capability => :destroy_system_network_port
end
collection :addresses, :with_id => :ent_id do
description 'List system\'s addresses'
generate_system_subcollection_index_operation :with_capability => :system_addresses
generate_system_subcollection_show_operation :with_capability => :system_addresses
- generate_add_to_system_operation :with_capability => :add_addresses_to_system
- generate_remove_from_system_operation :with_capability => :remove_addresses_from_system
+ generate_add_to_system_operation :with_capability => :create_system_addresses
+ generate_remove_from_system_operation :with_capability => :destroy_system_addresses
end
collection :forwarding_groups, :with_id => :ent_id do
description 'List system\'s forwarding groups'
generate_system_subcollection_index_operation :with_capability => :system_forwarding_groups
generate_system_subcollection_show_operation :with_capability => :system_forwarding_groups
- generate_add_to_system_operation :with_capability => :add_forwarding_groups_to_system
- generate_remove_from_system_operation :with_capability => :remove_forwarding_groups_from_system
+ generate_add_to_system_operation :with_capability => :create_system_forwarding_groups
+ generate_remove_from_system_operation :with_capability => :destroy_system_forwarding_groups
end
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/51fe8216/server/lib/cimi/service/system_system.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/service/system_system.rb b/server/lib/cimi/service/system_system.rb
index 0787f26..24bda40 100644
--- a/server/lib/cimi/service/system_system.rb
+++ b/server/lib/cimi/service/system_system.rb
@@ -28,8 +28,8 @@ class CIMI::Service::SystemSystem < CIMI::Service::Base
def self.collection_for_system(system_id, context)
system_systems = self.find(system_id, context)
- systems_url = context.system_systems_url(system_id) if context.driver.has_capability? :add_systems_to_system
- CIMI::Model::SystemSystem.list(systems_url, system_systems, :add_url => systems_url)
+ systems_url = context.system_systems_url(system_id)
+ CIMI::Model::SystemSystem.list(systems_url, system_systems, :add_url => (context.driver.has_capability?(:create_system_system) ? systems_url : nil))
end
end