midokura/python-midonetclient — pull request #153 by tomohikokimura (2014-04-25 10:27:04+00:00)
Title: Adds Vtep and VtepBinding to Python Client / CLI.

- Adds Vtep and VtepBinding, wrapper classes for corresponding Midonet
API DTOs.
- At the moment, all it can do is:
1) to create a VTEP,
2) list VTEPS,
3) add a VTEP binding.
- Also implemented CLI.

Sample code fragment:

# Create a new VTEP
# vtep_management_ip/port are assumed to contain right values.
vtep = mc.add_vtep().name('My VTEP').management_ip(vtep_management_ip).management_port(vtep_management_port).create()

# Add a new VTEP binding.
# bridge_id is assumed to contain a correct Mido bridge ID.
vtep_binding = vtep.add_binding().port_name('in1').network_id(bridge_id).create()

Sample CLI inputs:
create vtep management-ip 119.15.112.22 management-port 6633 name 'my cli vtep'
vtep management-ip 119.15.112.22 add vtep-binding port-name in1 vlan-id 127 network-id 9fdab92a-07ff-4616-95f4-ce53cc3f2d3f

Fix MN-1586