Architecting Multisite vCloud Director : Multisite vCloud Director v9.0 : 3.3 Organization Association : 3.3.1 Organization Association Process : 3.3.1.1 Organization Association Workflow
   
3.3.1.1 Organization Association Workflow
Site A – https://Site-A.example.com
1.
Retrieve the ID of the organization to be associated.
è
GET https://Site-A.example.com/api/org
ç
<OrgList … >
<Org
href="https://Site-A.example.com/api/org/{ID}"
name="TestOrg" … "/>
</OrgList>
2.
Retrieve the organization association URL from the Org object.
è
GET https://Site-A.example.com/api/admin/org/{ID}
ç
<AdminOrg name="TestOrg" ... >
...
<Link rel="down"
href="https://Site-A.example.com/api/admin/org/{ID}/associations" ... />
...
</AdminOrg>
3.
Retrieve the organization association data URL from the Org Associations object.
è
GET https://Site-A.example.com/api/admin/org/{ID}/associations
ç
<OrgAssociations
<Link rel="down"
href="Site-A.example.com/api/admin/org/{ID}/associations/localAssociationData"…
/>
</OrgAssociations>
4.
Retrieve the organization association data from the OrgAssociationMember element.
è
GET https://Site-A.example.com/api/admin/org/{ID}/associations/localAssociationData
ç
<OrgAssociationMember …>
<Link … />
<SiteId>urn:vcloud:site:79423eb2-0983-454e-88b2-71c9ffcd4c5e</SiteId>
<OrgId>urn:vcloud:org:93a6def0-85ba-447c-b4be-453cf60854e1</OrgId>
<OrgName>TestOrg</OrgName>
<OrgPublicKey>-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhki…VybCa7wIDAQAB -----END PUBLIC KEY-----</OrgPublicKey>
</OrgAssociationMember>
Site B – https://Site-B.example.com
5.
Repeat steps 1 and 2 using the Site-B URL to establish an authenticated session and retrieve the org ID and its association URL from the Org object
6.
Retrieve the “add associations” URL from the Org Associations object.
è
GET https://Site-B.example.com/api/admin/org/{ID}/associations
ç
<OrgAssociations …>
<Link
rel="add"
type="application/vnd.vmware.admin.organizationAssociation+xml"/>
</OrgAssociations>
7.
Post the OrgAssociationMember response body received in Step 4 to the “add associations” URL from step 6.
è
Content-Type: application/vnd.vmware.admin.organizationAssociation+xml
<OrgAssociationMember …>
<Link … />
<SiteId>urn:vcloud:site:79423eb2-0983-454e-88b2-71c9ffcd4c5e</SiteId>
<OrgId>urn:vcloud:org:93a6def0-85ba-447c-b4be-453cf60854e1</OrgId>
<OrgName>TestOrg</OrgName>
<OrgPublicKey>-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhki…VybCa7wIDAQAB -----END PUBLIC KEY-----</OrgPublicKey>
</OrgAssociationMember>
 
ç
<Task …
operation="Creating association Organization TestOrg ... "
operationName="orgAddAssociation" … >
<Owner
href="https://Site-B.example.com/api/admin/org/{ID}"
name="STFTestOrg" … />
<User
href="https://Site-B.example.com/api/admin/user/{ID}"
name="administrator" … />
<Organization
href="https://Site-B.example.com/api/org/{ID} "
name="System" … />
</Task>
 
As noted in the previous figures, this results in a Task within vCloud Director at Site B to add the org association with the organization from Site A. When this process is complete, it can then be reversed, retrieving the OrgAssociationMember data from the localAssociationData URL of the Org in Site B and POSTing it to “add associations” URL of the Org in Site A.