Permalink
Browse files

add update_snapshot_name api support

add a required field 'name' to Snapshot message and a new api
so user can add a brief, human readable name to each snapshot.

Change-Id: I9f95f6d09953a4a79072a15531dfa4a4d483713f
  • Loading branch information...
1 parent b45f8e0 commit 2d4b47ea52487897fbf4d9292a1f14cfc4f2d5b8 @andl andl committed Jul 17, 2012
Showing with 12 additions and 2 deletions.
  1. +5 −0 lib/services/api/clients/service_gateway_client.rb
  2. +5 −0 lib/services/api/messages.rb
  3. +2 −2 vcap_common.gemspec
@@ -98,6 +98,11 @@ def snapshot_details(args)
Snapshot.decode(resp)
end
+ def update_snapshot_name(args)
+ perform_request(:post, "/gateway/v1/configurations/#{args[:service_id]}/snapshots/#{args[:snapshot_id]}/name", args[:msg])
+ EMPTY_REQUEST
+ end
+
def rollback_snapshot(args)
resp = perform_request(:put, "/gateway/v1/configurations/#{args[:service_id]}/snapshots/#{args[:snapshot_id]}")
Job.decode(resp)
@@ -130,12 +130,17 @@ class Snapshot < JsonMessage
required :snapshot_id, String
required :date, String
required :size, Integer
+ required :name, String
end
class SnapshotList < JsonMessage
required :snapshots, [Object]
end
+ class UpdateSnapshotNameRequest < JsonMessage
+ required :name, String
+ end
+
class Job < JsonMessage
required :job_id, String
required :status, String
View
@@ -1,7 +1,7 @@
spec = Gem::Specification.new do |s|
s.name = 'vcap_common'
- s.version = '2.0.5'
- s.date = '2012-08-14'
+ s.version = '2.0.6'
+ s.date = '2012-08-17'
s.summary = 'vcap common'
s.homepage = "http://github.com/vmware-ac/core"
s.description = 'common vcap classes/methods'

0 comments on commit 2d4b47e

Please sign in to comment.