Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions ocaml/xenopsd/scripts/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (c) 2011-2013 Citrix Systems, Inc.
#
Expand Down Expand Up @@ -101,7 +101,7 @@ def add_to_bridge(mode, dev, bridge, address, external_ids):
cmd = ["ovs-vsctl", "--timeout=30", "--", "--if-exists", "del-port", dev, "--", "add-port", bridge, dev]
for (key, value) in external_ids:
cmd = cmd + ["--", "set", "interface", dev, 'external-ids:"%s"="%s"' % (key, value) ]
run(ON_ERROR_LOG, cmd)
run(ON_ERROR_LOG, cmd)

def remove_from_bridge(mode, dev, bridge):
if mode == MODE_BRIDGE:
Expand Down Expand Up @@ -206,11 +206,11 @@ def get_words(value, separator):
private = self.json["extra_private_keys"]
if "locking_mode" in self.json:
if type(self.json["locking_mode"]) is list:
# Must be type=locked here
# Must be type=locked here
results["locking_mode"] = self.json["locking_mode"][0].lower()
locked_params=self.json["locking_mode"][1]
results["ipv4_allowed"] = locked_params["ipv4"]
results["ipv6_allowed"] = locked_params["ipv6"]
locked_params=self.json["locking_mode"][1]
results["ipv4_allowed"] = locked_params["ipv4"]
results["ipv6_allowed"] = locked_params["ipv6"]
else:
results["locking_mode"] = self.json["locking_mode"].lower()
send_to_syslog("Got locking config: %s" % (repr(results)))
Expand Down
4 changes: 2 additions & 2 deletions ocaml/xenopsd/scripts/igmp_query_injector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import argparse
import threading
import logging
Expand Down Expand Up @@ -106,7 +106,7 @@ def _inject_with_connection_state_check(self):
t.join(self.vif_connected_timeout)
if watcher.watches:
log.warning('Wait vif state change timeout')
for vif in watcher.watches.itervalues():
for vif in watcher.watches.values():
log.warning("Vif:%s state did not change to '%s', don't inject IGMP query to mac: %s" %
(vif, VIF_CONNECTED_STATE, get_vif_mac(vif)))

Expand Down
4 changes: 2 additions & 2 deletions ocaml/xenopsd/scripts/pygrub-wrapper
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/python
#! /usr/bin/python3
#
# Copyright (C) 2023 Cloud Software Group
#
Expand All @@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

from __future__ import print_function

import pwd, subprocess, sys

cmd = ["pygrub"]
Expand Down
4 changes: 2 additions & 2 deletions ocaml/xenopsd/scripts/qemu-vif-script
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#!/usr/bin/env python3


from __future__ import print_function
from common import *

if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions ocaml/xenopsd/scripts/qemu-wrapper
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/python
#! /usr/bin/python3
#
# Copyright (C) 2016 Citrix Systems R&D Ltd.
#
Expand All @@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

from __future__ import print_function

import os
import re
import sys
Expand Down
6 changes: 3 additions & 3 deletions ocaml/xenopsd/scripts/setup-vif-rules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright (c) 2011 Citrix Systems, Inc.
#
Expand All @@ -13,7 +13,7 @@
# GNU Lesser General Public License for more details.
#

from __future__ import print_function

import fcntl
import os
import os.path
Expand Down Expand Up @@ -196,7 +196,7 @@ def clear_xs_ofport_path(vif):

def make_vswitch_external_ids(vif):
args = []
for (k, v) in vif.get_external_ids().items():
for (k, v) in list(vif.get_external_ids().items()):
args += ["--", "set", "interface", vif.vif_name, 'external-ids:"%s"="%s"' % (k, v)]
return args

Expand Down