You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by David Lutterkort <lu...@redhat.com> on 2013/02/20 00:51:25 UTC
Re: [PATCH 1/3] DTACLOUD-409: added forward_group_template view
files and forward_group_template.rb to entities
On Tue, 2013-01-22 at 11:39 +0300, martha.c.chumo@gmail.com wrote:
> From: NjeriChelimo <ma...@gmail.com>
>
> ---
> clients/cimi/app.rb | 1 +
> clients/cimi/lib/entities.rb | 1 +
> .../cimi/lib/entities/forwarding_group_template.rb | 30 ++++++++++++++++++++
> .../views/forwarding_group_templates/index.haml | 24 ++++++++++++++++
> .../views/forwarding_group_templates/show.haml | 30 ++++++++++++++++++++
> 5 files changed, 86 insertions(+)
> create mode 100644 clients/cimi/lib/entities/forwarding_group_template.rb
> create mode 100644 clients/cimi/views/forwarding_group_templates/index.haml
> create mode 100644 clients/cimi/views/forwarding_group_templates/show.haml
ACK & pushed
One nit:
> diff --git a/clients/cimi/lib/entities/forwarding_group_template.rb b/clients/cimi/lib/entities/forwarding_group_template.rb
> new file mode 100644
> index 0000000..1636ad8
> --- /dev/null
> +++ b/clients/cimi/lib/entities/forwarding_group_template.rb
> @@ -0,0 +1,30 @@
...
> +class CIMI::Frontend::ForwardingGroupTemplate < CIMI::Frontend::Entity
> +
> + get '/cimi/forwarding_group_templates/:id' do
> + fg_template_xml = get_entity('forwarding_group_templates', params[:id], credentials)
Ultimately, we need to get rid of the get_entity helper in its current
form. Instead, URL's for individual collection members should have the
full URL for that member as the :id (suitably URL encoded, of course) so
that the above becomes
fg_template_xml = get_member(params[:id], credentials)
which does little more than a 'GET params[:id]' with suitable headers.
David