Fix whitespace issues in Python files 54/104154/1
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Mon, 23 Mar 2020 13:42:04 +0000 (14:42 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Mon, 23 Mar 2020 13:42:04 +0000 (14:42 +0100)
Change-Id: I7c98d1187c24b58471a822ec6f0fb9b0999f6f39
Issue-ID: INT-1482
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
tutorials/vFWDT/playbooks/server.py
vnfs/DAaaS/lib/promql_api/prom_ql_api.py
vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/consumer/CustomKafkaConsumer.py
vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/main.py
vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/producer/CustomKafkaProducer.py
vnfs/DAaaS/microservices/PythonApps/python-kafkaConsumer-inference-app/src/utils/utils.py
vnfs/DAaaS/sample-apps/m3db_promql/build/sample_promql_query.py
vnfs/DAaaS/sample-apps/sample-minio-load-model/build/load-model-from-minio.py
vnfs/DAaaS/sample-apps/sample-minio-save-model/build/save-model-to-minio.py
vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py
vnfs/VES5.0/evel/evel-test-collector/code/collector/rest_dispatcher.py

index 7caa161..e7d512d 100755 (executable)
@@ -29,4 +29,3 @@ class CORSRequestHandler (SimpleHTTPRequestHandler):
 
 if __name__ == '__main__':
     test(CORSRequestHandler, HTTPServer, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000)
-
index 1dc578e..2ee273a 100644 (file)
@@ -128,7 +128,7 @@ def validate_parameters(map_of_parameters):
             raise Exception(':: Value Paramter of key: \'{}\' NOT a string! Values should be string ::'.format(k))
     return True
 
-        
+
 def query_range(map_of_parameters):
     list_of_result_sets = []
     set_log_config()
@@ -136,7 +136,7 @@ def query_range(map_of_parameters):
         LOG.info(':::Validation of map_of_parameters done::')
     load_and_validate_env_vars(LIST_OF_ENV_VARIABLES)
     LOG.info("Forming the query_range request ...")
-    
+
     list_of_substrings = []
     list_of_substrings.append(MAP_ENV_VARIABLES['DATA_ENDPOINT'])
     list_of_substrings.append(QUERY_RANGE_API_VERSION)
@@ -168,4 +168,4 @@ def query_range(map_of_parameters):
             LOG.info('::::::::::RESULTS OF QUERY_RANGE::::::::::::: {}'.format(map_of_parameters))
             list_of_result_sets.append(results)
 
-    return list_of_result_sets
\ No newline at end of file
+    return list_of_result_sets
index 1e311bf..6d3fd61 100644 (file)
@@ -117,4 +117,4 @@ class CustomKafkaConsumer:
             # print("msg-value-type:: {}".format(type(msg.value().decode('utf-8'))))
 
             self.processMessage(msg.key(), msg.value())
-        self.consumer.close()
\ No newline at end of file
+        self.consumer.close()
index 8f726bd..4330376 100644 (file)
@@ -35,4 +35,4 @@ class CustomKafkaProducer:
             logging.error('%s raised an error', err)
         else:
             logging.info("Message delivered to %s on partition %s",
-                        msg.topic(), msg.partition())
\ No newline at end of file
+                        msg.topic(), msg.partition())
index 2c85f1f..844189b 100644 (file)
@@ -43,6 +43,6 @@ def main():
         demo_query()
         demo_query_range()
 
-    
+
 if __name__ == "__main__":
         main()
index dbdabc3..eae66d7 100755 (executable)
@@ -35,7 +35,7 @@ client = Minio(os.environ['S3_ENDPOINT'],
                secure=False)
 
 
-def load_model(bucket_name, object_name, filepath):    
+def load_model(bucket_name, object_name, filepath):
     try:
         client.fget_object(bucket_name, object_name, filepath)
     except ResponseError as err:
@@ -48,4 +48,4 @@ if __name__ == "__main__":
     for object_name in objects:
         print(f"Load model from s3://{bucket_name}/{object_name} to {filepath+object_name}")
         load_model(bucket_name, object_name, filepath+object_name)
-    time.sleep(300)
\ No newline at end of file
+    time.sleep(300)
index b453522..1963cd3 100755 (executable)
@@ -35,7 +35,7 @@ client = Minio(os.environ['S3_ENDPOINT'],
                secure=False)
 
 
-def load_model(bucket_name, object_name, filepath):    
+def load_model(bucket_name, object_name, filepath):
     try:
         client.fget_object(bucket_name, object_name, filepath)
     except ResponseError as err:
@@ -48,14 +48,14 @@ if __name__ == "__main__":
     filepath = "/app/" + model
     if not client.bucket_exists(bucket_name):
         client.make_bucket(bucket_name, location=location)
-    
+
     found = False
     try:
         client.stat_object(bucket_name, model);
         found = True
     except Exception as err:
         found = False
-    
+
     metadata = {
         "X-Amz-Meta-model-description": "Sample numpy model",
         "X-Amz-Meta-model-type": "scikit-learn/numpy",
@@ -66,4 +66,3 @@ if __name__ == "__main__":
             client.fput_object(bucket_name, model, filepath, metadata=metadata)
         except expression as identifier:
             print(err)
-        
index 58bebc7..6fadd46 100644 (file)
@@ -13,9 +13,9 @@ License
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
+
          http://www.apache.org/licenses/LICENSE-2.0
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
index e00465a..dc5c841 100644 (file)
@@ -13,9 +13,9 @@ License
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@ template_404 = b'''POST {0}'''
 def set_404_content(url):
     '''
     Called at initialization to set the base URL so that we can serve helpful
-    diagnostics as part of the 404 response. 
+    diagnostics as part of the 404 response.
     '''
     global base_url
     base_url = url
@@ -43,7 +43,7 @@ def set_404_content(url):
 def notfound_404(environ, start_response):
     '''
     Serve the 404 Not Found response.
-    
+
     Provides diagnostics in the 404 response showing the hierarchy of valid
     REST resources.
     '''