Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

certificate_authority.get() does not return certificate string #110

Closed
agoela opened this issue Nov 25, 2020 · 2 comments
Closed

certificate_authority.get() does not return certificate string #110

agoela opened this issue Nov 25, 2020 · 2 comments
Assignees

Comments

@agoela
Copy link

agoela commented Nov 25, 2020

When running example ov_to_smb.py to download the certificate and write to a file, it throws an exception that "cert" is a dict and not a string.

{'category': 'appliance',
'count': 0,
'created': '2020-11-25T08:47:32.474Z',
'eTag': '2020-11-25T08:47:32.474Z',
'members': [{'category': 'appliance',
'certRevocationConfInfo': None,
'certStatus': 'GOOD',
'certType': 'LEAF_CERT',
'certificateDetails': None,
'created': '2020-11-25T08:47:32.478Z',
'eTag': '2020-11-25T08:47:32.478Z',
'expiryDate': '2030-11-26T04:48:00.000Z',
'modified': '2020-11-25T08:47:32.478Z',
'subjectName': 'CN=pln-n2-hpov.env02.mcloud.entsvcs.net,O=Hewlett '
'Packard Enterprise,L=Palo '
'Alto,ST=California,C=US',
'type': 'CertificateAuthorityInfo',
'uri': '/rest/certificates/ca/localhostSelfSignedCertificate'},
{'category': 'appliance',
'certRevocationConfInfo': None,
'certStatus': 'GOOD',
'certType': 'STANDARD_ROOT',
'certificateDetails': None,
'created': '2020-11-25T08:47:32.478Z',
'eTag': '2020-11-25T08:47:32.478Z',
'expiryDate': '2030-11-26T08:37:08.000Z',
'modified': '2020-11-25T08:47:32.478Z',
'subjectName': 'CN=Infrastructure Management Certificate '
'Authority,O=Hewlett Packard Enterprise,L=Palo '
'Alto,ST=California,C=US',
'type': 'CertificateAuthorityInfo',
'uri': '/rest/certificates/ca/Infrastructure Management '
'Certificate Authority-internalroot'}],
'modified': '2020-11-25T08:47:32.474Z',
'nextPageUri': None,
'prevPageUri': None,
'start': 0,
'total': 2,
'type': 'CertificateAuthorityInfoCollection',
'uri': '/rest/certificates/ca'}
Traceback (most recent call last):
File "ov_to_smb.py", line 337, in
sys.exit(main())
File "ov_to_smb.py", line 326, in main
getCertCa(oneview_client)
File "ov_to_smb.py", line 245, in getCertCa
ca.write(cert)
TypeError: write() argument must be str, not dict

@VenkateshRavula
Copy link
Contributor

Thanks for pointing this out. We will look into it and get back to you.

@VenkateshRavula
Copy link
Contributor

We have fixed this issue. Please pull the latest master branch and test the issue once again. Feel free to reopen if you still face the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants