class Delphix::Group
Public Class Methods
create(name)
click to toggle source
class methods
# File lib/delphix/group.rb, line 25 def self.create(name) body = { :type => 'Group', :name => name } ref = Delphix.post('/resources/json/delphix/group', body.to_json)['result'] # create a new skeleton group object group = Delphix::Group.new ref # refresh the object from DE group.refresh_details group end
list()
click to toggle source
# File lib/delphix/group.rb, line 41 def self.list groups = Delphix::BaseArray.new result = Delphix.get('/resources/json/delphix/group')['result'] result.each do |group| groups << Delphix::Group.new(group['reference'],group) end groups end
new(reference, details=nil)
click to toggle source
Calls superclass method
Delphix::Base::new
# File lib/delphix/group.rb, line 5 def initialize(reference, details=nil) super(reference, details) end
Public Instance Methods
base_endpoint()
click to toggle source
inherited operations
# File lib/delphix/group.rb, line 19 def base_endpoint '/resources/json/delphix/group' end
delete()
click to toggle source
basic operations
# File lib/delphix/group.rb, line 11 def delete Delphix::Response.new( Delphix.delete("#{base_endpoint}/#{reference}")) end