You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2011/11/24 12:10:25 UTC

[PATCH core 2/5] CIMI: Implemented :show operation for :machine_configuration model in Rabbit

From: Michal Fojtik <mf...@redhat.com>


Signed-off-by: Michal fojtik <mf...@redhat.com>
---
 server/lib/cimi/server.rb |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/server/lib/cimi/server.rb b/server/lib/cimi/server.rb
index ba925fa..b179c8f 100644
--- a/server/lib/cimi/server.rb
+++ b/server/lib/cimi/server.rb
@@ -19,7 +19,7 @@ require 'cimi/helpers/cmwgapp_helper'
 
 set :version, '0.1.0'
 
-include Deltacloud::Drivers
+include CIMI::Drivers
 set :drivers, Proc.new { driver_config }
 
 STOREROOT = File.join($top_srcdir, 'lib', 'cimi', 'data')
@@ -108,9 +108,12 @@ global_collection :machine_configurations do
   end
 
   operation :show do
-    description "Show specific machine configuration."
-    with_capability :hardware_profile
-    param :id,          :string,    :required
+
+    description "The Machine Configuration entity represents the set of configuration values "+
+      "that define the (virtual) hardware resources of a to-be-realized Machine Instance.."
+
+    param :id, :string, :required
+
     control do
       @profile =  driver.hardware_profile(credentials, params[:id])
       if @profile
@@ -127,6 +130,7 @@ global_collection :machine_configurations do
         report_error(404)
       end
     end
+
   end
 end
 
-- 
1.7.4.4


Re: [PATCH core 2/5] CIMI: Implemented :show operation for :machine_configuration model in Rabbit

Posted by "marios@redhat.com" <ma...@redhat.com>.
ACK to the series (reminder remove + include CIMI::Drivers)

On 24/11/11 13:10, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mf...@redhat.com>
> 
> 
> Signed-off-by: Michal fojtik <mf...@redhat.com>
> ---
>  server/lib/cimi/server.rb |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/server/lib/cimi/server.rb b/server/lib/cimi/server.rb
> index ba925fa..b179c8f 100644
> --- a/server/lib/cimi/server.rb
> +++ b/server/lib/cimi/server.rb
> @@ -19,7 +19,7 @@ require 'cimi/helpers/cmwgapp_helper'
>  
>  set :version, '0.1.0'
>  
> -include Deltacloud::Drivers
> +include CIMI::Drivers
>  set :drivers, Proc.new { driver_config }
>  
>  STOREROOT = File.join($top_srcdir, 'lib', 'cimi', 'data')
> @@ -108,9 +108,12 @@ global_collection :machine_configurations do
>    end
>  
>    operation :show do
> -    description "Show specific machine configuration."
> -    with_capability :hardware_profile
> -    param :id,          :string,    :required
> +
> +    description "The Machine Configuration entity represents the set of configuration values "+
> +      "that define the (virtual) hardware resources of a to-be-realized Machine Instance.."
> +
> +    param :id, :string, :required
> +
>      control do
>        @profile =  driver.hardware_profile(credentials, params[:id])
>        if @profile
> @@ -127,6 +130,7 @@ global_collection :machine_configurations do
>          report_error(404)
>        end
>      end
> +
>    end
>  end
>