summaryrefslogtreecommitdiff
path: root/trove/dns
diff options
context:
space:
mode:
authorSushil Kumar <sushil.kumar3@hp.com>2015-05-20 19:53:12 +0000
committerSushil Kumar <sushil.kumar3@hp.com>2015-05-29 07:27:59 +0000
commit843bb0cd53f6cc3caa9beeb8f07a374943d01889 (patch)
tree1d3669e320affdd4f59cd88c404ef420b1e0cfd4 /trove/dns
parent0f3d24254811906810552217cf05ed9409f415fc (diff)
downloadtrove-843bb0cd53f6cc3caa9beeb8f07a374943d01889.tar.gz
Fixes hacking rules
This patchset helps reducing the ignored pep8 errors. Fixed some ignored hacking rules, as listed follows: - E111 indentation is not a multiple of four - E122 continuation line missing indentation or outdented - E123 closing bracket does not match indentation of opening bracket's line - E128 continuation line under-indented for visual indent - E251 unexpected spaces around keyword / parameter equals - E265 block comment should start with '# ' - E713 test for membership should be 'not in' - H105 Don't use author tags - H306 imports not in alphabetical order Change-Id: Iadf2af4f6ec90420153ad63b5a41650392ef2cbd
Diffstat (limited to 'trove/dns')
-rw-r--r--trove/dns/designate/driver.py12
-rw-r--r--trove/dns/driver.py8
-rw-r--r--trove/dns/manager.py4
-rw-r--r--trove/dns/models.py4
4 files changed, 15 insertions, 13 deletions
diff --git a/trove/dns/designate/driver.py b/trove/dns/designate/driver.py
index d4ebd7a4..e35cb737 100644
--- a/trove/dns/designate/driver.py
+++ b/trove/dns/designate/driver.py
@@ -17,14 +17,16 @@
Dns Driver that uses Designate DNSaaS.
"""
+import base64
+import hashlib
+
+from designateclient.v1 import Client
+from designateclient.v1.records import Record
+
from trove.common import cfg
from trove.common import exception
from trove.dns import driver
from trove.openstack.common import log as logging
-from designateclient.v1 import Client
-from designateclient.v1.records import Record
-import base64
-import hashlib
CONF = cfg.CONF
@@ -142,7 +144,7 @@ class DesignateInstanceEntryFactory(driver.DnsInstanceEntryFactory):
# Constructing the hostname by hashing the instance ID.
name = base64.b32encode(hashlib.md5(instance_id).digest())[:11].lower()
hostname = ("%s.%s" % (name, zone.name))
- #Removing the leading dot if present
+ # Removing the leading dot if present
if hostname.endswith('.'):
hostname = hostname[:-1]
diff --git a/trove/dns/driver.py b/trove/dns/driver.py
index 359545bf..86f0aca1 100644
--- a/trove/dns/driver.py
+++ b/trove/dns/driver.py
@@ -45,13 +45,13 @@ class DnsDriver(object):
pass
def modify_content(self, name, content, dns_zone):
- #TODO(tim.simpson) I've found no use for this in RS impl of DNS w/
- # instances. Check to see its really needed.
+ # TODO(tim.simpson) I've found no use for this in RS impl of DNS w/
+ # instances. Check to see its really needed.
pass
def rename_entry(self, content, name, dns_zone):
- #TODO(tim.simpson) I've found no use for this in RS impl of DNS w/
- # instances. Check to see its really needed.
+ # TODO(tim.simpson) I've found no use for this in RS impl of DNS w/
+ # instances. Check to see its really needed.
pass
diff --git a/trove/dns/manager.py b/trove/dns/manager.py
index bf632e40..c7dab51d 100644
--- a/trove/dns/manager.py
+++ b/trove/dns/manager.py
@@ -16,10 +16,10 @@
"""
Dns manager.
"""
-from trove.openstack.common import log as logging
-from trove.common import utils
from trove.common import cfg
+from trove.common import utils
+from trove.openstack.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/trove/dns/models.py b/trove/dns/models.py
index d596ce11..eb64b5ca 100644
--- a/trove/dns/models.py
+++ b/trove/dns/models.py
@@ -18,11 +18,11 @@ Model classes that map instance Ip to dns record.
"""
-from trove.db import get_db_api
from trove.common import exception
+from trove.common.i18n import _
from trove.common.models import ModelBase
+from trove.db import get_db_api
from trove.openstack.common import log as logging
-from trove.common.i18n import _
LOG = logging.getLogger(__name__)