mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Add zonefile generation procedure
This commit is contained in:
parent
f5ce88b548
commit
ac4b63f390
23 changed files with 370 additions and 255 deletions
58
db/migrate/20141120140837_add_ee_domain_objects.rb
Normal file
58
db/migrate/20141120140837_add_ee_domain_objects.rb
Normal file
|
@ -0,0 +1,58 @@
|
|||
class AddEeDomainObjects < ActiveRecord::Migration
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
def up
|
||||
r = Registrar.create(
|
||||
name: 'EIS',
|
||||
reg_no: '123321',
|
||||
address: 'Tallinn',
|
||||
country: Country.estonia
|
||||
)
|
||||
|
||||
c = Contact.create(
|
||||
name: 'EIS',
|
||||
phone: '+372.123321',
|
||||
email: 'info@testing.ee',
|
||||
ident: '123321',
|
||||
ident_type: 'ico',
|
||||
address: Address.create(
|
||||
city: 'Tallinn',
|
||||
country: Country.estonia
|
||||
),
|
||||
registrar: r
|
||||
)
|
||||
|
||||
EppUser.create(
|
||||
registrar: r,
|
||||
username: 'testeis',
|
||||
password: 'testeis',
|
||||
active: true
|
||||
)
|
||||
|
||||
Domain.create(
|
||||
name: 'ee',
|
||||
valid_to: Date.new(9999, 1, 1),
|
||||
period: 1,
|
||||
period_unit: 'y',
|
||||
owner_contact: c,
|
||||
nameservers: [
|
||||
Nameserver.create(hostname: 'ns.tld.ee', ipv4: '195.43.87.10'),
|
||||
Nameserver.create(hostname: 'b.tld.ee', ipv4: '194.146.106.110', ipv6: '2001:67c:1010:28::53'),
|
||||
Nameserver.create(hostname: 'e.tld.ee', ipv4: '204.61.216.36', ipv6: '2001:678:94:53::53'),
|
||||
Nameserver.create(hostname: 'ee.aso.ee', ipv4: '213.184.51.122', ipv6: '2a02:88:0:21::2'),
|
||||
Nameserver.create(hostname: 'ns.ut.ee', ipv4: '193.40.5.99', ipv6: ''),
|
||||
Nameserver.create(hostname: 'sunic.sunet.se', ipv4: '195.80.103.202')
|
||||
],
|
||||
admin_contacts: [c],
|
||||
registrar: r
|
||||
)
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
||||
def down
|
||||
Domain.find_by(name: 'ee').destroy
|
||||
EppUser.find_by(username: 'testeis').destroy
|
||||
Contact.find_by(name: 'EIS').destroy
|
||||
Registrar.find_by(name: 'EIS').destroy
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue