« Previous | Next » 

Revision 8e265865

ID8e265865e95b616fb119859625f8de7f50b68c73

Added by Dimitris Aragiorgis over 11 years ago

Refactor NETWORK_TYPES

NETWORK_TYPES get PUBLIC/PRIVATE reduntant string removed.
Network is public/private depending on Network.public flag.

Introduce different flavors per network type. Each flavor has
mode, link, pool, mac_prefix, tags.

Introduce new util function that gets flavor, mode, link, pool,
mac_prefix, tags and overrides flavor's defaults with the given
(if any).

By default MAC_FILTERED uses MacPrefixPoolTable while
PHYSICAL_VLAN used BridgePoolTable.

In settings only DEFAULT_ROUTING_TABLE and DEFAULT_BRIDGE exist.

Network.type and Network.mac_prefix are now optional.

NETWORK_FLAVORS = {
'IP_LESS_ROUTED': {
'mode': 'routed',
'link': settings.DEFAULT_ROUTING_TABLE,
'mac_prefix' : None,
'pool': None,
'tags': ['ip-less-routed'],
},
'MAC_FILTERED': {
'mode': 'bridged',
'link': settings.DEFAULT_BRIDGE,
'mac_prefix' : 'pool',
'pool': MacPrefixPoolTable,
'tags': ['mac-filtered'],
},
'PHYSICAL_VLAN': {
'mode': 'bridged',
'link': 'pool',
'mac_prefix' : None,
'pool': BridgePoolTable,
'tags': ['physical-vlan'],
},
}

Make snf-manage network-create command as free as possible. It
is now able to create a network based on an existing flavor and overide
its attributes if corresponding options are passed.

API blocks creation of public networks.

Signed-off-by: Dimitris Aragiorgis <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences