Class: Fog::OpenStack::DNS::V2

Inherits:
Service
  • Object
show all
Defined in:
lib/fog/openstack/dns/v2.rb,
lib/fog/openstack/dns/v2/models/pool.rb,
lib/fog/openstack/dns/v2/models/zone.rb,
lib/fog/openstack/dns/v2/models/pools.rb,
lib/fog/openstack/dns/v2/models/zones.rb,
lib/fog/openstack/dns/v2/models/recordset.rb,
lib/fog/openstack/dns/v2/models/recordsets.rb,
lib/fog/openstack/dns/v2/requests/get_pool.rb,
lib/fog/openstack/dns/v2/requests/get_zone.rb,
lib/fog/openstack/dns/v2/requests/get_quota.rb,
lib/fog/openstack/dns/v2/requests/list_pools.rb,
lib/fog/openstack/dns/v2/requests/list_zones.rb,
lib/fog/openstack/dns/v2/requests/create_zone.rb,
lib/fog/openstack/dns/v2/requests/delete_zone.rb,
lib/fog/openstack/dns/v2/requests/update_zone.rb,
lib/fog/openstack/dns/v2/requests/update_quota.rb,
lib/fog/openstack/dns/v2/requests/get_recordset.rb,
lib/fog/openstack/dns/v2/requests/list_recordsets.rb,
lib/fog/openstack/dns/v2/requests/create_recordset.rb,
lib/fog/openstack/dns/v2/requests/delete_recordset.rb,
lib/fog/openstack/dns/v2/requests/update_recordset.rb,
lib/fog/openstack/dns/v2/models/zone_transfer_accept.rb,
lib/fog/openstack/dns/v2/models/zone_transfer_accepts.rb,
lib/fog/openstack/dns/v2/models/zone_transfer_request.rb,
lib/fog/openstack/dns/v2/models/zone_transfer_requests.rb,
lib/fog/openstack/dns/v2/requests/get_zone_transfer_accept.rb,
lib/fog/openstack/dns/v2/requests/get_zone_transfer_request.rb,
lib/fog/openstack/dns/v2/requests/list_zone_transfer_accepts.rb,
lib/fog/openstack/dns/v2/requests/create_zone_transfer_accept.rb,
lib/fog/openstack/dns/v2/requests/list_zone_transfer_requests.rb,
lib/fog/openstack/dns/v2/requests/create_zone_transfer_request.rb,
lib/fog/openstack/dns/v2/requests/delete_zone_transfer_request.rb,
lib/fog/openstack/dns/v2/requests/update_zone_transfer_request.rb

Defined Under Namespace

Classes: Mock, Pool, Pools, Real, Recordset, Recordsets, Zone, ZoneTransferAccept, ZoneTransferAccepts, ZoneTransferRequest, ZoneTransferRequests, Zones

Constant Summary collapse

SUPPORTED_VERSIONS =
/v2/

Class Method Summary collapse

Class Method Details

.setup_headers(options) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/fog/openstack/dns/v2.rb', line 64

def self.setup_headers(options)
  # user needs to have admin privileges to ask for all projects
  all_projects = options.delete(:all_projects) || false

  # user needs to have admin privileges to impersonate another project
  # don't ask for all and one project at the same time
  project_id = options.delete(:project_id) unless all_projects

  headers = {'X-Auth-All-Projects' => all_projects}
  headers['X-Auth-Sudo-Project-Id'] = project_id unless project_id.nil?

  [headers, options]
end