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
2 changes: 1 addition & 1 deletion test/integration/component/test_configdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ def when_I_update_userdata(self, vm, new_user_data):
:rtype: str
"""
self.debug("Updating userdata for VM - %s" % vm.name)
updated_user_data = base64.encodestring(new_user_data.encode()).decode()
updated_user_data = base64.encodebytes(new_user_data.encode()).decode()
with self.stopped_vm(vm):
vm.update(self.api_client, userdata=updated_user_data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_deployvm_multinic(self):
"""Test userdata update when non default nic is without userdata for deploy and update
"""

self.userdata = base64.encodestring(self.userdata.encode()).decode()
self.userdata = base64.encodebytes(self.userdata.encode()).decode()

network1 = Network.create(
self.apiclient,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/component/test_deploy_vm_userdata_reg.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def setUpClass(cls):
# py2 didn't insert any new-lines
# so we now do the encoding in the stored userdata string and remove the '\n's
# to get a good easy string compare in the assert later on.
cls.userdata = base64.encodestring(cls.userdata.encode()).decode().replace('\n', '')
cls.userdata = base64.encodebytes(cls.userdata.encode()).decode().replace('\n', '')
cls.user_data_2k= ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(2000))
cls.user_data_2kl = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(1900))

Expand Down
2 changes: 1 addition & 1 deletion tools/marvin/marvin/cloudstackConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __sign(self, payload):
).replace("+", "%20")]
) for r in params]
)
signature = base64.encodestring(
signature = base64.encodebytes(
hmac.new(self.securityKey.encode('utf-8'),
hash_str.encode('utf-8'),
hashlib.sha1).digest()).strip()
Expand Down
2 changes: 1 addition & 1 deletion tools/ngui/requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def make_request(command, args, logger, host, port,
str.lower(urllib.quote_plus(str(r[1]))).replace("+",
"%20")]) for r in request])

sig = urllib.quote_plus(base64.encodestring(hmac.new(secretkey, hashStr,
sig = urllib.quote_plus(base64.encodebytes(hmac.new(secretkey, hashStr,
hashlib.sha1).digest()).strip())
request_url += "&signature=%s" % sig
request_url = "%s://%s:%s%s?%s" % (protocol, host, port, path, request_url)
Expand Down