Class: Fog::DNS::OpenStack

Inherits:
Service
  • Object
show all
Defined in:
lib/fog/openstack.rb,
lib/fog/dns/openstack.rb,
lib/fog/dns/openstack/v1.rb,
lib/fog/dns/openstack/v2.rb,
lib/fog/dns/openstack/v2/models/zone.rb,
lib/fog/dns/openstack/v2/models/zones.rb,
lib/fog/dns/openstack/v2/models/recordset.rb,
lib/fog/dns/openstack/v2/requests/get_zone.rb,
lib/fog/dns/openstack/v2/models/recordsets.rb,
lib/fog/dns/openstack/v1/requests/get_quota.rb,
lib/fog/dns/openstack/v2/requests/get_quota.rb,
lib/fog/dns/openstack/v2/requests/list_zones.rb,
lib/fog/dns/openstack/v2/requests/create_zone.rb,
lib/fog/dns/openstack/v2/requests/delete_zone.rb,
lib/fog/dns/openstack/v2/requests/update_zone.rb,
lib/fog/dns/openstack/v1/requests/update_quota.rb,
lib/fog/dns/openstack/v1/requests/list_domains.rb,
lib/fog/dns/openstack/v2/requests/update_quota.rb,
lib/fog/dns/openstack/v2/requests/get_recordset.rb,
lib/fog/dns/openstack/v2/requests/list_recordsets.rb,
lib/fog/dns/openstack/v2/requests/create_recordset.rb,
lib/fog/dns/openstack/v2/requests/delete_recordset.rb,
lib/fog/dns/openstack/v2/requests/update_recordset.rb

Defined Under Namespace

Classes: V1, V2

Class Method Summary collapse

Class Method Details

.new(args = {}) ⇒ Object

Fog::DNS::OpenStack.new() will return a Fog::DNS::OpenStack::V2 or a Fog::DNS::OpenStack::V1, choosing the latest available


6
7
8
9
10
11
12
13
14
15
# File 'lib/fog/dns/openstack.rb', line 6

def self.new(args = {})
  @openstack_auth_uri = URI.parse(args[:openstack_auth_url]) if args[:openstack_auth_url]
  if inspect == 'Fog::DNS::OpenStack'
    service = Fog::DNS::OpenStack::V2.new(args) unless args.empty?
    service ||= Fog::DNS::OpenStack::V1.new(args)
  else
    service = Fog::Service.new(args)
  end
  service
end