nuagenetworks / vspk-python

A Python library for managing Nuage through its API
http://www.nuagenetworks.net
BSD 3-Clause "New" or "Revised" License
17 stars 19 forks source link

VSPK way of assigning NSG UBR Instances to an UBR Group #13

Closed hellt closed 7 years ago

hellt commented 7 years ago

Hello there, I cant figure out what is the vspk way of assigning an UBR instance to an UBR group? Seems like the current way is either non exposed to VSPK or does not follow the VSPK methods:

### CRUD Operations

`bambou.NURESTObject` allows to perform all sorts of CRUD operations.

* `bambou.NURESTObject.fetch`
* `bambou.NURESTObject.save`
* `bambou.NURESTObject.delete`
* `bambou.NURESTObject.create_child`
* `bambou.NURESTObject.assign`
* `bambou.NURESTObject.instantiate_child`

From the real data exchange process I see the following:

image

nsgateway is created under the ducgroup object, but this is not an nsgateway object that is placed under the ducgroup but only its ID. This type of assignment I have never seen, and I do not know how to create a child with its ID only...

/cc @pdellaert

hellt commented 7 years ago

Same goes to assignment of NSG instances to NSG Group

pdellaert commented 7 years ago

You have to use the assign method as the NSG is a member of ducgroup: https://github.com/nuagenetworks/vsd-api-specifications/blob/7ae0d718ca2480d8057be0f591e30fe6301e228b/ducgroup.spec#L94

Check https://nuagenetworks.github.io/2016/03/04/Scripting-with-Nuage-VSPK-Part-2-Advanced-concepts-examples.html and search for 'The Assign method' for more details

hellt commented 7 years ago

My bad, sorry =( I searched for this one and failed to spot this relationship... Now I know that I need to look for children leaf. Thanks Philippe