client: make query in list_tenant() optional

(otherwise the CLI breaks)

Fixes MN-561

Signed-off-by: Guillermo Ontanon <guillermo@midokura.jp>
Merge pull request #60 from gontanon/tenant

client: make query in list_tenant() optional
CLI: fix autocomplete bug

The FieldByName token was completing even when not at the end of the
argument list.

This patch also fixes a redundancy in the Show command grammar.

Fixes MN-569

Signed-off-by: Guillermo Ontanon <guillermo@midokura.jp>
Merge pull request #62 from gontanon/mn-569

CLI: fix autocomplete bug
Update version to 1.2.0-rc2

Signed-off-by: Galo Navarro <galo@midokura.com>
Merge pull request #63 from srvaroa/v1.2.0-rc2.release

Update version to 1.2.0-rc2
Add new client APIs and midonet-cli

- Added new API for the system_state URI.
- Added new API for the write_version URI.
- Added corresponding updates to the midonet-cli

Signed-off-by: Joe Mills <joe@midokura.com>
Merge pull request #64 from JoeMido/MN-564

Add new client APIs and midonet-cli
Add new "availability" field to system_state

Fix MN-583

Signed-off-by: Joe Mills <joe@midokura.com>
Merge pull request #65 from JoeMido/avail_field

Add new "availability" field to system_state
Add host_version client API

- Added new get_host_versions API
- Added new HostVersion object
- Added HostVersion to the midonet-cli

Signed-off-by: Joe Mills <joe@midokura.com>
Merge pull request #66 from JoeMido/MN-620

Add host_version client API
Add support for Router/Bridge port DTOs.

Deprecate Interior/Exterior* port types and replace them with
Router/Bridge DTOs.

Signed-off-by: Ryu Ishimoto <ryu@midokura.com>
Add helper methods to get DHCP data

Add methods to get DHCP host entry given mac and IP.

Signed-off-by: Ryu Ishimoto <ryu@midokura.com>
Add fake port group fields for rule

Rule accepts port group dst and src so that the integration work
can go on without getting API errors.  This is intentional as
this feature will be implemented soon.

Signed-off-by: Ryu Ishimoto <ryu@midokura.com>
CLI: use the unified ports API

Signed-off-by: Guillermo Ontanon <guillermo@midokura.jp>
Add support for port to get back port group membership

Implement the client side for the feature to return port group
membership given a port.

Signed-off-by: Ryu Ishimoto <ryu@midokura.com>
Add new methods to add rule and route

Add methods to add rule and route that require no chaining.

Signed-off-by: Ryu Ishimoto <ryu@midokkura.com>
Fix _ensure_application()

Previously, the first time _ensure_application() was called, if
the mido-api was down then the self.app.get() request would fail
with a socket error. The next time _ensure_application() was
called, self.app is already set so it does nothing. Instead after
_ensure_application passes the subsequent request will
fail because self.dto is still empty.
This commit just resets self.app to None if get() fails.
Note:
_ensure_application() wouldn't fail twice in the real world
since the first time (uncaught socket error) would crash the
plugin, however in the debugger the previous behaviour
was very confusing since the error would shift somewhere
else after the first call.
Add methods to link and create port.

Add methods useful to remove need for chaining.

Signed-off-by: Ryu Ishimoto <ryu@midokura.com>