mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-20 17:56:11 +02:00
Second revision of Domain model draft
This commit is contained in:
parent
523c699865
commit
2b91a3c1d1
12 changed files with 561 additions and 33 deletions
0
src/epp/__init__.py
Normal file
0
src/epp/__init__.py
Normal file
40
src/epp/mock_epp.py
Normal file
40
src/epp/mock_epp.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
"""
|
||||
This file defines a number of mock functions which can be used to simulate
|
||||
communication with the registry until that integration is implemented.
|
||||
"""
|
||||
from datetime import datetime
|
||||
|
||||
def domain_check(_):
|
||||
""" Is domain available for registration? """
|
||||
return True
|
||||
|
||||
def domain_info(domain):
|
||||
""" What does the registry know about this domain? """
|
||||
return {
|
||||
"name": domain,
|
||||
"roid": "EXAMPLE1-REP",
|
||||
"status": ["ok"],
|
||||
"registrant": "jd1234",
|
||||
"contact": {
|
||||
"admin": "sh8013",
|
||||
"tech": None,
|
||||
},
|
||||
"ns": {
|
||||
f"ns1.{domain}",
|
||||
f"ns2.{domain}",
|
||||
},
|
||||
"host": [
|
||||
f"ns1.{domain}",
|
||||
f"ns2.{domain}",
|
||||
],
|
||||
"sponsor": "ClientX",
|
||||
"creator": "ClientY",
|
||||
# TODO: think about timezones
|
||||
"creation_date": datetime.today(),
|
||||
"updator": "ClientX",
|
||||
"last_update_date": datetime.today(),
|
||||
"expiration_date": datetime.today(),
|
||||
"last_transfer_date": datetime.today(),
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue