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

Pre-merge code cleanup

parent 14783e4c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import json
import logging
import os
+4 −2
Original line number Diff line number Diff line
@@ -17,10 +17,12 @@ from requests.auth import HTTPBasicAuth
from typing import Optional
from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES
from concurrent.futures import ThreadPoolExecutor
executor = ThreadPoolExecutor()


LOGGER = logging.getLogger(__name__)

EXECUTOR = ThreadPoolExecutor()

HTTP_OK_CODES = {
    200,    # OK
    201,    # Created
@@ -206,7 +208,7 @@ def tapi_tequest(resource_value):
        LOGGER.info(f"Services to be processed: {json.dumps(service, indent=2)}")
        LOGGER.info(f"URL to be used: {url}")

        executor.submit(process_uuid, service, url)
        EXECUTOR.submit(process_uuid, service, url)

def process_uuid(service, url):
    headers = {
+5 −4
Original line number Diff line number Diff line
@@ -11,10 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import ast
import json
import logging

import requests
from flask_restful import Resource
from common.Constants import DEFAULT_CONTEXT_NAME
@@ -36,6 +36,7 @@ headers = {
    "Content-Type": "application/json",
    "Expect": ""
}

class E2EInfoDelete(Resource):
    def __init__(self):
        super().__init__()
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from nbi.service.NbiApplication import NbiApplication
from .Resources import E2EInfoDelete

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

Loading