neutronclient v2 object model by craigtracey · Pull Request #1 · oslbaas/python-neutronclient · GitHub
Skip to content

neutronclient v2 object model #1

Open
craigtracey wants to merge 4 commits into
masterfrom
objectmodel
Open

neutronclient v2 object model #1
craigtracey wants to merge 4 commits into
masterfrom
objectmodel

Conversation

@craigtracey

Copy link
Copy Markdown

This is a work in progress of the neutronclient object model changes. Contained herein are:

  • refactoring for handling v1 and v2 simultaneously
  • deprecation of the existing object model (v1)
  • addition of loadbalancers, listeners, pools, and members.

Todo:

  • tests
  • healthmonitor

In the process of adding the LBaaS v2 object model, we have the need to
support both v1 and v2. Naturally, what this means is that we will need
to handle both the v1 objects as well as the v2 object simultaneously,
despite the fact that they have different attributes.

From this client's persepective, there is currently no good way to do
so side-by-side. Currently, the code interpolates the command to be
executed based upon the resource being acted against.  For instance,
'lb-vip-create' would be interpolated as 'create_%s' % 'vip'

This is obviously a problem as there is no way for the client to know
which version of the resource to CRUD against. So, add the concept of
a shadow_resource to handle the case where the resource name is not
the same as the command to be run.

Thihs change also moves resource shadow_resource attributes into
NeutronCommand, as they were common to all the commands already.

Change-Id: Ib6d4c66dfa14574062323704d7ca135cb3887020
With the introduction of the LBaaS v2 object model specification, all
of the current LBaaS commands will be deprecated in favor of commands
with the format 'lbaas-<object>-<action>'.  Therefore, be sure that
all of these commands indicate that they are deprecated.

Change-Id: I16df5641b6367b33d96df94ed9a8d3376de798f4
Adding listener, loadbalancer, member, and pool for the v2 LBaaS
specification. Still require more tests and the healthmonitor
class.

Change-Id: Ie50280fcbcd21b2116e14f9872f60f0693169a1a
Pushing this so that others can begin to use it.  Will be breaking
all of these commits into smaller, meaningful pieces, and adding
tests.

Change-Id: Idfd0f441c0eda44ecfccf0b82c33a30dd21b2f17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant