Sha256: 7d389f5fc29305038ede5d0274d3c6f1f77214ec1feab91212047aad75d599b9

Contents?: true

Size: 1.12 KB

Versions: 21

Compression:

Stored size: 1.12 KB

Contents

def test
  connection = Fog::DNS::Google.new

  puts 'Create a Zone...'
  puts '----------------'
  zone = connection.zones.create(name: 'mytestdomain', domain: 'example.org.', description: 'This is my test domain')

  puts 'List all Zones...'
  puts '-----------------'
  connection.zones.all

  puts 'Get the Zone...'
  puts '---------------'
  zone = connection.zones.get(zone.id)

  puts 'Create an "A" Record...'
  puts '-----------------------'
  record = zone.records.create(name: 'test.example.org.', type: 'A', ttl: 3600, rrdatas: ['192.168.1.1'])

  puts 'Get the Zone Resource Record Sets...'
  puts '------------------------------------'
  zone.records

  puts 'Get the Record...'
  puts '-----------------'
  record = connection.records(zone: zone).get(name: 'test.example.org.', type: 'A')

  puts 'Modify the "A" Record...'
  puts '------------------------'
  record.modify(ttl: 2600)

  puts 'Delete the "A" Record...'
  puts '------------------------'
  record.destroy

  puts 'Get the Zone Changes...'
  puts '-----------------------'
  zone.changes

  puts 'Delete the Zone...'
  puts '------------------'
  zone.destroy
end

Version data entries

21 entries across 19 versions & 5 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-google-0.1.0/examples/dns/zones.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/examples/dns/zones.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-google-0.1.0/examples/dns/zones.rb
fog-google-0.1.3 examples/dns/zones.rb
fog-google-0.1.2 examples/dns/zones.rb
fog-google-0.1.1 examples/dns/zones.rb
fog-google-0.1.0 examples/dns/zones.rb
fog-google-0.0.9 examples/dns/zones.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-google-0.0.7/examples/dns/zones.rb
fog-google-0.0.7 examples/dns/zones.rb
fog-google-0.0.6 examples/dns/zones.rb
fog-google-0.0.5 examples/dns/zones.rb
fog-google-0.0.4 examples/dns/zones.rb
fog-google-0.0.3 examples/dns/zones.rb
fog-google-0.0.2 examples/dns/zones.rb
fog-1.29.0 lib/fog/google/examples/dns/zones.rb
fog-1.28.0 lib/fog/google/examples/dns/zones.rb
fog-1.27.0 lib/fog/google/examples/dns/zones.rb
fog-1.26.0 lib/fog/google/examples/dns/zones.rb
fog-1.25.0 lib/fog/google/examples/dns/zones.rb