Adds the logic to auto generate binding_urls and user this
binding_url to retrieve ipaddress for port.
Change-Id: I3c83ec3f23fae271c775c9b862bc9ba0c9b9e1ff
If we need to add ip address when we are doing bindings,
we should add ip address as an attribute to BaseServiceBinding.
By adding it to the BaseServiceBinding, we will enforce all bindings
to have a consistent name across all services.
For example, in ietf-sfc we have both sfDataPlaneLocator and
sffDataPlaneLocator which extends BaseServiceBinding.They named their
ip address attribute “ip”. For net-l3vpn, they have vpnBinding extends
BaseServiceBinding, and it name its ip address attribute “ipaddress”.
This inconsistence in naming the ip attribute causes some troubles
in auto generating the backend.
Change-Id: I9f3f53937ae25e5e1dbfc5939db18d476c137f86
The append_model() function in the generator.py file has a confusing else
statement. There is no need for setting
model['file_version'] = yaml_dict['file_version'] as entering the else
statement implies they are equal.
Change-Id: I5278677ac5890350dfac6d58cc8b04ff91f33849
State_path is defined in gluon/conf/config.py, its default value is $gluon_home/gluon.
In the [default] section of the /etc/proton/proton.conf file, its value overrided to
/opt/proton/ which can cause confusion. This patch changes it back to use default value
for state_path defined in gluon/conf/config.py.
Change-Id: I6af2d7e04e51b0476430975c10cc01fca24c9d9d
In do_post, "status_code != 201" is checked for twice, one of them should be "status_code != 200"
Change-Id: Ia344225f1d5a013183d6af2c7876f4acab401546
Closes-Bug: #1719476
When backend driver generates url, it need to add the version
number into the url.
Before: /proton/net-l3vpn/ports/<id>
After: /proton/net-v3vpn/v1.0/ports/<id>
Change-Id: I4ccccc0312ad8613d55abb0daadf8160f704ed17
When deleting net-l3vpn port, TypeError: delete_port() takes exactly 3 arguments (4 given).
delete_port() is called in File "/usr/lib/python2.7/site-packages/gluon/shim/api_models/net_l3vpn.py",
line 229, in handle_port_delete self.backend.delete_port(key, self.model, deleted_obj).
Change-Id: I1cb080104cfa1decdc3b8f45d102636d3d1e6af7
Currently several warnings are being thrown when running
tox -e docs, this is an attempt to fix those warnings
Change-Id: I26f3e1d83f2bfc7c5d5cd2a9393b24c992ff1122
There is "model = load_model_for_service(service)" in function ”build_api()“.
And ”model“ can be used more reasonably in the function.
Change-Id: I26ed5314d0c27e8ddf0c32a2f38b91648de5e577
As a follow up to Icd44684b3d05ff6a07665348c08adff8245f2523
Use cors.set_defaults instead of app.set_latent.
Change-Id: I0dfe41ecb95182ce9a66d247f7120dadf3ae4b9f
For user authorizations, oslo_policy need to load the rules and policies defined in the policy.json file. When the oslo_policy
enforcer is initializing it will look for the path of this file in
cfg.CONF. Gluon needs to add this configuration option to its
configuration.
Change-Id: I248d5c00a7259bb62bacf20d3ea2975293500c5e
This patch only moves rule definitions from policy.json to code.
Policies definitions e.g. "create_ports" or "get_ports" will
still be defined in the policy.json file.
In the future, policy definitions will be auto generated from model's
yaml files[1]. Then policy definitions will be removed from the
policy.json file.
[1] https://github.com/openstack/gluon/blob/master/doc/source/devref/gluon-auth.rst#defining-authorization-rules
Change-Id: I266ea81d1df198e775a93902984d9865fc6201a0
This is the first commit that starts the process of moving hardcoded
constants into config files. There will be more commits in future
as we identify more hardcoded constants in our code.
Change-Id: I0605567c8fa34cb0e809525b4b9194ebd02751eb
This patch impletements the Proton Version Management specifications
located here: https://review.openstack.org/#/c/456772/
Change-Id: I7581b55dbaac170439ac9274454a5e2c553fa7ca
oslo.db removed the deprecated sqlite_db option in its set_defaults()
method in [0]. This patch set updates the code and fixes the gating error.
[0] cc64f70105
Change-Id: If31a15fe594243162315cd75f561d11e20fc3241
This is an initial version of a Gluon API model for the IETF SFC
model.
Note: This is is a simplified version targeting the Gluon demo at the
Boston OpenStack summit. It does not fully represent the IETF SFC model.
The model is supposed to be extended in future releases.
Change-Id: I243f10be4f39baa6bce767283070e2a4915ef93a
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable.
2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ida473d702a89e067c350c5cfde6c1982fb466577
This patchset extends the existing L3VPN model with additional
objects which allow to configure BGP peerings between SDN controllers
or data center gateways.
Change-Id: Id4d8e572f75e7246e9fa7006c792df31b13cea2f
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
Service API Models are defined in gluon/models directory, where each
sub-directory is a model of NFV networking service. An exemplary structure
looks like:
gluon/models/net-l3vpn/api.yaml
A more generic example looks like:
gluon/models/<service>/<name>.yaml
Currently, in gluon/cmd/config.py, service model is net-l3vpn only by
default. When a new service model is added, we need to add the new
service model in "service_list" of proton.conf, and restart the service
by something like:
proton-server --config-file proton.conf
If some user forgets to add it to proton.conf, even if new service model
is defined appropriately, Proton Server only loads net-l3vpn by default.
This patch changes the default model to be all models under gluon/models
directory. This means that if a user adds a service model definition, he
does not have to change proton.conf. By simply restarting proton-server,
all models will be loaded by default. The user needs to change proton.conf
ONLY IF he has specific needs of supporting specific service(s).
So this patch improves usability of adding / removing new service models
on-demand.
The original work is credited to Thomas Hambleton.
Change-Id: If2e5b7225105ca0dbbda4bb85090ce3c86e0e7f8
Signed-off-by: Bin Hu <bh526r@att.com>
Uncommenting a previously commented import statement. This import
statement is needed to load the configuration options of the
proton server.
Change-Id: I507070825d9e3d9064d0924eaea4d6e610590c48
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
The sqlite_db config option was deprecated and has now been
removed from oslo.db which breaks this basic test. We use a
simple hardcoded database name instead.
Change-Id: I164f3523d3561340bdc85433075f49e551a6a3da
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
Romove unused import statements from unitest files.
Also comment out unused import statements from non-test files,
keep them there in case they are needed in the future.
Change-Id: Id2d900839ec364c0b9108ef1c81e71ffe51207ff
When accessing Base URL, a description text will be shown.
Current description text is out of date. This patch updates
the description text to match current Gluon design.
Change-Id: I19613f43a29d66d36168f7bef037bdce541123b8
Signed-off-by: Bin Hu <bh526r@att.com>
This patch modifies the ODl shim layer to comply with the revised
port and interface binding model in Gluon.
Change-Id: Ib4c7800203165474b4b72ac40ab5ef363d831d0c
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
In OPNFV Apex deployments, the etcd server listens only at a
specific host IP address, not localhost. As a result, the Gluon
plugin cannot talk to etcd in such deployments.
This fix (mis-)uses the Neutron bind_host configuration option
to allow the Gluon ML2 plugin wrapper to idenify the IP etcd
is listening on. This should be replaced by a proper config
option later on.
Change-Id: Ib9d958c267d0364889e1213f9fc7c93b4fd04d89
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>