Last active
November 25, 2020 10:15
-
-
Save laidbackware/309b86026dab897eadce688f0f3b2aaa to your computer and use it in GitHub Desktop.
Upload NSX-T principal with Cert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cert_request=$(cat <<END | |
{ | |
"name": "tkgi-nsx-t-superuser", | |
"node_id": "node-1", | |
"role": "enterprise_admin", | |
"is_protected": "true", | |
"certificate_pem" : "$(awk '{printf "%s\\n", $0}' tkgi-nsx-t-superuser.crt)" | |
} | |
END | |
) | |
curl -k -X POST \ | |
"https://DCLMXNSXT.dm.ae/api/v1/trust-management/principal-identities/with-certificate" \ | |
-u "admin:$NSX_PASSWORD" \ | |
-H 'content-type: application/json' \ | |
-d "$cert_request" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment