Commit Graph

843 Commits

Author SHA1 Message Date
OpenDev Sysadmins fb8252712f OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:59 +00:00
Ian Wienand 0fed7a2988 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I784e8df1324f3905c811c869fd689780c361965b
2019-03-24 20:33:43 +00:00
Thomas Bachman 1fb474945e Fix per-project quotas for L3 plugin
The GBP L3 plugin is using the old quotas driver. This prevents
per-project quotas for L3 resources. The L3 plugin should be
changed to support the new qutoas driver.

Change-Id: Idbc651a905ca5c567527ba2094a83b2d0486ca9a
Closes-Bug: 1709456
(cherry picked from commit 194dd33947)
(cherry picked from commit 41152b4fde)
(cherry picked from commit c5a45bd3ce)
2017-08-31 17:11:08 +00:00
Thomas Bachman 496f33f785 Fix router interface port status
The router interface port status shows as down after connecting the
router to a subnet on a tenant network. This patch fixes the behavior
by calling update_port to bind the port, which changes its status to ACTIVE.

Change-Id: I4bee2cca0eb5b5d40fb802c31307c2608e5b8d8f
Closes-Bug: 1709453
(cherry picked from commit 632d82eef9)
(cherry picked from commit cb0497c537)
(cherry picked from commit f74281b3e9)
2017-08-28 18:38:15 +00:00
Thomas Bachman 0319b1555f Fix router delete w/SNAT in non-admin projects
Deleting a router or just clearing the gateway in a non-admin project
fails when the external network has SNAT subnets. This patch fixes
that issue.

Change-Id: Ic75b2acc975ab9ba529d539a0abad189430ed737
Closes-Bug: 1709615
2017-08-09 21:07:48 +00:00
Sumit Naiksatam 4d8f512092 Fix delete_subnet patching regression
The change:
I04fb4b323029772bf417a8548ae43e2c93647b65

introduced conditional patching of the delete_subnet
method of the ML2 plugin. On account of this conditional
logic, the delete_subnet method is not patched with RH OSP9,
and consequently the transaction guard decorated version
of the delete_subnet method gets used and prevents
calling the method from within a GBP method's transaction.

This patch enhances the conditional logic by removing
the transaction guard when the delete_subnet method is not
patched.

Change-Id: Ib44f432623a06220ffee8e6bf47568c56f952be9
2017-07-25 11:21:55 +00:00
Thomas Bachman 3f154614e5 Conditionally patch delete_subnet
Recent versions of Red Hat OpenStack Director's stable/mitaka
release -- as of neutron 8.3.0-9 -- include a patch that was
abandoned upstream (see stable/mitaka version of patch with the
Change ID of Ie29acfbe323b60205ade9d660f7497f5bf4a35ca). While
this patch addresses a bug found in some configurations, it removes
code used by a similar monkey-patch applied in the GBP plugin. Since
the abandoned patch provides the same protection as the GBP monkey-patch,
we should only apply the GBP monkey-patch if the one from Red Hat hasn't
been applied already.

Change-Id: I04fb4b323029772bf417a8548ae43e2c93647b65
2017-07-18 18:55:16 +00:00
Ivar Lazzaro e6f931c750 Set AIM Tenant description field to apic_system_id
Change-Id: I4bda528ee490dd61f59c257637d8ba2c2d2753aa
(cherry picked from commit 49d9b548aa)
2017-07-13 21:52:33 +00:00
Ivar Lazzaro b914cb4546
Fix keystone client domain id to name
Change-Id: I7f4bcb5a9f82ff2f634c090b672224360b0613e9
2017-07-11 12:04:50 -07:00
Jenkins d3dc711064 Merge "Fix update floatingip description" into stable/mitaka 2017-07-06 23:12:57 +00:00
Thomas Bachman 6ed8e104d0 Fix for EOL of neutron stable/mitaka
The stable/mitaka branch for neutron has been end-of-life'd.
This patch fixes GBP to use the EOL package version.

Change-Id: Ie9674f787755ebb17b5f98b6d317410595a5ffef
2017-07-06 19:57:39 +00:00
Thomas Bachman 9359255ab6 Fix update floatingip description
The standard-attr-description extension isn't being honored during
floatingip update operations, due to the fact that the upstream neutron
code has been monkey-patched by GBP. This change set fixes the GBP
monkey-patch to properly support the standard-attr-description extension.

Change-Id: I874052879d3a51545a5b47cc362071d3f3e031d0
Closes-Bug: 1702073
2017-07-03 20:27:27 +00:00
Jenkins a0066f989a Merge "Use configured user domain and project domain on Keystone client" into stable/mitaka 2017-06-27 18:45:35 +00:00
Ivar Lazzaro f3352b325d
Use Neutron's Nova client for retrieving VMs' name
This will make sure we always use the most recently supported
authentication methods.

Change-Id: I66a64d11ae09c426ca0114020c8b985f9307515e
2017-06-26 17:04:09 -07:00
Ivar Lazzaro 8f8ff2f028
Use configured user domain and project domain on Keystone client
Change-Id: I1157acb71d9b76c1c7a9134df1500bb69dc836a2
2017-06-26 16:51:05 -07:00
Sumit Naiksatam 056817130b Configuring OS_TEST_PATH
To limit the UTs that are being run. The following paths
are being excluded to speed up py27 job excution and avoid
timeouts in the gate.

gbpservice/neutron/contrib
gbpservice/neutron/tests/unit/services/nfp
gbpservice/neutron/tests/unit/test_extension_group_policy.py
gbpservice/neutron/tests/unit/test_extension_group_policy_mapping.py
gbpservice/neutron/tests/unit/test_extension_servicechain.py

Change-Id: Id08dfba864fa95833cba564c4543aedf2581b136
2017-06-12 18:50:05 +00:00
Robert Kukura a867f38b97 [aim] Use retry_if_session_inactive in mitaka
Both the ml2plus core plugin and grouppolicy service plugin use the
retry_if_session_inactive decorator from newton.

Change-Id: I3047446068bd6be449d830018b5a1ef31233fdf9
2017-06-07 23:14:48 -04:00
Sumit Naiksatam b41c3fc959 Propagate retry exception in implicit subnet allocation
In concurrent execution cases a failure can occur in the Neutron
IPAM component due to failure to obtaining a lock. In such cases
the IPAM component raises a retry exception which should be not
be eaten, but relayed as is so that the operation can be retried.

This patch checks if the exception raised during a subnet allocation
from a subnetpool fails due to a retry exception, and if so, raises
it as is to facilitate a retry.

Change-Id: I381cdf533b27d710f68903f0cfb516043b4607d6
2017-06-09 08:40:36 +00:00
Robert Kukura 98e7f7bbd4 [aim] Fix retry issues and logging
Pass create_if_absent=False to AIM's get_status() to hopefully reduce
transaction retries due to DBDuplicateEntry exceptions. This required
unpinning the version of AIM used, as well as a couple of fixes in the
AIM repo.

Change the RPC handlers to use Neutron's retry_db_errors decorator
rather than its own, so that DBDuplicateEntry exceptions are retried.

Avoid logging at error level when processing retriable exceptions.

(cherry picked from commit 953e5d6ae5)

Conflicts:
	gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/extension_driver.py
	gbpservice/neutron/plugins/ml2plus/patch_neutron.py
	gbpservice/neutron/services/grouppolicy/drivers/cisco/apic/aim_mapping_rpc.py
	test-requirements.txt

Change-Id: I53740eea3cb7cacafceae589deec3b573ef6a68a
2017-06-07 19:37:42 -04:00
Thomas Bachman 0a65a06752 Fix auto-PTG policy for IPv6
The implicit policy created for the auto-PTG does not allow traffic
for IPv6. This prevents IPv6 traffic from flowing between PTs in the
auto-PTG and user-created PTGs, which includes things like ICMPv6,
DHCPv6, and IPv6 DNS and HTTP traffic between the DHCP server and PTs.

Change-Id: I28fe713e24744e36e2912d7f5d830b64a658f8bd
Closes-Bug: 1696438
(cherry picked from commit 5dc13b75a6)
2017-06-08 12:52:01 +00:00
Sumit Naiksatam 5f3334d573 Patching retry decorator
The stable/mitaka version of the retry decorator does not account
for all the DB exceptions (which were later added in the Newton
release). This patch defines a new retry decorator which adds
these exceptions and replaces the older decorator. This new
decorator is used in the GBP plugin.

Change-Id: If27786f24aa9f6e0425a25338289b0734d7a571a
2017-06-07 01:22:10 -07:00
Sumit Naiksatam 390118c5c6 [apci_aim] Remove use of with_lockmode in ml2plus
In certain cases of concurrent operations we are seeing an error
which suggests that a rolled back transaction is be reused. On debugging
it has been observed that the error manifests when the code path
executes the queries that are using with_lockmode in a couple of
places in the ml2 plugin component. Removing the with_lockmode usage
seems to prevent this issue and does not seem to be affecting the
correctness of behavior even in concurrent execution situations.

This patch removes the use of the with_lockmode in the identified place
when the ml2plus plugin configured.

Change-Id: If65c238cbf49a9cfd2546ca26d37ee721f6f986c
(cherry picked from commit 9d16f2cfa3)
2017-06-02 04:00:27 +00:00
Thomas Bachman 7e4345d5f4 Dual-stack support for L3 Policy
This adds dual-stack support for L3 Policy. It leverages
the existing parameters for subnetpools and address scopes,
and adds behaviors to support the implicit workflow.

Change-Id: Idedbb3d08b09e76abdba6d1aba0f62ba53a19a99
partially-implements: blueprint address-scope-mapping
(cherry picked from commit 3ca5037402)
2017-06-02 01:34:00 +00:00
Robert Kukura 750491a1d5 [apic-aim] Data migration for persisting mapping to APIC
A previous commit (https://review.openstack.org/#/c/450309/) added DB
tables mapping Neutron resource identities to APIC resource
identities, but did not include a data migration. This patch populates
the new tables during the DB migration with the APIC resource
identities for existing Neutron resources, using information from both
the Neutron and AIM DB tables.

Mechanism driver code that had been kept around in case it was needed
for the migration is also cleaned up.

(cherry picked from commit 20b25083f4)

Conflicts:
	gbpservice/neutron/tests/unit/plugins/ml2plus/test_apic_aim.py

Change-Id: Ia8a74b9c2289060234716ce89fb4b7b3d1c29596
2017-05-29 21:18:04 -04:00
Robert Kukura f1381164f4 [ml2plus] Don't eat retriable exceptions in extend_*_dict functions
(cherry picked from commit 5ad16e5672)

Change-Id: If6574e691151f90b648978cafa83345cc71556f1
2017-05-29 20:34:46 -04:00
Robert Kukura 2ce34e1a26 [apic_aim] External connectivity for multi-scope routing
Manage external connectivity for all VRFs associated with a router.

Change-Id: I6016d85b433093bee960010b57a19ceb4b78b67d
(cherry picked from commit b8e7d2afd4)
2017-05-29 16:32:47 -04:00
Robert Kukura eab6e908ef [apic-aim] Persist mapping of Neutron resources to APIC
Add DB tables mapping Neutron resource identities to APIC resource
identities. This reduces the amount of DB querying, and helps unify
the handling of pre-existing APIC resources with those fully
orchestrated by the apic_aim drivers.

Currently, the mappings of address scopes and networks are
persisted. Persisting the relationship between routers and VRFs will
be considered later.

Note that since this patch will be back-ported to stable/newton and
the QoS feature will not, this patch's DB migration is sequenced
before the QoS DB migration.

(cherry picked from commit 1ad0f7ae1b)

Conflicts:
	gbpservice/neutron/db/migration/alembic_migrations/versions/HEAD
	gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/extension_db.py
	gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/extension_driver.py
	gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/mechanism_driver.py

Change-Id: Ie06281dde965d349d7fa1035f14124b35d60d85c
2017-05-29 15:39:19 -04:00
Robert Kukura c83336c6da [apic_aim] Multi-scope routing
Allow subnets with different address scopes, as well as unscoped
subnets, to be attached as interfaces to the same router. Note that no
East/West routing is provided between differently scoped interfaces of
a router, but East/West routing is provided within each scope and
North/South routing is provided between each scope and the router's
gateway.

Routed IPv4 and IPv6 subnets on the same network currently either must
both be unscoped or each must be associated with isomorphic address
scopes (referencing the same VRF). Adding a subnet to a router results
in a NonIsomorphicNetworkRoutingUnsupported exception if this
constraint would be violated. Eventually, use of identity NAT to move
IPv6 traffic from the network's IPv4 VRF to its IPv6 VRF will allow
this constraint to be removed or relaxed.

A flag in interface_info is added for GBP to override network routing
topology validation when adding router interfaces. This should not be
used for any other purpose, and will eventually be removed without
warning.

External connectivity for routers associated with multiple VRFs will
require some follow-on work to correctly handle all cases.

(cherry picked from commit 824d897f37)

Conflicts:
	gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/mechanism_driver.py
	gbpservice/neutron/tests/unit/plugins/ml2plus/test_apic_aim.py

Change-Id: Idbbd4400e570654937c2bee4577422a91224430e
2017-05-29 12:30:40 -04:00
Robert Kukura 875104a331 Disable hacking check N531
Since hacking check N537 has recently been enabled on the master and
stable/newton branches, translation hints are no longer allowed on log
messages in neutron-lib and in repositories like GBP that inherit
thier hacking configuration from neutron-lib. A recent GBP patch
disabled the N537 check because we have not yet removed the
translation hints from existng GBP log messages.

This patch disables N320 and N531 for the GBP stable/mitaka branch as
well, so that translation hints will neither be required nor forbidden
for GBP log message. This allows translation hints to be incrementally
removed from existing GBP log messages, and new code to be merged and
back-ported without them.

Eventually, once all translation hints have been removed from GBP log
messages, N537 should be re-enabled in the master branch, forbidding
any new translation hints for log messages.

(cherry picked from commit e3968b97ba)
Conflicts:
	tox.ini

Change-Id: Ie676b10d16c3fa32e3b72e165a1f35b72f0cc472
2017-05-29 11:18:09 -04:00
Robert Kukura 2b45dfcf21 [apic-aim] Isomorphic address scopes
Allow a single IPv4 address scope and a single IPv6 address scope to
reference the same VRF, which may be pre-existing or mapped from one
of the address scopes.

(cherry picked from commit 71b3b2df67)

Conflicts:
	gbpservice/neutron/plugins/ml2plus/drivers/apic_aim/extension_db.py

Change-Id: Ibe5288a3a6d5032e4c0ac509a0857ce5defafa9c
2017-05-28 22:48:10 -04:00
Jenkins c0000a3d5c Merge "Make ensure_tenant retriable" into stable/mitaka 2017-05-27 16:41:40 +00:00
Jenkins 82f52fecdb Merge "[apic-mapping] Ignore FlushError in create PTG" into stable/mitaka 2017-05-27 16:41:34 +00:00
Sumit Naiksatam 869bdba995 Make ensure_tenant retriable
We were eating up all exceptions thrown during the ensure_tenant phase
and throwing a generic exception. In cases where the operation failed
due to concurrent operations, we would like ensure_tenant to be retried.
This adds more conditional logic to the exception handling to facilitate
retries for retriable exceptions.

Change-Id: Idbf6d82ae512b46f35f5c2b9e13b45a4ff8f1d7d
(cherry picked from commit 7c098c65e9)
2017-05-26 05:13:20 +00:00
Sumit Naiksatam ff30eab869 Adding retry decorator for plugin operations
This follows the same design pattern and uses the same decorator
used by Neutron. The plugin operations will be retried when
the following exceptions occur:
sqlalchemy.orm.exc.StaleDataError
oslo_db.exception.DBDeadlock
oslo_db.exception.DBConnectionError
oslo_db.exception.DBDuplicateEntry
oslo_db.exception.RetryRequest
oslo_db.exception.DBError (with 1035 code for SAVEPOINT errors)

Each operation will be tried 10 times before the actual exception
is raised. At that point the exception will be replaced by a
GroupPolicyDriverException and returned to the client. Retry logic
and decorator is implemented in Neutron and used as is.

Change-Id: I42e5a62e81f423bbc3a131953245b789cdb1c1c8
(cherry picked from commit ead7821d06)
2017-05-25 22:12:54 -07:00
Sumit Naiksatam 783dc00890 [apic-mapping] Ignore FlushError in create PTG
The FlushError happens when create PTG operations happen
concurrently within the same tenant. In the context
of the create PTG post-commit implementation for
apic-mapping policy driver this error is not catastrophic.
In fact, it implies that another concurrent operation has
already succeeded in creating a subnet for this tenant. Hence
we just revert the creation of the subnet, and move on.

Change-Id: If8ab52a884d6fa33ff582f2d6e24c523203d894e
(cherry picked from commit ecf58b648c)
2017-05-25 23:52:49 +00:00
Jenkins eec74ade30 Merge "[aim_mapping] Create implicit AIM contracts for existing l3ps" into stable/mitaka 2017-05-25 21:29:20 +00:00
Sumit Naiksatam f0a0e88ac0 [aim_mapping] Create implicit AIM contracts for existing l3ps
This patch facilitates migrating a deployment which had l3_policies prior to the
aim_mapping policy driver moving to per-l3p implicit AIM contracts (see commit:
f50db6f1ce)

The following configuration:
[aim_mapping]
create_per_l3p_implicit_contracts=True

controls if the migration step is perform. This configuration is set to True by default
and hence the migration step is always performed at the time of the initialization of the
aim_mapping driver. For l3_policies which already have associated implicit contracts,
this step is a no-op.

The migration step can be turned off by setting the above configuration to False.
A Neutron server restart is required for the config change to take effect.

Since this mogration option is only for migrating newton or prior deployments, it
will be removed in the O release.

Change-Id: I7e5f793bdf3618655600898feba64aac7c099239
(cherry picked from commit 36a8c13a2c)
2017-05-25 07:47:12 +00:00
Kent Wu 05bd9180e4 [AIM] suppress the DBDuplicateEntry error caused by concurrent transactions
Change-Id: I953d2a676bbafd7450059b2c8c951c537950c91d
(cherry picked from commit dde2fa0ea0)
(cherry picked from commit 9872c53514)
2017-05-25 07:39:56 +00:00
Sumit Naiksatam 924c47ff2c Disabling UTs for simple_chain_driver
The simple_chain driver is not used and not supported. Since this
is a stable branch we dont want to remove the driver. We are also not
deleting the test module, but just renaming it so that does not get
discovered in a tox run.

We are specifically targeting this test module since it has tests that
invoke the simple_chain_driver code that uses the Heat client to
connect to the Heat server. These connection attempts obviously
fail but they are retried several times, and after timing out on
each occasion. By not running these tests the hope is the py27 UT
job will speed up.

We are also patching a number of modules to reduce the logging
level from warning to info (only for UTs) to reduce the noise in
the UT logs.

Change-Id: I0170eca7b0248b390beda93e8dbd882daa676e80
2017-05-25 00:37:55 -07:00
pkharat f16514dc56 NFP - Oslo config registration in Config Orch
Adding oslo params registration section in the
config orch

Change-Id: I1287dda2dbfbbd408f1355a8dec9a9d7c20c600f
2017-05-22 14:49:56 +00:00
Sumit Naiksatam ccc9c9da35 Speedup py27 with changes to NFP testing
Currently the py27 UT job is consistently running longer than
the gate job definition allows. One of the possible reasons
is the use of the "advanced" mode in the NFP tests initialization
which in turn causes use of RMQ server and which fails with timeouts
and multiple retries. Ideally this RMQ server use should be mocked
for UTs. This patch switches the NFP mode to "base" which does not
use the RMQ server and the timeouts are not being seen anymore.

In addition, this patch also temporarily disables the UTs in the
contrib directory to keep it consistent with the newton and master
branches where we don't see the timeout issues.

Change-Id: I2df99f1b94f5574b15c348df69300692f4e14da3
2017-05-21 14:21:48 -07:00
Kent Wu 12b1b6ce63 [AIM] Late binding of the VMM and physical domain
1. only associate the domain with the EPG when a port is created on
a host that belongs to this domain.
2. also dis-associate the domain when the last port among all the hosts
under this domain is deleted.
3. User has to use:
'aimctl manager host-domain-mapping-create <host_name>
--vmm_domain_name=<vmm_dom> --physical_domain_name=<phys_dom>'
to create the host -> domain mapping.

Change-Id: Ie0882117b75ada3c2f32770adc7bc147a61dfd14
(cherry picked from commit 91d7ea20a4)
(cherry picked from commit 23dd19d3f6)
2017-05-05 15:36:39 -07:00
Sumit Naiksatam c39269a6c6 [aim_mapping] Per-l3p implicit contracts
The implicit AIM contracts were being earlier created
per tenant (lazily created when the first l2p is created)
and used by the default_epg and all other epgs created by
a consequence of the user actions. As we move towards a model
of supporting multiple l3ps in the same AIM VRF, we will
need per-l3p contracts to enforce isolation between l3ps. This
patch is the first step in that direction where the per-tenant
implicit contracts are now created per-l3p. Contracts are created
when l3p is created and deleted when l3p is deleted.

This patch also fixes the problem of implicit contracts being
not cleaned up when the last two l2ps in a tenant were being
deleted concurrently.

Existing AIM deployments might need to be migrated to this new model.
Migration strategies would differ per deployment but might at least
require running a script that creates the implicit contracts per
existing l3ps.

Change-Id: I7f18c672db5ffcec9ce445bc1a32d508a685c9c6
(cherry picked from commit 476e7c6506)
2017-05-02 15:55:05 -07:00
Thomas Bachman 3cab695e0c Allow v6 subnets on routers
The current ML2plus driver throws an IPv6RoutingNotSupported
exception if a v6 subnet is attached to a neutron router. This
patch relaxes that constraint.

Change-Id: Iaebcba643eb9ad394a665521afaf4c4d7c0b1c72
partially-implements: blueprint address-scope-mapping
(cherry picked from commit 53c215d760)
(cherry picked from commit 73180e1189)
2017-04-26 18:27:45 +00:00
Thomas Bachman 855d36985e Dual-stack implicit subnetpools
Commit 3565d7496f added the
implicit subnetpool extension. That commit limited the semantics
to only cover a single address family. This patch extends that
commit to scope the semantics by address family. This means that
there can be an implicit subnetpool per project per address family,
and there can be a shared implicit subnetpool  per address family.

Change-Id: I30b3bd5ac92bd4c51927225af0b21ea5fc570d5b
2017-04-26 14:30:57 +00:00
Rajendra Machani 5350967066 NFP[Contrib] - Vyos service day0 configuration
Vyos service day0 configuration installation. Vyos password is
by default 'vyos' after installation. User can still customize
the password in the day0 file before service launch.

Change-Id: I5041f8b8fcfe1e70c3c2b54076d586ca87b54925
Closes-Bug: 1681471
2017-04-22 02:03:38 +00:00
mak-454 5f34af5bdc NFP - Failure handling in Configurator
1) Added support to utilize NFP context supported
by nfp/core. Initializes context with default
values in all external functions which are invoked
via rpcs.

2) Fixed the issue with bulk firewall rules (>250)
and which gets multipled by number of consumers.

Change-Id: I38b3cc6c3c0d5d293df709ede4065899f2f646a4
Closes-Bug: 1668198
2017-04-22 02:03:11 +00:00
mak-454 ba520e0121 NFP - Context support in Config Orchestrator
Added support to utilize NFP context supported
by nfp/core. Initializes context with default
values in all external functions which are invoked
by rpcs.
Uses the same context to store meta info used by
logger class.

Change-Id: Ib1616e817d2675e5efdc47359c6feaa5148bf8a2
Partial-Bug: 1668198
2017-04-22 02:02:55 +00:00
mak-454 683f860306 NFP - Context support in Proxy Agent
Added support to utilize NFP context supported
by nfp/core. Initializes context with default
values in all external functions which are invoked
by rpcs.

Change-Id: Iac0c02bc229e2127f170e952782017eb4ac34f79
Partial-Bug: 1668198
2017-04-22 02:02:28 +00:00
mak-454 8e5f5ae865 NFP - Failure handling in Orchestrator
Added following support :
1) Context managers,
   1.1) To be used with python 'with' statement.
   1.2) support 'retry', 'ignore' and 'lock' functions.
         -> retry : retry a func for n counts
         -> ignore: Ignore certain expected exceptions.
         -> lock: Lock a db transaction
   1.3) NFP module need not handle all possible exceptions
        as try-except branches.

2) Single class Exception Handling :
   All the exceptions from module will be caught by nfp/core
   and the registered exception handler will be invoked with
   all the relevant details (event, data, context, exception..)

3) Used 'context manager' retry function with client methods,
   Neutronclient, Novaclient etc.. especially for GET methods.
   E.x, GET_TOKEN is retried 'n' times to overcome any
   temporary failures with keystone.

Change-Id: I4dd520e1dc83db20b757e875c84782ca2ab5430e
Partial-Bug: 1668198
2017-04-22 02:02:10 +00:00