Commit e697d474 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge code cleanup

parent 37bdd6b4
Loading
Loading
Loading
Loading
+1 −1
Changes for manifests/deviceservice.yaml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ spec:
            - containerPort: 9192
          env:
            - name: LOG_LEVEL
              value: "DEBUG"
              value: "INFO"
          startupProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:2020"]
+2 −2
Changes for my_deploy.sh: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ export CRDB_PASSWORD="tfs123"
export CRDB_DEPLOY_MODE="single"

# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS="YES"
export CRDB_DROP_DATABASE_IF_EXISTS=""

# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""
@@ -224,7 +224,7 @@ export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis"
export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups"

# Disable flag for dropping tables if they exist.
export QDB_DROP_TABLES_IF_EXIST="yes"
export QDB_DROP_TABLES_IF_EXIST=""

# Disable flag for re-deploying QuestDB from scratch.
export QDB_REDEPLOY=""
+0 −1
Changes for src/common/DeviceTypes.py: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ class DeviceTypeEnum(Enum):
    MORPHEUS                        = 'morpheus'
    OPENFLOW_RYU_CONTROLLER         = 'openflow-ryu-controller'
    DSCM_NODE                       = 'dscm'
    MIKROTIK_ROUTEROS               = 'mikrotik_routeros'

    # ETSI TeraFlowSDN controller
    TERAFLOWSDN_CONTROLLER          = 'teraflowsdn'
+2 −2
Changes for src/device/service/drivers/__init__.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -292,8 +292,8 @@ if LOAD_ALL_DEVICE_DRIVERS:
        (MikrotikRouterOSDriver, [
            {
                FilterFieldEnum.DEVICE_TYPE: [
                    DeviceTypeEnum.EMULATED_COMPUTER,
                    DeviceTypeEnum.MIKROTIK_ROUTEROS,
                    DeviceTypeEnum.PACKET_ROUTER,
                    DeviceTypeEnum.EMULATED_PACKET_ROUTER
                ],
                FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_MIKROTIK_ROUTEROS,
            }
+4 −5
Changes for src/device/service/drivers/mikrotik/MikrotikRouterOSDriver.py: 4 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -12,13 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import json, logging, threading
import json, logging, requests, threading
from requests.auth import HTTPBasicAuth
from typing import Any, List, Tuple, Union
from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method
from common.type_checkers.Checkers import chk_string, chk_type
from common.type_checkers.Checkers import chk_type
from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS, RESOURCE_NETWORK_INSTANCES
from requests.auth import HTTPBasicAuth
import requests

LOGGER = logging.getLogger(__name__)

@@ -74,7 +73,7 @@ class MikrotikRouterOSDriver(_Driver):
            try:
                if not resource_keys or RESOURCE_ENDPOINTS in resource_keys:
                    url_if = f"{self.__base_url}/interface/ethernet"
                    response = requests.get(url_if, auth=self.__auth, timeout=self.__timeout, verify=False,)
                    response = requests.get(url_if, auth=self.__auth, timeout=self.__timeout, verify=False)
                    response.raise_for_status()
                    interfaces = response.json()
                    if not isinstance(interfaces, list):
Loading