Skip to content

Commit

Permalink
CP-49148: More clean python2 code
Browse files Browse the repository at this point in the history
- Update following embeded shellbang to python3
    * generate-iscsi-iqn
    * xe-backup-metadata
    * xe-restore-metadata
- Remove interop-test.sh as not used

Signed-off-by: Lin Liu <Lin.Liu01@cloud.com>
  • Loading branch information
liulinC committed Aug 20, 2024
1 parent 2f9e969 commit bdf5268
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions ocaml/message-switch/core_test/interop-test.sh

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/generate-iscsi-iqn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ geniqn() {
domain=${defaultdomain}
fi

revdomain=$(python -c "${REVERSE_PY}" $domain)
revdomain=$(python3 -c "${REVERSE_PY}" $domain)

uuid=$(uuidgen | cut -d- -f1)
date=$(date +"%Y-%m")
Expand Down
2 changes: 1 addition & 1 deletion scripts/xe-backup-metadata
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function usage {
function uuid5 {
# could use a modern uuidgen but it's not on XS 8
# should work with Python 2 and 3
python -c "import uuid; print (uuid.uuid5(uuid.UUID('$1'), '$2'))"
python3 -c "import uuid; print (uuid.uuid5(uuid.UUID('$1'), '$2'))"
}

function test_sr {
Expand Down
2 changes: 1 addition & 1 deletion scripts/xe-restore-metadata
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function test_sr {
NS="e93e0639-2bdb-4a59-8b46-352b3f408c19"
function uuid5 {
# could use a modern uuidgen but it's not on XS 8
python -c "import uuid; print (uuid.uuid5(uuid.UUID('$1'), '$2'))"
python3 -c "import uuid; print (uuid.uuid5(uuid.UUID('$1'), '$2'))"
}

dry_run=0
Expand Down

0 comments on commit bdf5268

Please sign in to comment.