pls ignore - new version of patch attached to the jira ticket https://issues.apache.org/jira/browse/DTACLOUD-105
On 14/12/11 19:02, [email protected] wrote: > From: marios <[email protected]> > > Addresses https://issues.apache.org/jira/browse/DTACLOUD-105 > > Signed-off-by: marios <[email protected]> > --- > server/lib/deltacloud/server.rb | 2 ++ > server/views/api/show.html.haml | 2 ++ > 2 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb > index 88250a6..c6e5622 100644 > --- a/server/lib/deltacloud/server.rb > +++ b/server/lib/deltacloud/server.rb > @@ -106,6 +106,8 @@ get "#{settings.root_url}\/?" do > return [401, 'Authentication failed'] unless > driver.valid_credentials?(credentials) > end > @collections = [:drivers] + driver.supported_collections > + #could use driver.providers - but that will require credentials for /api > ... > + @providers = > Deltacloud::Drivers::driver_config["#{driver.name}".to_sym][:entrypoints]["#{driver.name}"].keys > unless > driver_provider(Deltacloud::Drivers::driver_config["#{driver.name}".to_sym]).empty? > respond_to do |format| > format.xml { haml :"api/show" } > format.json do > diff --git a/server/views/api/show.html.haml b/server/views/api/show.html.haml > index 19526c2..c1417c1 100644 > --- a/server/views/api/show.html.haml > +++ b/server/views/api/show.html.haml > @@ -1,5 +1,7 @@ > =header "Deltacloud API #{settings.version}", :back => 'false' > =subheader "#{driver_symbol}@#{Thread::current[:provider] || > ENV['API_PROVIDER'] || 'default'}" > +- if @providers > + =subheader @providers.map{|p| link_to "#{p} ", > "#{settings.root_url}\;provider=#{p}" } > > %div{ :'data-role' => :content, :'data-theme' => 'c'} > %ul{ :'data-role' => :listview, :'data-inset' => 'true'}
