<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-family: Calibri, sans-serif; font-size: 14px; color: rgb(0, 0, 0); ">
<div>Hi Mike,</div>
<div><br>
</div>
<div>I read your email where you expressed concerns regarding create-time dependencies, and I agree they are valid concerns to be addressed.  But like we all agree, as a starting point, we are just focusing on the APIs for now, and will leave that aside as
 implementation details to be addressed later. </div>
<div>Thanks for sharing your suggestions on how we can simplify the APIs.  I think we are getting closer to finalizing this one. </div>
<div><br>
</div>
<div>Let us start at the model proposed here - </div>
<div>
<div>[1] <a href="https://docs.google.com/document/d/17OIiBoIavih-1y4zzK0oXyI66529f-7JTCVj-BcXURA/edit?usp=sharing">https://docs.google.com/document/d/17OIiBoIavih-1y4zzK0oXyI66529f-7JTCVj-BcXURA/edit?usp=sharing</a> </div>
</div>
<div>(Ignore the white diamonds - they will be black, when I edit the doc)</div>
<div><br>
</div>
<div>The <b>InstanceGroup</b> represents all the information necessary to capture the group - nodes, edges, policies, and metadata</div>
<div><br>
</div>
<div><b>InstanceGroupMember</b> - is a reference to an Instance, which is saved separately, using the existing
<b>Instance</b> Model in Nova. </div>
<div><br>
</div>
<div>
<div><b>InstanceGroupMemberConnection</b> - represents the edge</div>
<div><br>
</div>
</div>
<div><b>InstanceGroupPolicy</b> is a reference to a Policy, which will also be saved separately, (currently not existing in the model, but has to be created). Here in the Policy model, I don't mind adding any number of additional fields, and key-value pairs
 to be able to fully define a policy.  I guess a Policy-metadata dictionary is sufficient to capture all the required arguments.  </div>
<div>The InstanceGroupPolicy will be associated to a group as a whole or an edge.</div>
<div><br>
</div>
<div><b>InstanceGroupMetadata</b> - represents key-value dictionary for any additional metadata for the instance group. </div>
<div><br>
</div>
<div>I think this should fully support what we care about - nodes, edges, policies and metadata. </div>
<div><br>
</div>
<div>Do we all agree ? </div>
<div><br>
</div>
<div><br>
</div>
<div>Now going to the APIs, </div>
<div><br>
</div>
<div>Register GROUP API (from my doc [1]): </div>
<div><b id="docs-internal-guid-70310bda-b7ed-66d3-3c93-02366dabd279"><br>
<span style="font-size: 16px; font-family: Cambria; color: rgb(51, 51, 51); font-weight: normal; vertical-align: baseline; white-space: pre-wrap; "></span>
<div dir="ltr">
<table style="border:none;border-collapse:collapse">
<colgroup><col width="65"><col width="216"><col width="301"></colgroup>
<tbody>
<tr style="height:0px">
<td style="border:1px solid #aaaaaa;vertical-align:middle;background-color:#f9f9f9;padding:3px 3px 3px 3px">
<p dir="ltr" style="line-height:1.25;margin-top:12pt;margin-bottom:12pt;"><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">POST</span></p>
</td>
<td style="border:1px solid #aaaaaa;vertical-align:middle;background-color:#f9f9f9;padding:3px 3px 3px 3px">
<p dir="ltr" style="line-height:1.25;margin-top:12pt;margin-bottom:12pt;"><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">/v3.0/{tenant_id}/groups</span></p>
</td>
<td style="border:1px solid #aaaaaa;vertical-align:middle;background-color:#f9f9f9;padding:3px 3px 3px 3px">
<p dir="ltr" style="line-height:1.25;margin-top:12pt;margin-bottom:12pt;"><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">Register a group</span></p>
</td>
</tr>
</tbody>
</table>
</div>
</b></div>
<div>I think the confusion is only about when the member (all nested members) and policy about when they are saved in the DB (registered, but not CREATED actually), such that we can associate a UUID.  This led to my original thinking that it is a 3-phase operation
 where we have to register (save in DB) the nested members first, then register the group as a whole.  But this is not client friendly.  </div>
<div><br>
</div>
<div>Like I had suggested earlier, as an implementation detail of the Group registration API (CREATE part 1 in your terminology), we can support this: as part of the group registration transaction,  complete the registration of the nested members, get their
 UUIDs,  create the InstanceGroupMemberConnections, and then complete saving the group - resulting in a UUID for the group,  all in a single transaction-scope.  While you start the transaction, you can start with a UUID for the group, so that you can add the
 group_id pointers to the individual members,  and then finally complete the transaction.   </div>
<div>This means,  you provide as an input to the REST API - the complete nested tree, including all the details about the nested members and policies, and the register API, will handle the saving of all the individual objects required. </div>
<div><br>
</div>
<div>But I think it does help to also add additional APIs to just register an InstanceGroupMember and  an InstanceGroupPolicy separately.  This might help the client while creating a group, rather than giving the entire nested tree.   (his makes it a 3-phase)
 This API will support adding members and policies to an instance group that is created.  (you can start with an empty group)</div>
<div><br>
</div>
<div><b id="docs-internal-guid-70310bda-b7ed-66d3-3c93-02366dabd279">
<div dir="ltr">
<table style="border: none; border-collapse: collapse; ">
<colgroup><col width="65"><col width="216"><col width="301"></colgroup>
<tbody>
<tr style="height: 0px; ">
<td style="border: 1px solid rgb(170, 170, 170); vertical-align: middle; background-color: rgb(249, 249, 249); padding: 3px; ">
<p dir="ltr" style="line-height: 1.25; margin-top: 12pt; margin-bottom: 12pt; "><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">POST</span></p>
</td>
<td style="border: 1px solid rgb(170, 170, 170); vertical-align: middle; background-color: rgb(249, 249, 249); padding: 3px; ">
<p dir="ltr" style="line-height: 1.25; margin-top: 12pt; margin-bottom: 12pt; "><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">/v3.0/{tenant_id}/groups/instance</span></p>
</td>
<td style="border: 1px solid rgb(170, 170, 170); vertical-align: middle; background-color: rgb(249, 249, 249); padding: 3px; ">
<p dir="ltr" style="line-height: 1.25; margin-top: 12pt; margin-bottom: 12pt; "><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">Register an instance belonging to an instancegroup</span></p>
</td>
</tr>
</tbody>
</table>
</div>
</b></div>
<div><br>
</div>
<div>
<div><b id="docs-internal-guid-70310bda-b7ed-66d3-3c93-02366dabd279">
<div dir="ltr">
<table style="border: none; border-collapse: collapse; ">
<colgroup><col width="65"><col width="216"><col width="301"></colgroup>
<tbody>
<tr style="height: 0px; ">
<td style="border: 1px solid rgb(170, 170, 170); vertical-align: middle; background-color: rgb(249, 249, 249); padding: 3px; ">
<p dir="ltr" style="line-height: 1.25; margin-top: 12pt; margin-bottom: 12pt; "><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">POST</span></p>
</td>
<td style="border: 1px solid rgb(170, 170, 170); vertical-align: middle; background-color: rgb(249, 249, 249); padding: 3px; ">
<p dir="ltr" style="line-height: 1.25; margin-top: 12pt; margin-bottom: 12pt; "><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">/v3.0/{tenant_id}/groups/policy</span></p>
</td>
<td style="border: 1px solid rgb(170, 170, 170); vertical-align: middle; background-color: rgb(249, 249, 249); padding: 3px; ">
<p dir="ltr" style="line-height: 1.25; margin-top: 12pt; margin-bottom: 12pt; "><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">Register a policy belonging to an instance
 group</span></p>
<div><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; "><br>
</span></div>
</td>
</tr>
</tbody>
</table>
</div>
</b></div>
</div>
<div><br>
</div>
<div>Are we okay with this ? </div>
<div><br>
</div>
<div><br>
</div>
<div>The next API - is the actual creation of the resources.  (CREATE part 2  in your terminology).   This is was my create API in the doc- </div>
<div>
<div><b id="docs-internal-guid-70310bda-b7ed-190b-5c46-1ae6d8bba77e"><br>
<span style="font-size: 16px; font-family: Cambria; font-weight: normal; vertical-align: baseline; white-space: pre-wrap; "></span>
<div dir="ltr">
<table style="border:none;border-collapse:collapse">
<colgroup><col width="43"><col width="274"><col width="262"></colgroup>
<tbody>
<tr style="height:0px">
<td style="border:1px solid #aaaaaa;vertical-align:middle;background-color:#f9f9f9;padding:3px 3px 3px 3px">
<p dir="ltr" style="line-height:1.25;margin-top:12pt;margin-bottom:12pt;"><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">POST</span></p>
</td>
<td style="border:1px solid #aaaaaa;vertical-align:middle;background-color:#f9f9f9;padding:3px 3px 3px 3px">
<p dir="ltr" style="line-height:1.25;margin-top:12pt;margin-bottom:12pt;"><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">/v3.0/{tenant_id}/groups/{id}/create</span></p>
</td>
<td style="border:1px solid #aaaaaa;vertical-align:middle;background-color:#f9f9f9;padding:3px 3px 3px 3px">
<p dir="ltr" style="line-height:1.25;margin-top:12pt;margin-bottom:12pt;"><span style="font-size: 16px; font-family: Cambria; background-color: transparent; vertical-align: baseline; white-space: pre-wrap; ">Create and schedule an Instance group
</span></p>
</td>
</tr>
</tbody>
</table>
</div>
</b></div>
<div>This is just the API proposal, the underlying implementation details will involve all the required logic to ensure the creation of all the group members.  Here like you also suggest, as a starting point,  we can try to first use existing Nova mechanisms
 to create the members of this group.  Eventually we will need to get to the discussions for scheduling this entire group as a whole, which covers cross-services support like I discuss in the unified resource placement document - <a href="https://docs.google.com/document/d/1IiPI0sfaWb1bdYiMWzAAx0HYR6UqzOan_Utgml5W1HI/edit?pli=1">https://docs.google.com/document/d/1IiPI0sfaWb1bdYiMWzAAx0HYR6UqzOan_Utgml5W1HI/edit?pli=1</a> </div>
<div><br>
</div>
<div>Let me know your thoughts on this. </div>
<div><br>
</div>
<div>Thanks,</div>
<div>Yathi. </div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</body>
</html>