Hi David: On 22/01/13 03:06, David Lutterkort wrote: > On Mon, 2013-01-21 at 18:57 +0200, [email protected] 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)
obviously there's a lot to be discussed - for now here's some prelim notes and answers to your initial questions (inline). I can organise these into some kind of blog post if that would help, but for now: ============= + Links to APIs: * Amazon VPC: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Introduction.html , http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVpcs.html , http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSubnets.html * Openstack Quantum: http://docs.openstack.org/api/openstack-network/2.0/content/Concepts-d1e369.html * CIMI Networks: http://dmtf.org/standards/cloud (see DSP0263): http://dmtf.org/sites/default/files/standards/documents/DSP0263_1.0.0.pdf ============== + Proposed Mappings: * Network <===> EC2 'VPC', Quantum 'Network', CIMI 'ForwardingGroup' * Subnet <===> EC2 'Subnet', Quantum 'Subnet', CIMI 'Network' * Port <===> EC2 'Elastic Network Interface' (not necessarily - perhaps no mapping needed), Quantum 'Port', CIMI 'Network Port' > > 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 ? > * EC2 VPC: {pending, available}, * Quantum Network: either the 'status' attribute which can be {ACTIVE, DOWN, BUILD, ERROR} OR the 'admin_state_up' attribute which can be {true, false} , * CIMI ForwardingGroup: none - though CIMI Networks have state (mapped to subnet, see below) > has_many :subnets > has_many :ports # Can you attach a port to a network > directly ? * EC2 VPC: no, you launch machines into 'subnets', * Quantum Network: yes, Port has a 'network_id' attribute, * CIMI Network: yes, Network has a NetworkPort collection. > end > > class Subnet > string :name > enum :state # What values are allowed ? * EC2 Subnet: state attribute {pending,available}, * Quantum Subnet: none (no state/status attribute), * CIMI Network: state attribute {CREATING,STARTING,STARTED,STOPPING,STOPPED,DELETING,ERROR} > enum :type # What values are allowed ? * EC2 Subnet: none - potentially could report the 'availability-zone' here (perhaps change variable name? type => 'availability' or 'realm' - still makes sense for CIMI Network... availability/realm = PUBLIC || PRIVATE) * Quantum Subnet: none * CIMI Network: networkType attribute: {PUBLIC, PRIVATE} > 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 ? * EC2: no 'Port' entity - unless we want to involve Elastic Network Interfaces but not convinced we need it - machines are launched into 'subnet' by providing the subnet_id * Quantum Port: this points to a 'network'. A port *is* also associated with a 'subnet' but via the 'ip_address', since in Quantum Subnets have cidr block but networks don't. * CIMI Network Port: points to a Network > 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) hope the above is at least of some help - at least to get the conversation going, marios > > David > > >
