Auto-generated patch by python-black
[integration/test.git] / csit / libraries / SFC / SfcUtils.py
index 97629c0cbba74c7c78c80cc2f21711fe4bd99bee..b671cff960a18af8c08812f0464d66abcfe06888 100755 (executable)
@@ -7,28 +7,28 @@ __email__ = "jose.luis.franco.arza@ericsson.com"
 
 
 def get_network_from_cidr(cidr):
-    '''
+    """
     Returns the subnetwork part from a given subnet in CIDR format,
     like 192.168.1.0/24. Returning 192.168.1.0.
-    '''
+    """
     o = ipaddr.IPv4Network(cidr)
     return str(o.network)
 
 
 def get_mask_from_cidr(cidr):
-    '''
+    """
     Returns a subnet mask from a given subnet in CIDR format,
     like 192.168.1.0/24. Returning 255.255.255.0.
-    '''
+    """
     o = ipaddr.IPv4Network(cidr)
     return str(o.netmask)
 
 
 def get_ip_address_first_octets(ip, n_octets):
-    '''
+    """
     Given an IP address, this function returns the number
     of octets determined as argument. If 4 are specified, then the output
     is the whole IP
-    '''
+    """
 
-    return ".".join(ip.split(".")[:int(n_octets)])
+    return ".".join(ip.split(".")[: int(n_octets)])