On Mon, 2013-01-21 at 18:57 +0200, mar...@redhat.com wrote: > [patches also available from http://tracker.deltacloud.org/set/263] > > Initial implementation for networks - in particular seeking feedback > with respect to models and how they 'sit' for vsphere/rhevm (I've taken > CIMI, EC2 VPC and Openstack into consideration already). Initial > implementation of 'networks' collection for EC2 driver (create, list, show > and destroy VPC).
It might help to explain the model in words for those who are not too familiar with DC internals; in particular, it might not be obvious what relationships the various classes have (since we do not express that in our models) Just to restate what's in the model code (patch 1/3), the model seems to be (in some pseudo-AR notation): class Network string :name string :address_block enum :state # What values are allowed ? has_many :subnets has_many :ports # Can you attach a port to a network directly ? end class Subnet string :name enum :state # What values are allowed ? enum :type # What values are allowed ? string :address_block belongs_to :network has_many :ports end class Port string :name string :attachment string :mac_address string :ip_address enum :state enum :type belongs_to :network # Do we get a network or subnet here or both ? end There are various questions about the code I have based on the above but it might best to make sure we all understand what the model is supposed to be and go from there. In particular, in the above, we need to explain what the possible values for the various enums are, and I am not clear on whether a subnet can be used in various places where the code expects a network (e.g., when creating a port) David