After deploying new or upgrading your Cloud Director environment to 10.2 you may notice the tenants site name displaying something similar to “Site name undefined (Site ID: 6d2f1162-b138-4aef-ac42-320f32b5d45c)”
This is because the site name is not something you set during the initial setup, it has to be manually changed after deployment. When left unset it may appear as a UUID, hostname of the installations API public address or the IP of the Cell.
To make the changes I will be using Postman. You can download a free copy from the following link
To get started enter your Cloud Director URL and append it with /api/versions and click Send
Example – https://vcloud.stevenonofaro.net/api/versions
This should return a status of 200 OK. Scroll down in the body and look for a valid API version.
Look for one of the versions listed under the value of VersionInfo deprecated=”false” as these will be the current working API versions.
For this example I will go with the latest version 35.0
Create a new connection at the top by clicking on the + button then change the type to POST and enter your Cloud Director URL and append it with /api/sessions.
Example – https://vcloud.stevenonofaro.net/api/sessions
Then click on Authorization, change the type to Basic Auth and enter your username and password.
Then click on the Headers tab, set the Key to Accept and the Value to application/*+xml;version=35.0
Now click Send. It should then return a status of 200 OK and if you click on the Headers tab again you will see your X-VMWARE-VCLOUD-ACCESS-TOKEN.
Copy the value as we will use this to change the authentication type.
Now switch back to the first GET tab we created initially. Click on the Authorization tab and change the type to Bearer Token. Then paste in the token we just copied from the previous POST tab.
Then click on Headers and set the Key to Accept and the Value to application/*+xml;version=35.0
Now update the GET URL to the following,
Example – https://vcloud.stevenonofaro.net/api/site/associations/localAssociationData
Then click Send, you should get a status of 200 Ok. This way when the bearer token expires (which it does after 30 minutes) you can just go back to the POST tab and get an updated token.
Next up we need to look through the Body and try to locate the href URL for the Cloud Director site. It will reference the UUID that is shown in the image below.
The information we are looking for is the following,
<Link rel=”edit” href=”https://vcloud.stevenonofaro.net/api/site/associations/6d2f1162-b138-4aef-ac42-320f32b5d45c” type=”application/vnd.vmware.admin.siteAssociation+xml”/>
Now we need to perform a GET request using the following URL – https://vcloud.stevenonofaro.net/api/site/associations/6d2f1162-b138-4aef-ac42-320f32b5d45c
Update the GET box and click Send.
You should again get a status of 200 Ok.
Note – If you get an error you may need to update your bearer token and check the headers tab to make sure the api version is still set and try again.
Scroll down in the body and near the end you should see the following,
<SiteName>Site name undefined (Site ID: 6d2f1162-b138-4aef-ac42-320f32b5d45c)</SiteName>
This is the site name section that we need to update.
Now copy the whole response and then click on Body, click the raw checkbox and change txt to xml. Then paste the entry into the box.
Scroll down and update the site name in the following way,
I have just updated my site name to Perth.
Click on the Headers tab and set a new Key to Content-type and set the Value to application/vnd.vmware.admin.siteAssociation+xml
Then change the drop down from GET to PUT and click Send.
This will then return and Status 200 Ok
Now it’s time to go back to Cloud Director and login to see if our new site name is displayed.
And from the main Data Centers view,
You will also see the completed task when logged in as the system administrator.
As always use the subscribe box above for new post notifications and follow me on twitter @steveonofaro