Reformat N2VC to standardized format
Change-Id: I7bfc2236cd5f059dc1b659e9fb746fef619124b8
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/n2vc/provisioner.py b/n2vc/provisioner.py
index 91d5c04..e2b51b9 100644
--- a/n2vc/provisioner.py
+++ b/n2vc/provisioner.py
@@ -250,7 +250,8 @@
params.series = hw["series"]
params.instance_id = "manual:{}".format(self.host)
params.nonce = "manual:{}:{}".format(
- self.host, str(uuid.uuid4()),
+ self.host,
+ str(uuid.uuid4()),
) # a nop for Juju w/manual machines
params.hardware_characteristics = {
"arch": hw["arch"],
@@ -261,7 +262,9 @@
return params
- async def install_agent(self, connection, nonce, machine_id, proxy=None, series=None):
+ async def install_agent(
+ self, connection, nonce, machine_id, proxy=None, series=None
+ ):
"""
:param object connection: Connection to Juju API
:param str nonce: The nonce machine specification
@@ -297,7 +300,9 @@
- '[::1]:17070'
"""
if proxy:
- m = re.search(r"apiaddresses:\n- (\d+\.\d+\.\d+\.\d+):17070", results.script)
+ m = re.search(
+ r"apiaddresses:\n- (\d+\.\d+\.\d+\.\d+):17070", results.script
+ )
apiaddress = m.group(1)
"""Add IP Table rule
@@ -326,8 +331,10 @@
stdout, stderr = await self._run_configure_script(script)
break
except Exception as e:
- self.log.debug("Waiting for DNAT rules to be applied and saved, "
- "sleeping {} seconds".format(delay))
+ self.log.debug(
+ "Waiting for DNAT rules to be applied and saved, "
+ "sleeping {} seconds".format(delay)
+ )
if attempts > retry:
raise e
else: