devigned / profile-playground

2 stars 1 forks source link

What tools are needed to ensure self-contained model types for a resource/api version #11

Open markcowl opened 7 years ago

markcowl commented 7 years ago

Model types from a particular api-version cannot be used by operatiosn from a different api-version (for example, VMSS cannot use VM models. VMSS Network mdels cannot use Network typoes. How do we enforce that the models in api-versions are self-contained.

Also, do we need some mechanism for converting certain types (NIC -> VMSS NIC, for example)

devigned commented 7 years ago

One thought that initially comes to mind is that we dangle models factories off of the resource type rather than at the RP level.

Perhaps, something like the following would work:

var latestClient = new Client();
var plan = latestClient.Compute.VirtualMachines.Models.Plan(...);
var vm = latestClient.Compute.VirtualMachines.Create(...);