diff --git a/test/vcpe/cleanvGMUX.py b/test/vcpe/cleanvGMUX.py
index 93135fb..f1e91a7 100755
--- a/test/vcpe/cleanvGMUX.py
+++ b/test/vcpe/cleanvGMUX.py
@@ -30,14 +30,14 @@
 
     interfaces = response.get('interfaces').get('interface')
     for inf in interfaces:
-        name = inf.get('name')        
-        if name.startswith('vxlanTun10'):       
+        name = inf.get('name')
+        if name.startswith('vxlanTun10'):
             logger.debug('name = {0}'.format(name))
             delete_interface_v3po_l2(name)
 
     for inf in interfaces:
-        name = inf.get('name')        
-        if name.startswith('vxlanTun10'):       
+        name = inf.get('name')
+        if name.startswith('vxlanTun10'):
             logger.debug('name = {0}'.format(name))
             delete_interface(name)
 
@@ -50,7 +50,7 @@
     url = '{0}/interface/{1}'.format(base_url, interface_name)
     r = requests.delete(url, headers=headers, auth=auth)
     logger.debug(r)
-        
+
 if __name__ == '__main__':
     gmux_ip = sys.argv[1]
     base_url = 'http://{0}:8183/restconf/config/ietf-interfaces:interfaces'.format(gmux_ip)
diff --git a/test/vcpe/get_info.py b/test/vcpe/get_info.py
index 71efd18..f86cfb2 100755
--- a/test/vcpe/get_info.py
+++ b/test/vcpe/get_info.py
@@ -18,8 +18,3 @@
 nodes=['brg', 'bng', 'mux', 'dhcp']
 hosts = vcpecommon.get_vm_ip(nodes)
 print(json.dumps(hosts, indent=4, sort_keys=True))
-
-
-
-
-
diff --git a/test/vcpe/sdcutils.py b/test/vcpe/sdcutils.py
index db0229d..470199e 100755
--- a/test/vcpe/sdcutils.py
+++ b/test/vcpe/sdcutils.py
@@ -17,7 +17,7 @@
 
     def download_vcpe_service_template(self):
         """
-        :return: 
+        :return:
         """
 
         url = self.vcpecommon.sdc_service_list_url
@@ -83,6 +83,3 @@
                     self.logger.debug('------- Creation subcategory request submitted to SDC, got response --------')
                     self.logger.debug('response code = %s' % resp.status_code )
                     self.logger.debug('---------------------------------------------------------------')
-
-
-
diff --git a/test/vcpe/vcpe.py b/test/vcpe/vcpe.py
index fc853ae..9ecda81 100755
--- a/test/vcpe/vcpe.py
+++ b/test/vcpe/vcpe.py
@@ -254,7 +254,7 @@
     config_sniro(vcpecommon, svc_instance_uuid['gmux'], svc_instance_uuid['brgemu'])
 
 
-def test(): 
+def test():
     vcpecommon = VcpeCommon(cfg_file=args.config)
     print("oom-k8s-04 public ip: %s" % (vcpecommon.get_vm_public_ip_by_nova('oom-k8s-04')))
 
diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py
index 42edffd..932766f 100755
--- a/test/vcpe/vcpecommon.py
+++ b/test/vcpe/vcpecommon.py
@@ -468,7 +468,7 @@
 
     def get_pod_node_oam_ip(self, pod):
         """
-        :Assuming kubectl is available and configured by default config (~/.kube/config) 
+        :Assuming kubectl is available and configured by default config (~/.kube/config)
         :param pod: pod name substring, e.g. 'sdnc-sdnc-0'
         :return pod's cluster node oam ip (10.0.0.0/16)
         """
@@ -490,7 +490,7 @@
 
     def get_pod_node_public_ip(self, pod):
         """
-        :Assuming kubectl is available and configured by default config (~/.kube/config) 
+        :Assuming kubectl is available and configured by default config (~/.kube/config)
         :param pod: pod name substring, e.g. 'sdnc-sdnc-0'
         :return pod's cluster node public ip (i.e. 10.12.0.0/16)
         """
@@ -517,7 +517,7 @@
         :return vm public ip
         """
         subnet = IPNetwork('{0}/{1}'.format(self.external_net_addr, self.external_net_prefix_len))
-        nova = openstackclient.Client(2, self.cloud['--os-username'], self.cloud['--os-password'], self.cloud['--os-tenant-id'], self.cloud['--os-auth-url']) 
+        nova = openstackclient.Client(2, self.cloud['--os-username'], self.cloud['--os-password'], self.cloud['--os-tenant-id'], self.cloud['--os-auth-url'])
         for i in nova.servers.list():
             if i.name == vm:
                 for k, v in i.networks.items():
@@ -766,4 +766,3 @@
 
     def load_vgmux_vnf_name(self):
         return self.load_object(self.vgmux_vnf_name_file)
-
