Fix create_csr to create csr with node-uuid as name

Change-Id: Ib586139ad60cafa9ac474fa9136ce52483f4d680
This commit is contained in:
Mallikarjuna Reddy Kolagatla 2022-09-02 13:30:09 +00:00 committed by Nisha Agarwal
parent 7c2993f336
commit de9759c0d2
1 changed files with 2 additions and 10 deletions

View File

@ -1032,16 +1032,8 @@ class RedfishOperations(operations.IloOperations):
if not os.path.exists(path):
os.makedirs(path, 0o755)
# Create the file name as "<ip_address>.csr". Here ip address
# will have the "-" instead of "." in the file name.
ip = self.host
ip_split = ip.split('.')
csr_file_name = ""
for x in ip_split:
csr_file_name = csr_file_name + x + '-'
csr_file_name = csr_file_name[:-1]
csr_file = path + csr_file_name + '.csr'
csr_file_name = os.path.basename(path)
csr_file = os.path.join(path, csr_file_name + '.csr')
with open(csr_file, 'w') as f:
f.write(cert_request)