Skip to content

Commit f8eab90

Browse files
pleases linter
#709
1 parent 3e117e5 commit f8eab90

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

bibigrid/core/actions/create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def start_vpn_or_master(self, configuration, provider): # pylint: disable=too-m
233233
f"Floating ip {configuration['floatingIpId']} does not exist on "
234234
f"{provider.cloud_specification['identifier']}!")
235235
configuration["floating_ip"] = floating_ip["floating_ip_address"]
236-
_ = provider.add_ip_list(server, [configuration["floating_ip"]])
236+
_ = provider.add_ip_list(server=server, floating_ip=[configuration["floating_ip"]])
237237
self.log.info(
238238
f"Server {name} uses floating ip {configuration['floating_ip']} ({'pre-existing'
239239
if configuration.get('floatingIpId') else 'created'})")

bibigrid/core/actions/terminate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ def write_cluster_state(state):
2929
yaml.safe_dump(data=state, stream=cluster_info_file)
3030

3131

32-
def terminate(cluster_id, providers, floating_ip_ids, log, debug=False, assume_yes=False):
32+
# pylint: disable=too-many-locals
33+
def terminate(*, cluster_id, providers, floating_ip_ids, log, debug=False, assume_yes=False):
3334
"""
3435
Goes through all providers and gets info of all servers which name contains cluster ID.
3536
It then checks if any resources are reserved, but not used and frees them that were hold by the cluster.

bibigrid/core/provider.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def get_external_network(self, network_name_or_id):
203203
"""
204204

205205
@abstractmethod
206-
def add_ip_list(self, server, ips, wait=False, timeout=60, fixed_address=None, nat_destination=None):
206+
def add_ip_list(self, *, server, ips, wait=False, timeout=60, fixed_address=None, nat_destination=None):
207207
"""
208208
Add ip list to server.
209209
:param server:
@@ -216,16 +216,16 @@ def add_ip_list(self, server, ips, wait=False, timeout=60, fixed_address=None, n
216216
"""
217217

218218
@abstractmethod
219-
def get_floating_ip(self, id, filters=None):
219+
def get_floating_ip(self, floating_ip_id, filters=None):
220220
"""
221221
Get a floating IP by id.
222-
@param id:
222+
@param floating_ip_id:
223223
@param filters:
224224
@return:
225225
"""
226226

227227
@abstractmethod
228-
def create_floating_ip(self, network=None, server=None, fixed_address=None, nat_destination=None, port=None,
228+
def create_floating_ip(self, *, network=None, server=None, fixed_address=None, nat_destination=None, port=None,
229229
wait=False, timeout=60):
230230
"""
231231

bibigrid/openstack/openstack_provider.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,16 @@ def get_external_network(self, network_name_or_id):
288288
return router.external_gateway_info["network_id"]
289289
return None
290290

291-
def get_floating_ip(self, id, filters=None):
291+
def get_floating_ip(self, floating_ip_id, filters=None):
292292
"""
293293
Get a floating IP by id.
294-
@param id:
294+
@param floating_ip_id:
295295
@param filters:
296296
@return:
297297
"""
298-
return self.conn.get_floating_ip(id, filters)
298+
return self.conn.get_floating_ip(floating_ip_id, filters)
299299

300-
def add_ip_list(self, server, ips, wait=False, timeout=60, fixed_address=None, nat_destination=None):
300+
def add_ip_list(self, *, server, ips, wait=False, timeout=60, fixed_address=None, nat_destination=None):
301301
"""
302302
Add ip list to server.
303303
:param server:
@@ -311,7 +311,7 @@ def add_ip_list(self, server, ips, wait=False, timeout=60, fixed_address=None, n
311311
return self.conn.add_ip_list(server, ips, wait=wait, timeout=timeout, fixed_address=fixed_address,
312312
nat_destination=nat_destination)
313313

314-
def create_floating_ip(self, network=None, server=None, fixed_address=None, nat_destination=None, port=None,
314+
def create_floating_ip(self, *, network=None, server=None, fixed_address=None, nat_destination=None, port=None,
315315
wait=True, timeout=60):
316316
"""
317317

0 commit comments

Comments
 (0)