Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/wrappers/distributed_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def do_configure_op(remote_op):
res = requests.post(
"https://{}/{}/configure".format(node_ep, CLUSTER_API_V1),
json=remote_op,
verify=False,
verify=False, # nosec B501
)
if res.status_code != 200:
print(
Expand Down Expand Up @@ -141,7 +141,7 @@ def do_image_import(image_data):
headers={
"x-microk8s-callback-token": token,
},
verify=False,
verify=False, # nosec B501
)

if res.status_code != 200:
Expand Down
4 changes: 2 additions & 2 deletions scripts/wrappers/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def get_etcd_client_cert(master_ip, master_port, token):
signed = requests.post(
"https://{}:{}/{}/sign-cert".format(master_ip, master_port, CLUSTER_API),
json=req_data,
verify=False,
verify=False, # nosec B501
)
if signed.status_code != 200:
print("Failed to sign certificate. {}".format(signed.json()["error"]))
Expand Down Expand Up @@ -250,7 +250,7 @@ def get_client_cert(master_ip, master_port, fname: str, token: str, subject: str
signed = requests.post(
"https://{}:{}/{}/sign-cert".format(master_ip, master_port, CLUSTER_API),
json=req_data,
verify=False,
verify=False, # nosec B501
)
if signed.status_code != 200:
error = "Failed to sign {} certificate ({}).".format(fname, signed.status_code)
Expand Down
2 changes: 1 addition & 1 deletion scripts/wrappers/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def node_upgrade(upgrade, phase, node_ep, token):
remote_op = {"callback": token, "phase": phase, "upgrade": upgrade}
# TODO: handle ssl verification
res = requests.post(
"https://{}/{}/upgrade".format(node_ep, CLUSTER_API), json=remote_op, verify=False
"https://{}/{}/upgrade".format(node_ep, CLUSTER_API), json=remote_op, verify=False # nosec B501
Comment thread
louiseschmidtgen marked this conversation as resolved.
Outdated
Comment thread
louiseschmidtgen marked this conversation as resolved.
Outdated
)
if res.status_code != 200:
print("Failed to perform a {} on node {}".format(remote_op["upgrade"], node_ep))
Expand Down
2 changes: 1 addition & 1 deletion tests/test-cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def run(self, cmd):
elif self.backend == "lxc":
cmd_prefix = "/snap/bin/lxc exec {} -- ".format(self.vm_name)
with subprocess.Popen(
cmd_prefix + cmd, shell=True, stdout=subprocess.PIPE, preexec_fn=os.setsid
cmd_prefix + cmd, shell=True, stdout=subprocess.PIPE, preexec_fn=os.setsid # nosec B602
Comment thread
louiseschmidtgen marked this conversation as resolved.
Outdated
) as process:
try:
output = process.communicate(timeout=300)[0]
Expand Down
Loading