Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kevin Lyda
zone2gandi
Commits
cac79d7e
Commit
cac79d7e
authored
Jan 20, 2017
by
Kevin Lyda
💬
Browse files
Set modeline.
parent
24351097
Changes
5
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
cac79d7e
# -*- coding: utf-8 -*-
# c-basic-offset: 4; indent-tabs-mode: nil
# vi: set shiftwidth=4 expandtab:
# :indentSize=4:noTabs=true:
"""setup.py: setuptools control."""
...
...
zone2gandi-runner.py
View file @
cac79d7e
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# c-basic-offset: 4; indent-tabs-mode: nil
# vi: set shiftwidth=4 expandtab:
# :indentSize=4:noTabs=true:
"""Convenience wrapper for running bootstrap directly from source tree."""
from
bootstrap.bootstrap
import
main
if
__name__
==
'__main__'
:
main
()
zone2gandi/__main__.py
View file @
cac79d7e
# -*- coding: utf-8 -*-
# c-basic-offset: 4; indent-tabs-mode: nil
# vi: set shiftwidth=4 expandtab:
# :indentSize=4:noTabs=true:
"""zone2gandi.__main__: called when zone2gandi directory is called as script."""
...
...
zone2gandi/bootstrap.py
View file @
cac79d7e
# -*- coding: utf-8 -*-
# c-basic-offset: 4; indent-tabs-mode: nil
# vi: set shiftwidth=4 expandtab:
# :indentSize=4:noTabs=true:
"""zone2gandi.zone2gandi: provides entry point main()."""
...
...
zone2gandi/zone2gandi.py
View file @
cac79d7e
# -*- coding: utf-8 -*-
# c-basic-offset: 4; indent-tabs-mode: nil
# vi: set shiftwidth=4 expandtab:
# :indentSize=4:noTabs=true:
from
__future__
import
print_function
"""zone2gandi.zone2gandi: provides entry point main()."""
...
...
@@ -12,7 +15,7 @@ def main():
try
:
config
=
yaml
.
safe_load
(
open
(
'config'
,
'r'
).
read
())
except
:
print
'Create config like "config.sample".'
print
(
'Create config like "config.sample".'
)
sys
.
exit
(
1
)
apiendpoint
=
config
[
'apiendpoint'
]
apikey
=
config
[
'apikey'
]
...
...
@@ -34,4 +37,4 @@ def main():
api
.
domain
.
zone
.
record
.
set
(
apikey
,
gzone
[
'id'
],
version
,
zone
)
api
.
domain
.
zone
.
version
.
set
(
apikey
,
gzone
[
'id'
],
version
)
api
.
domain
.
zone
.
version
.
delete
(
apikey
,
gzone
[
'id'
],
gzone
[
'version'
])
print
'Zonefile %s updated (gandi version %d)'
%
(
zonefile
,
version
)
print
(
'Zonefile %s updated (gandi version %d)'
%
(
zonefile
,
version
)
)
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