742 Commits

Author SHA1 Message Date
zhiyuan_cai
359ad4131e [Urgent] Fix fip creation error
1. What is the problem
In the patch[1] for solving bug[2], we introduce an error that when
a fip is created with port ID and the bottom port is not there, the
fip body is not returned. Our smoke test doesn't find out this error
because it only affects the response, the fip is correctly created
in the database. But the log does show an error message.

2. What is the solution for the problem
Always return fip body. Unit test is modified to use the returned
body to ensure it's not None.

3. What features need to be implemented to the Tricircle to
realize the solution
N/A

[1] https://review.openstack.org/#/c/465870
[2] https://launchpad.net/bugs/1691918

Change-Id: I71fcc8fab9fb2a50ab058d67980f6e1e1e4e6d90
2017-06-24 15:35:13 +08:00
Jenkins
582e2becc8 Merge "Updated from global requirements" 2017-06-24 03:53:22 +00:00
Jenkins
966facc228 Merge "Move QoS service spec" 2017-06-24 01:42:35 +00:00
OpenStack Proposal Bot
3747557117 Updated from global requirements
Change-Id: I657259057a8eebf3adaaeaedc753326f66faf5e0
2017-06-23 18:16:24 +00:00
Jenkins
35983b6d83 Merge "Use job API to check job status in smoke test" 2017-06-23 02:52:16 +00:00
CR_hui
3859f5d94d Move QoS service spec
1. What is the problem
The QoS service will release in Pike, and the spec now in Ocata folder.

2. What is the solution to the problem
Move QoS spec from Ocata folder to Pike folder.

3. What the features need to be implemented to the Tricircle
to realize the solution?
QoS.

Change-Id: I347a3a5460541f4ca69cdca8b8c2633bbcd3a4b4
2017-06-22 16:03:02 +08:00
Jenkins
1e6f89ff11 Merge "[Urgent] Fix sec-group unit tests and smoke tests" 2017-06-19 05:58:18 +00:00
zhiyuan_cai
31c45b33dc [Urgent] Fix sec-group unit tests and smoke tests
1. What is the problem
(1) In this patch[1] of Neutron project, new object model for security
group is used. As a result, the "remote_ip_prefix" field returned
by "get_security_group_rule" is an AuthenticIPNetwork object instead
of a string, so our "_compare_rule" method fails to recognize two
identical rules.
(2) After this patch[2] of devstack-gate project, horizon is no longer
the default project to be deployed in gate test, so enable horizon in
our own local.conf without explicitly enabling horizon in the gate test
will cause gate test to fail.

2. What is the solution for the problem
(1) Use str() to transform the AuthenticIPNetwork object to string.
(2) Disable horizon in our own local.conf since we don't need it.

3. What features need to be implemented to the Tricircle to
realize the solution
N/A

[1] https://github.com/openstack/neutron/commit/
af52d499a53f9dddacd8c9116d1bb0570e8f579c
[2] https://github.com/openstack-infra/devstack-gate/commit/
e1b6e9f1d6532fe87a8947a633e254d14aeb8fc0

Change-Id: I57ac130cb2383f2912fc6c0af646fb84ab2cdd90
2017-06-19 10:12:53 +08:00
Jenkins
d5197c87e2 Merge "Set access_policy for messaging's dispatcher" 2017-06-14 13:41:13 +00:00
Jenkins
dab6d071c5 Merge "Networking QoS service spec" 2017-06-14 13:38:48 +00:00
Jenkins
f549d8fb41 Merge "Using assertIsNone() instead of assertEqual(None)" 2017-06-13 11:00:48 +00:00
Jenkins
c6aa4f02ef Merge "Fix some reST field lists in docstrings" 2017-06-13 10:06:25 +00:00
CR_hui
0909e67dee Networking QoS service spec
1. What is the problem
QoS is defined as the ability to guarantee certain network requirements
like bandwidth, latency, jitter, and reliability in order to satisfy a
Service Level Agreement (SLA) between an application provider and end
tenants. Networks or ports in local Neutron can not be associated with
QoS policy automatically yet.

2. What is the solution to the problem
Using asynchronous jobs to complete the automation of QoS policy/rule
in local Neutrons.

3. What the features need to be implemented to the Tricircle
to realize the solution?
QoS.

Change-Id: I8dcce7d35d7fe7283cdeb80d71259d3f3859406b
2017-06-13 08:29:12 +08:00
zhiyuan_cai
66249ed25e Use job API to check job status in smoke test
1. What is the problem
In smoke test, we use database query to check if there are running
jobs. OpenStack CI may use different database backends so we need
to write scripts for different backends.

2. What is the solution for the problem
Job API has been merged, we can use it to check job status.

3. What features need to be implemented to the Tricircle to
realize the solution
No new features

Change-Id: I3eeb05f3fb4ea188eea4633b64f0f22332887559
2017-06-12 11:20:36 +08:00
zhiyuan_cai
9897c65a26 Local FIP not created after central FIP creation
1. What is the problem
After booting a VM, we associate a FIP to it via central Neutron.
However, local FIP is not created as expected. Also, there is no related
asynchronous job registered.

The reason may be that we don't trigger asynchronous job in
"create_floatingip" method, and since VM is already there, there's no
chance to trigger the job.

2. What is the solution for the problem
If "port_id" is specified in the body, trigger asynchronous job.

3. What features need to be implemented to the Tricircle to
realize the solution
Support creating FIP with "port_id" specified.

Change-Id: Iceb15f68acc23f8dcb8767ac0371947334a1e9db
Closes-Bug: #1691918
2017-06-12 09:54:28 +08:00
Jenkins
9bffb43330 Merge "Reconstruct unit tests" 2017-06-10 10:36:52 +00:00
OpenStack Proposal Bot
c2b93a797b Updated from global requirements
Change-Id: Ic35511809344b6cedb41357158eae5dbcaf2c512
2017-06-09 20:50:10 +00:00
zhiyuan_cai
0d8b6514df Reconstruct unit tests
1. What is the problem
In our unit tests, test_central_trunk_plugin and test_central_plugin
share many codes in FakeSession, FakeQuery and FakeClient.

2. What is the solution for the problem
Move FakeSession, FakeQuery and FakeClient to a common module so we
can reuse them in the later development of unit tests.

3. What features need to be implemented to the Tricircle to
realize the solution
N/A

Change-Id: I79078cc5a561f95b1e46a046c0bf0babf9d38363
2017-06-09 13:00:20 +08:00
Jenkins
8299f32d5e Merge "Remove deprecated oslo_messaging.get_transport" 2017-06-08 08:40:30 +00:00
Jenkins
fb622c8362 Merge "Boot a VM in a subnet without gateway" 2017-06-08 02:14:01 +00:00
Ngo Quoc Cuong
578a76abd3 Remove deprecated oslo_messaging.get_transport
DeprecationWarning:
Using function/method 'oslo_messaging.transport.get_transport()'
is deprecated: use get_rpc_transport or get_notification_transport.

Replace get_transport with get_rpc_transport.

Change-Id: I18eddf2cb1ae7f50f2c5c9ccf30b87cadc34d3a3
2017-06-08 08:18:34 +07:00
lingyongxu
ce4f07e575 Using assertIsNone() instead of assertEqual(None)
Following OpenStack Style Guidelines:
[1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Unit test assertions tend to give better messages for more specific
assertions. As a result, assertIsNone(...) is preferred over
assertEqual(None, ...) and assertIs(..., None)

Change-Id: I378da84574fd06d873c72bb9b05cfe7da75c4cfe
2017-06-07 10:38:13 +08:00
Jenkins
ae58f7f4e6 Merge "Router update should not touch nonexistent local router" 2017-06-07 01:51:38 +00:00
Jenkins
5a3557a1ca Merge "Remove tricircle tempest plugin" 2017-06-01 02:25:06 +00:00
Chandan Kumar
f78d30e1c6 Remove tricircle tempest plugin
* The tricircle projects contains the skeletion of tempest plugin and
  there is nothing implemented with in the plugin and the existing plugin
  extension is breaking the tempest cli. So it is better to completely
  remove the plugin.

* In future, if we need tempest plugin for tricircle, we need to implement
  in a seperate repo.

Change-Id: I2dbf532ae9b33035187f92b9092af6d26eaba338
Closes-Bug: #1693546
2017-05-31 11:42:54 +05:30
Jenkins
9c87a8ad67 Merge "Work with cell v2" 2017-05-27 09:28:40 +00:00
zhiyuan_cai
6f9928bf8d Work with cell v2
1. What is the problem
We try to figure out a way to integrate Tricircle with Nova cell v2.

2. What is the solution for the problem
The basic idea is to start a local Neutron server for each cell. Nova-
compute in each cell is configured to talk to local Neutron server in
the same cell. All local Neutron servers are configured to talk to the
very one Nova-API.

Currently DevStack doesn't support multi-cell deployment, so we try to
deploy it with our own plugin. In node1, Nova services are started as
before, but we change the region of Nova-API, Glance-API and placement-API
from RegionOne to CentralRegion. Local Neutron server is also configured
to talk to Nova-API in CentralRegion. In node2, Nova-API is enabled at
first, since we need DevStack to help us create the related database.
After the DevStack start in the node2, we manually stop Nova-API and
Nova-scheduler in node2.

One document discussing the detailed setup and trouble shooting steps
is added.

3. What features need to be implemented to the Tricircle to
realize the solution
Tricircle can work with Nova cell v2.

Change-Id: I6ba8e1022d83f40df36464abfdd7b4844673b24d
2017-05-27 16:42:28 +08:00
Jenkins
a9782509e0 Merge "Add networking terms used in Tricircle" 2017-05-26 09:07:20 +00:00
zhiyuan_cai
6c227a18bc Router update should not touch nonexistent local router
1. What is the problem
Set external gateway to a router, if error occurs during local router
creating/updating, exception will be raised, but this time central
router is already updated with external gateway information. So when we
try to unset the external gateway, central Neutron server will try to
remove external gateway for local router first, if local router doesn't
exist at this time, we have no way to unset the external gateway since
we fail to remove external gateway for local router.

2. What is the solution for the problem
Do not try to remove external gateway for a nonexistent local router.

3. What features need to be implemented to the Tricircle to
realize the solution
N/A

Change-Id: Id7261640405d4d24c8523f6518ec19edc031024b
Closes-Bug: #1693138
2017-05-26 10:20:48 +08:00
zhiyuan_cai
ed79a4d738 Boot a VM in a subnet without gateway
1. What is the problem
We can create a subnet without gateway in the central Neutron, but when
we boot a VM in that subnet, the request fails since local Neutron is
trying to calculate the IP allocation pool based on the central subnet
gateway IP, which is None.

2. What is the solution for the problem
If a central subnet doesn't have gateway, do not re-calculate local IP
allocation pool when creating local subnet.

3. What features need to be implemented to the Tricircle to
realize the solution
Support booting a VM in a subnet that has not gateway

Change-Id: I04f7f9f9926f22bca3490ee46e2163b9c17bb8fe
Closes-Bug: #1693446
2017-05-25 17:35:32 +08:00
joehuang
7eecb06e38 Add networking terms used in Tricircle
1. What is the problem?
There are no unified terms used in Tricircle networking, this
will lead to confusion for the end user.

2. What is the solution to the problem?
Add networking terms to ease Tricircle networking automation,
reduce the misunderstanding on the networking guide.

3. What features need to be implemented to the Tricircle to realize
the solution?
None

Change-Id: Ie857d7ce6cab7ab4545da6363cc70eb8c621d755
Signed-off-by: joehuang <joehuang@huawei.com>
2017-05-25 02:34:06 -04:00
ZhangHongtao
21899f043c Fix some reST field lists in docstrings
Probably the most common format for documenting arguments is reST field
lists [1]. This change updates some docstrings to comply with the field
lists syntax.

[1] http://sphinx-doc.org/domains.html#info-field-lists

Change-Id: I6b783d7c92852d656586e30d2456218436d1a015
2017-05-23 16:22:19 +08:00
Ngo Quoc Cuong
b4ebcb676f Remove the deprecated tempest.test.attr
[1] moves the attr decorator from test.py to tempest/lib. So, all the
references to tempest.test has to be moved to tempest.lib.decorator.

[2] https://review.openstack.org/#/c/456236/

Change-Id: I26a45e54dbb58bd975a403eb62fdba0dde165fa6
2017-05-22 09:45:09 +07:00
Jenkins
3f2480027d Merge "Include tricircleclient installation" 2017-05-19 02:43:48 +00:00
Jenkins
595e83e615 Merge "Optimizing some logic in the code when creating pod" 2017-05-19 02:16:58 +00:00
Victor Morales
5f90f95291 Include tricircleclient installation
1. What is the problem?
The python-tricircleclient has been included as part of the OpenStack
official repositories[1] but their integration hasn't been done in
Devstack.

[1] https://review.openstack.org/#/c/426419/

2. What is the solution to the problem?
Add the required instructions to control the installation of the
client in the plugin.sh script.  Usually those instructions have a
standard format which needs to be follow.

3. What the features need to be implemented to the Tricircle
   to realize the solution?
None

Change-Id: I0f2df46316f191c443b9192875868d4c7be96c1b
2017-05-18 09:28:15 -05:00
zhangyanxian
14d8554247 Neuron-lib constant should be used for provider attributes
1. What is the problem?
 Provider attributes have been already move to Neutron-lib,
 but we still have some hard-coded string: 'provider:network_type',
 'provider:physical_network' and 'provider:segmentation_id'.

2. What is the solution to the problem?
 We can use the constants in neutron_lib instead

3. What features need to be implemented to the Tricircle to realize
the solution?
 None

Closes-Bug: #1691634
Change-Id: I4da0064d2ac78224698e62b8bd42935c6f8f25c9
2017-05-18 11:49:55 +00:00
zhangyanxian
62801d714b Optimizing some logic in the code when creating pod
1. What is the problem?
There are so many if branches for az_name in pod.py,
this will lead to confusion.

2. What is the solution to the problem?
We can optimize them to keep the logic more clearly

3. What features need to be implemented to the Tricircle to realize
the solution?
None
Closes-Bug: #1691653
Change-Id: I1f31ff685de2e516d36027388a7b0eacc1a76f5e
2017-05-18 09:45:32 +00:00
Jenkins
c149f1d737 Merge "Modify pod_id string length in ShadowAgent" 2017-05-18 07:28:38 +00:00
Jenkins
ea88a404a4 Merge "Fix bug for resource routing's filtering feature" 2017-05-18 07:28:29 +00:00
Jenkins
0339688f26 Merge "Mark subnet deletion state during subnet deletion" 2017-05-18 04:41:17 +00:00
Jenkins
7130939c86 Merge "Avoid adding duplicated sec-group rules with same CIDR" 2017-05-18 04:26:10 +00:00
Jenkins
94b4d32c93 Merge "Don't reset endpoint_url in ResourceHandle but Client" 2017-05-18 04:23:06 +00:00
OpenStack Proposal Bot
2fb5ba975f Updated from global requirements
Change-Id: I3f1e67d9c660b708459c222076d25adaba23e310
2017-05-17 13:51:57 +00:00
zhiyuan_cai
4a66a4d85c Don't reset endpoint_url in ResourceHandle but Client
1. What is the problem
In resource_handle.NeutronResourceHandle, after connection-fail
exception is caught, endpoint_url attribute is set to None and waits
for client.Client to update the endpoint.

However, local plugin directly uses resource_handle to talk to central
Neutron, so the endpoint_url attribute will not be updated after it's
set to None. Actually, for local plugin, endpoint_url should be read
from the configuration file and doesn't require updating, so it's not
necessary to set it to None.

2. What is the solution for the problem
Reset endpoint_url in Client instead of ResourceHandle

3. What features need to be implemented to the Tricircle to
realize the solution
N/A

Change-Id: If306031605f30adf933464b955386162c7f83c06
Closes-Bug: #1691306
2017-05-17 17:04:18 +08:00
Dongfeng Huang
1d20ef03b8 Fix bug for resource routing's filtering feature
1. What is the problem
For resource routing Admin API, when we call get_all(self, **kwargs)
function with an unsupported filter type specified to list the routing
information, the function will ignore this filter and return all the
routing information. It shouldn't happen. Instead, when unsupported
filter type is given, the function should response with 400 error
and notify user there exist unsupported filter types.

2. What is the solution to the problem
Response with 400 error when unsupported filter type is specified for
routing's get_all(self, **kwargs) function.

3. What the features need to be implemented to the Tricircle
to realize the solution
Modify the original resource routing's get_all(self, **kwargs)
function to return 400 error when met unsupported filter type.

Change-Id: I1bff9ebb7a6371a139d9ba547af417548100a2b4
Closes-Bug: #1690971
2017-05-17 16:26:37 +08:00
Dongfeng Huang
f39082848c Modify pod_id string length in ShadowAgent
1. What is the problem
pod_id in ShadowAgent is a foreign key, it references pod_id in Pod but
has different string length with it.

2. What is the solution to the problem
Change pod_id string length to 36 in ShadowAgent to keep consistent
with its definition in Pod.

3. What the features need to be implemented to the Tricircle
to realize the solution
None.

Change-Id: I75c7f0680e9c451a3df31d8a174007bf0a193e0f
Closes-Bug: #1691366
2017-05-17 16:05:51 +08:00
zhiyuan_cai
af2cce9364 Mark subnet deletion state during subnet deletion
1. What is the problem
As reported in the bug page, local subnet will be recreated
after central subnet is deleted

2. What is the solution for the problem
The reason for the recreation is that DhcpAgentNotifyAPI subscribe
the subnet deletion event and will call get_network during subnet
deletion, get_network will call _ensure_subnet to create the subnet.
So we need a way to distinguish the call from API and callback.

A dict on_subnet_delete is added to local plugin in this patch.
In delete_subnet, before calling real core pluing's delete_subnet
method, we first add a new item (request_id, True) to this dict.
After the calling, this item is removed. So in get_network, we can
check whether the dict contains the request_id, if so, we know
that we are in the subnet deletion stage, then we don't call
_ensure_subnet.

3. What features need to be implemented to the Tricircle to
realize the solution
No new features

Change-Id: Ie79460aa763918be7c522263d9865847fc0da828
Closes-Bug: #1680757
2017-05-17 16:02:26 +08:00
zhiyuan_cai
875fac7e81 Avoid adding duplicated sec-group rules with same CIDR
1. What is the problem
If a tenant creates two subnets with the same CIDR but different
allocation pools, Xjob will fail to setup local security group rules
because it generates two identical rules for these two subnets but
Neutron disallows adding a rule which is identical to the existing one.

2. What is the solution for the problem
Use "set" to avoid generating duplicated rules

3. What features need to be implemented to the Tricircle to
realize the solution
N/A

Change-Id: If21562458f2ad82e71577392172deeb8dc5a2a13
Closes-Bug: #1691315
2017-05-17 15:17:00 +08:00
Jenkins
50067c3b4b Merge "Add VLAN aware VMs support" 2017-05-16 01:22:10 +00:00