Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Greenhost
Cloud API
Commits
59ad96a3
Unverified
Commit
59ad96a3
authored
Dec 09, 2019
by
Maarten de Waard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ttl argument for create_domain_record function
parent
e972eaaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
greenhost_cloud/cosmos.py
greenhost_cloud/cosmos.py
+4
-2
setup.py
setup.py
+1
-1
No files found.
greenhost_cloud/cosmos.py
View file @
59ad96a3
...
...
@@ -59,7 +59,8 @@ def request_api(resource: str, request_type: str = 'GET',
# API calls
def
create_domain_record
(
domain
:
str
,
name
:
str
,
data
:
str
,
record_type
:
str
=
'A'
,
update
:
bool
=
False
):
record_type
:
str
=
'A'
,
update
:
bool
=
False
,
ttl
:
int
=
3600
):
"""Create domain record.
If 'update' is set to True, the record will be updated if it exists.
...
...
@@ -69,7 +70,8 @@ def create_domain_record(domain: str, name: str, data: str,
record
=
{
'name'
:
name
,
'data'
:
data
,
'type'
:
record_type
'type'
:
record_type
,
'ttl'
:
ttl
}
# Check if record exists
existing_record
=
get_domain_record_by_name
(
domain
=
domain
,
name
=
name
,
...
...
setup.py
View file @
59ad96a3
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"greenhost_cloud"
,
version
=
"0.1.
1
"
,
version
=
"0.1.
2
"
,
author
=
"Greenhost"
,
author_email
=
"info@greenhost.net"
,
description
=
"Create and manipulate Greenhost VPSs via the command line or python functions."
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment