Merge "Remove unused variables 'LOG'"

This commit is contained in:
Jenkins 2016-01-27 19:54:14 +00:00 committed by Gerrit Code Review
commit 3ca6cdc969
6 changed files with 2 additions and 21 deletions

View File

@ -15,7 +15,6 @@
# under the License. # under the License.
import argparse import argparse
import logging
import re import re
import socket import socket
import struct import struct
@ -25,9 +24,6 @@ from astara_router.drivers import base
from astara_router.models import Network from astara_router.models import Network
LOG = logging.getLogger(__name__)
def send_gratuitous_arp(): def send_gratuitous_arp():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description='Send a gratuitous ARP' description='Send a gratuitous ARP'

View File

@ -15,7 +15,6 @@
# under the License. # under the License.
import logging
import random import random
import textwrap import textwrap
@ -23,7 +22,6 @@ from astara_router.drivers import base
from astara_router import utils from astara_router import utils
LOG = logging.getLogger(__name__)
CONF_PATH = '/etc/bird/bird6.conf' CONF_PATH = '/etc/bird/bird6.conf'
DEFAULT_AREA = 0 DEFAULT_AREA = 0

View File

@ -15,7 +15,6 @@
# under the License. # under the License.
import logging
import os import os
import time import time
@ -23,7 +22,6 @@ from astara_router.drivers import base
from astara_router import utils from astara_router import utils
LOG = logging.getLogger(__name__)
CONF_DIR = '/etc/dnsmasq.d' CONF_DIR = '/etc/dnsmasq.d'
RC_PATH = '/etc/init.d/dnsmasq' RC_PATH = '/etc/init.d/dnsmasq'
DEFAULT_LEASE = 86400 DEFAULT_LEASE = 86400
@ -141,7 +139,7 @@ class DHCPManager(base.Manager):
Restarts dnsmasq service using the system provided init script. Restarts dnsmasq service using the system provided init script.
""" """
try: try:
utils.execute(['/etc/init.d/dnsmasq', 'stop'], self.root_helper) utils.execute([RC_PATH, 'stop'], self.root_helper)
except: except:
pass pass
@ -151,7 +149,7 @@ class DHCPManager(base.Manager):
remaining -= 1 remaining -= 1
try: try:
utils.execute( utils.execute(
['/etc/init.d/dnsmasq', 'start'], self.root_helper [RC_PATH, 'start'], self.root_helper
) )
return return
except Exception: except Exception:

View File

@ -14,15 +14,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import logging
from astara_router.drivers import base from astara_router.drivers import base
from astara_router import utils from astara_router import utils
LOG = logging.getLogger(__name__)
class HostnameManager(base.Manager): class HostnameManager(base.Manager):
EXECUTABLE = '/bin/hostname' EXECUTABLE = '/bin/hostname'

View File

@ -16,14 +16,12 @@
import json import json
import logging
from astara_router.defaults import internal_metadata_port from astara_router.defaults import internal_metadata_port
from astara_router.drivers import base from astara_router.drivers import base
from astara_router.utils import execute, replace_file from astara_router.utils import execute, replace_file
LOG = logging.getLogger(__name__)
CONF_PATH = '/etc/metadata.conf' CONF_PATH = '/etc/metadata.conf'

View File

@ -15,17 +15,12 @@
# under the License. # under the License.
import logging
import netaddr import netaddr
from astara_router.drivers import base from astara_router.drivers import base
from astara_router import utils from astara_router import utils
LOG = logging.getLogger(__name__)
class PingManager(base.Manager): class PingManager(base.Manager):
""" """
A class which provide a facade to the system ping utility. Supports both A class which provide a facade to the system ping utility. Supports both