Retire project
Leave README around for those that follow. http://lists.openstack.org/pipermail/openstack-discuss/2019-February/003186.html http://lists.openstack.org/pipermail/openstack-discuss/2018-November/000057.html Change-Id: I050457c5b596f935840618013003d558c5f7651d
This commit is contained in:
parent
bb9ad3ab2d
commit
e133119e9b
|
@ -1,6 +0,0 @@
|
|||
bin
|
||||
.settings
|
||||
.testrepository
|
||||
.tox
|
||||
*.pyc
|
||||
.git
|
|
@ -1,8 +0,0 @@
|
|||
bin
|
||||
build
|
||||
.settings
|
||||
.testrepository
|
||||
.tox
|
||||
*.pyc
|
||||
*.sw[nop]
|
||||
layers
|
17
.project
17
.project
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>openvswitch-odl</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.python.pydev.PyDevBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.python.pydev.pythonNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?><pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||
<path>/openvswitch-odl/hooks</path>
|
||||
<path>/openvswitch-odl/unit_tests</path>
|
||||
<path>/openvswitch-odl/tests</path>
|
||||
</pydev_pathproperty>
|
||||
</pydev_project>
|
|
@ -1,8 +0,0 @@
|
|||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
||||
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
||||
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
||||
${PYTHON:-python} -m subunit.run discover -t ./ ./unit_tests $LISTOPT $IDOPTION
|
||||
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
|
@ -1,3 +1,3 @@
|
|||
- project:
|
||||
templates:
|
||||
- python35-charm-jobs
|
||||
- noop-jobs
|
||||
|
|
202
LICENSE
202
LICENSE
|
@ -1,202 +0,0 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,6 @@
|
|||
This project is no longer maintained.
|
||||
|
||||
The contents of this repository are still available in the Git
|
||||
source code management system. To see the contents of this
|
||||
repository before it reached its end of life, please check out the
|
||||
previous commit with "git checkout HEAD^1".
|
|
@ -1,3 +0,0 @@
|
|||
This file was created by release-tools to ensure that this empty
|
||||
directory is preserved in vcs re: lint check definitions in global
|
||||
tox.ini files. This file can be removed if/when this dir is actually in use.
|
|
@ -1,3 +0,0 @@
|
|||
This file was created by release-tools to ensure that this empty
|
||||
directory is preserved in vcs re: lint check definitions in global
|
||||
tox.ini files. This file can be removed if/when this dir is actually in use.
|
5
rebuild
5
rebuild
|
@ -1,5 +0,0 @@
|
|||
# This file is used to trigger rebuilds
|
||||
# when dependencies of the charm change,
|
||||
# but nothing in the charm needs to.
|
||||
# simply change the uuid to something new
|
||||
93e11b9e-86a6-11e8-b3ac-9f8b2e5df0b9
|
|
@ -1,7 +0,0 @@
|
|||
# This file is managed centrally. If you find the need to modify this as a
|
||||
# one-off, please don't. Intead, consult #openstack-charms and ask about
|
||||
# requirements management in charms via bot-control. Thank you.
|
||||
#
|
||||
# Build requirements
|
||||
charm-tools>=2.4.4
|
||||
simplejson
|
|
@ -1,40 +0,0 @@
|
|||
# Overview
|
||||
|
||||
This subordinate charm provides OpenvSwitch integration with an OpenDayLight (ODL) controller.
|
||||
|
||||
Its design to support deployment of principle charms as part of an ODL SDN deployment.
|
||||
|
||||
It also optionally supports deployment and configuration with OpenStack Compute (Nova).
|
||||
|
||||
# Usage
|
||||
|
||||
To deploy (partial deployment only - see other charms for full details):
|
||||
|
||||
juju deploy openvswitch-odl
|
||||
juju deploy odl-controller
|
||||
juju add-relation odl-controller openvswitch-odl
|
||||
|
||||
|
||||
This charm can be used with any other principle charm:
|
||||
|
||||
juju deploy ubuntu
|
||||
juju add-relation openvswitch-odl ubuntu
|
||||
|
||||
or with the OpenStack nova-compute and neutron-gateway charms:
|
||||
|
||||
juju deploy nova-compute
|
||||
juju deploy neutron-gateway
|
||||
juju add-relation nova-compute openvswitch-odl
|
||||
juju add-relation neutron-gateway openvswitch-odl
|
||||
|
||||
# Configuration Options
|
||||
|
||||
This charm will optionally configure the local ip address of the OVS instance to something other than the 'private-address' provided by Juju:
|
||||
|
||||
juju set openvswitch-odl os-data-network=10.20.3.0/21
|
||||
|
||||
The charm will scan configured network interfaces, and reconfigure the OVS instance with an alternative IP address if one is found within the configure subnet CIDR.
|
||||
|
||||
# Restrictions
|
||||
|
||||
This charm can't be deployed under LXC containers; however it will work just fine under KVM or on bare metal.
|
|
@ -1,15 +0,0 @@
|
|||
options:
|
||||
os-data-network:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
The IP address and netmask of the OpenStack Data network (e.g.,
|
||||
192.168.0.0/24)
|
||||
.
|
||||
This network will be used for tenant network traffic in overlay
|
||||
networks.
|
||||
mac-network-map:
|
||||
default:
|
||||
type: string
|
||||
description: |
|
||||
Map of physical nic mac address to configured VLAN's.
|
|
@ -1,16 +0,0 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0
|
||||
|
||||
Files: *
|
||||
Copyright: 2015, Canonical Ltd.
|
||||
License: Apache-2.0
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may obtain
|
||||
a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing permissions and limitations
|
||||
under the License.
|
341
src/icon.svg
341
src/icon.svg
|
@ -1,341 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="96"
|
||||
height="96"
|
||||
id="svg6517"
|
||||
version="1.1"
|
||||
inkscape:version="0.91+devel r"
|
||||
sodipodi:docname="openvswitch_circle01.svg"
|
||||
viewBox="0 0 96 96">
|
||||
<defs
|
||||
id="defs6519">
|
||||
<linearGradient
|
||||
id="Background">
|
||||
<stop
|
||||
id="stop4178"
|
||||
offset="0"
|
||||
style="stop-color:#22779e;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4180"
|
||||
offset="1"
|
||||
style="stop-color:#2991c0;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Inner Shadow"
|
||||
id="filter1121">
|
||||
<feFlood
|
||||
flood-opacity="0.59999999999999998"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood1123" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="out"
|
||||
result="composite1"
|
||||
id="feComposite1125" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="1"
|
||||
result="blur"
|
||||
id="feGaussianBlur1127" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="2"
|
||||
result="offset"
|
||||
id="feOffset1129" />
|
||||
<feComposite
|
||||
in="offset"
|
||||
in2="SourceGraphic"
|
||||
operator="atop"
|
||||
result="composite2"
|
||||
id="feComposite1131" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter950">
|
||||
<feFlood
|
||||
flood-opacity="0.25"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood952" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite954" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="1"
|
||||
result="blur"
|
||||
id="feGaussianBlur956" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="1"
|
||||
result="offset"
|
||||
id="feOffset958" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite960" />
|
||||
</filter>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath873">
|
||||
<g
|
||||
transform="matrix(0,-0.66666667,0.66604479,0,-258.25992,677.00001)"
|
||||
id="g875"
|
||||
inkscape:label="Layer 1"
|
||||
style="display:inline;fill:#ff00ff;fill-opacity:1;stroke:none">
|
||||
<path
|
||||
style="display:inline;fill:#ff00ff;fill-opacity:1;stroke:none"
|
||||
d="M 46.702703,898.22775 H 97.297297 C 138.16216,898.22775 144,904.06497 144,944.92583 v 50.73846 c 0,40.86071 -5.83784,46.69791 -46.702703,46.69791 H 46.702703 C 5.8378378,1042.3622 0,1036.525 0,995.66429 v -50.73846 c 0,-40.86086 5.8378378,-46.69808 46.702703,-46.69808 z"
|
||||
id="path877"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="sssssssss" />
|
||||
</g>
|
||||
</clipPath>
|
||||
<style
|
||||
id="style867"
|
||||
type="text/css"><![CDATA[
|
||||
.fil0 {fill:#1F1A17}
|
||||
]]></style>
|
||||
<clipPath
|
||||
id="clipPath16">
|
||||
<path
|
||||
id="path18"
|
||||
d="M -9,-9 H 605 V 222 H -9 Z"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipPath116">
|
||||
<path
|
||||
id="path118"
|
||||
d="m 91.7368,146.3253 -9.7039,-1.577 -8.8548,-3.8814 -7.5206,-4.7308 -7.1566,-8.7335 -4.0431,-4.282 -3.9093,-1.4409 -1.034,2.5271 1.8079,2.6096 0.4062,3.6802 1.211,-0.0488 1.3232,-1.2069 -0.3569,3.7488 -1.4667,0.9839 0.0445,1.4286 -3.4744,-1.9655 -3.1462,-3.712 -0.6559,-3.3176 1.3453,-2.6567 1.2549,-4.5133 2.5521,-1.2084 2.6847,0.1318 2.5455,1.4791 -1.698,-8.6122 1.698,-9.5825 -1.8692,-4.4246 -6.1223,-6.5965 1.0885,-3.941 2.9002,-4.5669 5.4688,-3.8486 2.9007,-0.3969 3.225,-0.1094 -2.012,-8.2601 7.3993,-3.0326 9.2188,-1.2129 3.1535,2.0619 0.2427,5.5797 3.5178,5.8224 0.2426,4.6094 8.4909,-0.6066 7.8843,0.7279 -7.8843,-4.7307 1.3343,-5.701 4.9731,-7.763 4.8521,-2.0622 3.8814,1.5769 1.577,3.1538 8.1269,6.1861 1.5769,-1.3343 12.7363,-0.485 2.5473,2.0619 0.2426,3.6391 -0.849,1.5767 -0.6066,9.8251 -4.2454,8.4909 0.7276,3.7605 2.5475,-1.3343 7.1566,-6.6716 3.5175,-0.2424 3.8815,1.5769 3.8818,2.9109 1.9406,6.3077 11.4021,-0.7277 6.914,2.6686 5.5797,5.2157 4.0028,7.5206 0.9706,8.8546 -0.8493,10.3105 -2.1832,9.2185 -2.1836,2.9112 -3.0322,0.9706 -5.3373,-5.8224 -4.8518,-1.6982 -4.2455,7.0353 -4.2454,3.8815 -2.3049,1.4556 -9.2185,7.6419 -7.3993,4.0028 -7.3993,0.6066 -8.6119,-1.4556 -7.5206,-2.7899 -5.2158,-4.2454 -4.1241,-4.9734 -4.2454,-1.2129"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipPath128">
|
||||
<path
|
||||
id="path130"
|
||||
d="m 91.7368,146.3253 -9.7039,-1.577 -8.8548,-3.8814 -7.5206,-4.7308 -7.1566,-8.7335 -4.0431,-4.282 -3.9093,-1.4409 -1.034,2.5271 1.8079,2.6096 0.4062,3.6802 1.211,-0.0488 1.3232,-1.2069 -0.3569,3.7488 -1.4667,0.9839 0.0445,1.4286 -3.4744,-1.9655 -3.1462,-3.712 -0.6559,-3.3176 1.3453,-2.6567 1.2549,-4.5133 2.5521,-1.2084 2.6847,0.1318 2.5455,1.4791 -1.698,-8.6122 1.698,-9.5825 -1.8692,-4.4246 -6.1223,-6.5965 1.0885,-3.941 2.9002,-4.5669 5.4688,-3.8486 2.9007,-0.3969 3.225,-0.1094 -2.012,-8.2601 7.3993,-3.0326 9.2188,-1.2129 3.1535,2.0619 0.2427,5.5797 3.5178,5.8224 0.2426,4.6094 8.4909,-0.6066 7.8843,0.7279 -7.8843,-4.7307 1.3343,-5.701 4.9731,-7.763 4.8521,-2.0622 3.8814,1.5769 1.577,3.1538 8.1269,6.1861 1.5769,-1.3343 12.7363,-0.485 2.5473,2.0619 0.2426,3.6391 -0.849,1.5767 -0.6066,9.8251 -4.2454,8.4909 0.7276,3.7605 2.5475,-1.3343 7.1566,-6.6716 3.5175,-0.2424 3.8815,1.5769 3.8818,2.9109 1.9406,6.3077 11.4021,-0.7277 6.914,2.6686 5.5797,5.2157 4.0028,7.5206 0.9706,8.8546 -0.8493,10.3105 -2.1832,9.2185 -2.1836,2.9112 -3.0322,0.9706 -5.3373,-5.8224 -4.8518,-1.6982 -4.2455,7.0353 -4.2454,3.8815 -2.3049,1.4556 -9.2185,7.6419 -7.3993,4.0028 -7.3993,0.6066 -8.6119,-1.4556 -7.5206,-2.7899 -5.2158,-4.2454 -4.1241,-4.9734 -4.2454,-1.2129"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
id="linearGradient3850"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop3852"
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3854"
|
||||
offset="1"
|
||||
style="stop-color:#000000;stop-opacity:0;" />
|
||||
</linearGradient>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath3095">
|
||||
<path
|
||||
d="M 976.648,389.551 H 134.246 V 1229.55 H 976.648 V 389.551"
|
||||
id="path3097"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath3195">
|
||||
<path
|
||||
d="m 611.836,756.738 -106.34,105.207 c -8.473,8.289 -13.617,20.102 -13.598,33.379 L 598.301,790.207 c -0.031,-13.418 5.094,-25.031 13.535,-33.469"
|
||||
id="path3197"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath3235">
|
||||
<path
|
||||
d="m 1095.64,1501.81 c 35.46,-35.07 70.89,-70.11 106.35,-105.17 4.4,-4.38 7.11,-10.53 7.11,-17.55 l -106.37,105.21 c 0,7 -2.71,13.11 -7.09,17.51"
|
||||
id="path3237"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipPath4591"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 1106.6009,730.43734 -0.036,21.648 c -0.01,3.50825 -2.8675,6.61375 -6.4037,6.92525 l -83.6503,7.33162 c -3.5205,0.30763 -6.3812,-2.29987 -6.3671,-5.8145 l 0.036,-21.6475 20.1171,-1.76662 -0.011,4.63775 c 0,1.83937 1.4844,3.19925 3.3262,3.0395 l 49.5274,-4.33975 c 1.8425,-0.166 3.3425,-1.78125 3.3538,-3.626 l 0.01,-4.63025 20.1,-1.7575"
|
||||
style="fill:#ff00ff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
id="path4593" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(-1.4333926,-2.2742838,1.1731823,-0.73941125,-174.08025,98.374394)"
|
||||
r="20.40658"
|
||||
fy="93.399292"
|
||||
fx="-26.508606"
|
||||
cy="93.399292"
|
||||
cx="-26.508606"
|
||||
id="radialGradient3856"
|
||||
xlink:href="#linearGradient3850"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
gradientTransform="translate(-318.48033,212.32022)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
y2="993.19702"
|
||||
x2="-51.879555"
|
||||
y1="593.11615"
|
||||
x1="348.20132"
|
||||
id="linearGradient3895"
|
||||
xlink:href="#linearGradient3850"
|
||||
inkscape:collect="always" />
|
||||
<clipPath
|
||||
id="clipPath3906"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<rect
|
||||
transform="scale(1,-1)"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.8;fill:#ff00ff;stroke:none;stroke-width:4;marker:none;enable-background:accumulate"
|
||||
id="rect3908"
|
||||
width="1019.1371"
|
||||
height="1019.1371"
|
||||
x="357.9816"
|
||||
y="-1725.8152" />
|
||||
</clipPath>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Inner Shadow"
|
||||
id="filter1121-2">
|
||||
<feFlood
|
||||
flood-opacity="0.59999999999999998"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood1123-6" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="out"
|
||||
result="composite1"
|
||||
id="feComposite1125-4" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="1"
|
||||
result="blur"
|
||||
id="feGaussianBlur1127-0" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="2"
|
||||
result="offset"
|
||||
id="feOffset1129-2" />
|
||||
<feComposite
|
||||
in="offset"
|
||||
in2="SourceGraphic"
|
||||
operator="atop"
|
||||
result="composite2"
|
||||
id="feComposite1131-1" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.0931702"
|
||||
inkscape:cx="-8.120935"
|
||||
inkscape:cy="21.51436"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer3"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1029"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
showborder="true"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:bbox-paths="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-bbox-edge-midpoints="true"
|
||||
inkscape:snap-bbox-midpoints="true"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-intersection-paths="true"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:snap-midpoints="true"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
inkscape:snap-center="true"
|
||||
inkscape:snap-page="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid821" />
|
||||
<sodipodi:guide
|
||||
orientation="1,0"
|
||||
position="16,48"
|
||||
id="guide823" />
|
||||
<sodipodi:guide
|
||||
orientation="0,1"
|
||||
position="64,80"
|
||||
id="guide825" />
|
||||
<sodipodi:guide
|
||||
orientation="1,0"
|
||||
position="80,40"
|
||||
id="guide827" />
|
||||
<sodipodi:guide
|
||||
orientation="0,1"
|
||||
position="64,16"
|
||||
id="guide829" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata6522">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="PICTO"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#201f1f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
d="M 48.001363,1.0309158e-7 A 47.999431,48.000796 0 0 0 0,48.000002 47.999431,48.000796 0 0 0 48.001363,96.000004 47.999431,48.000796 0 0 0 96.000001,48.000002 47.999431,48.000796 0 0 0 48.001363,1.0309158e-7 Z"
|
||||
id="path4303" />
|
||||
<path
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
d="M 48.001363,16.218942 A 31.780445,31.781348 0 0 1 79.78152,48.000002 31.780445,31.781348 0 0 1 48.001363,79.781062 31.780445,31.781348 0 0 1 16.221206,48.000002 31.780445,31.781348 0 0 1 48.001363,16.218942 Z"
|
||||
id="path4319" />
|
||||
<path
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#4f8a49;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
d="m 61.433187,28.569158 v 7.366796 H 37.940781 v 9.538951 h 23.492406 v 7.366797 L 76.463421,40.70543 Z M 34.566814,43.158303 19.536579,55.294574 34.566814,67.430846 V 60.06405 H 58.05922 V 50.5251 H 34.566814 Z"
|
||||
id="rect4326"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 14 KiB |
|
@ -1,5 +0,0 @@
|
|||
includes: ['layer:openstack', 'interface:neutron-plugin', 'interface:ovsdb-manager', 'interface:odl-controller-api']
|
||||
options:
|
||||
basic:
|
||||
use_venv: True
|
||||
include_system_packages: True
|
|
@ -1,102 +0,0 @@
|
|||
import socket
|
||||
import subprocess
|
||||
|
||||
import charmhelpers.core.hookenv as hookenv
|
||||
import charmhelpers.contrib.network.ip as ch_ip
|
||||
import charms_openstack.charm
|
||||
import charms_openstack.sdn.odl as odl
|
||||
import charms_openstack.sdn.ovs as ovs
|
||||
import charms_openstack.devices.pci as pci
|
||||
|
||||
|
||||
class OVSODLCharm(charms_openstack.charm.OpenStackCharm):
|
||||
|
||||
# Internal name of charm + keystone endpoint
|
||||
service_name = name = 'openvswitch_odl'
|
||||
|
||||
# First release supported
|
||||
release = 'liberty'
|
||||
|
||||
packages = ['openvswitch-switch']
|
||||
|
||||
def configure_openvswitch(self, odl_ovsdb):
|
||||
hookenv.log("Configuring OpenvSwitch with ODL OVSDB controller: %s" %
|
||||
odl_ovsdb.connection_string())
|
||||
local_ip = ch_ip.get_address_in_network(
|
||||
self.config.get('os-data-network'),
|
||||
hookenv.unit_private_ip())
|
||||
ovs.set_config('local_ip', local_ip)
|
||||
ovs.set_config('controller-ips', odl_ovsdb.private_address(),
|
||||
table='external_ids')
|
||||
ovs.set_config('host-id', socket.gethostname(),
|
||||
table='external_ids')
|
||||
ovs.set_manager(odl_ovsdb.connection_string())
|
||||
hookenv.status_set('active', 'Unit is ready')
|
||||
|
||||
def unconfigure_openvswitch(self, odl_ovsdb):
|
||||
hookenv.log("Unconfiguring OpenvSwitch")
|
||||
subprocess.check_call(['ovs-vsctl', 'del-manager'])
|
||||
bridges = subprocess.check_output(['ovs-vsctl',
|
||||
'list-br']).split()
|
||||
for bridge in bridges:
|
||||
subprocess.check_call(['ovs-vsctl',
|
||||
'del-controller', bridge])
|
||||
hookenv.status_set(
|
||||
'waiting',
|
||||
'Open vSwitch not configured with an ODL OVSDB controller')
|
||||
|
||||
def configure_neutron_plugin(self, neutron_plugin):
|
||||
neutron_plugin.configure_plugin(
|
||||
plugin='ovs-odl',
|
||||
config={
|
||||
"nova-compute": {
|
||||
"/etc/nova/nova.conf": {
|
||||
"sections": {
|
||||
'DEFAULT': [
|
||||
('firewall_driver',
|
||||
'nova.virt.firewall.'
|
||||
'NoopFirewallDriver'),
|
||||
('libvirt_vif_driver',
|
||||
'nova.virt.libvirt.vif.'
|
||||
'LibvirtGenericVIFDriver'),
|
||||
('security_group_api', 'neutron'),
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
def odl_node_registration(self, controller):
|
||||
""" Register node with ODL if not registered already """
|
||||
odl_conn = odl.ODLConfig(**controller.connection())
|
||||
device_name = socket.gethostname()
|
||||
if odl_conn.is_device_registered(device_name):
|
||||
hookenv.log('{} is already registered in odl'.format(device_name))
|
||||
else:
|
||||
local_ip = ch_ip.get_address_in_network(
|
||||
self.config('os-data-network'),
|
||||
hookenv.unit_private_ip())
|
||||
hookenv.log('Registering {} ({}) in odl'.format(
|
||||
device_name, local_ip))
|
||||
odl_conn.odl_register_node(device_name, local_ip)
|
||||
|
||||
def odl_register_macs(self, controller):
|
||||
""" Register local interfaces and their networks with ODL """
|
||||
hookenv.log('Looking for macs to register with networks in odl')
|
||||
odl_conn = odl.ODLConfig(**controller.connection())
|
||||
device_name = socket.gethostname()
|
||||
requested_config = pci.PCIInfo()['local_config']
|
||||
for mac in requested_config.keys():
|
||||
for requested_net in requested_config[mac]:
|
||||
net = requested_net['net']
|
||||
interface = requested_net['interface']
|
||||
if not odl_conn.is_net_device_registered(net, device_name,
|
||||
interface, mac,
|
||||
device_type='ovs'):
|
||||
hookenv.log('Registering {} and {} on '
|
||||
'{}'.format(net, interface, mac))
|
||||
odl_conn.odl_register_macs(device_name, net, interface,
|
||||
mac, device_type='ovs')
|
||||
else:
|
||||
hookenv.log('{} already registered for {} on '
|
||||
'{}'.format(net, interface, device_name))
|
|
@ -1,38 +0,0 @@
|
|||
name: openvswitch-odl
|
||||
subordinate: true
|
||||
maintainer: OpenStack Charmers <openstack-charmers@lists.ubuntu.com>
|
||||
summary: Open vSwitch OpenDayLight subordinate charm
|
||||
description:
|
||||
Open vSwitch is a production quality, multilayer, software-based,
|
||||
Ethernet virtual switch. It is designed to enable massive network
|
||||
automation through programmatic extension, while still supporting
|
||||
standard management interfaces and protocols (e.g. NetFlow, IPFIX,
|
||||
sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). In addition, it is designed
|
||||
to support distribution across multiple physical servers similar to
|
||||
VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.
|
||||
.
|
||||
OpenDaylight is a network virtualization solution that provides an
|
||||
overlay virtual-network to virtual-machines, containers or network
|
||||
namespaces.
|
||||
.
|
||||
This charm integrates Open vSwitch into OpenDayLight as part of an
|
||||
OpenStack Cloud.
|
||||
tags:
|
||||
- openstack
|
||||
series:
|
||||
- xenial
|
||||
- bionic
|
||||
- cosmic
|
||||
- trusty
|
||||
provides:
|
||||
neutron-plugin:
|
||||
interface: neutron-plugin
|
||||
scope: container
|
||||
requires:
|
||||
ovsdb-manager:
|
||||
interface: ovsdb-manager
|
||||
controller-api:
|
||||
interface: odl-controller-api
|
||||
container:
|
||||
interface: juju-info
|
||||
scope: container
|
|
@ -1,59 +0,0 @@
|
|||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import charms_openstack.charm as charm
|
||||
import charms.reactive as reactive
|
||||
|
||||
# This charm's library contains all of the handler code associated with
|
||||
# ovs_odl
|
||||
import charm.openstack.openvswitch_odl as ovs_odl # noqa
|
||||
|
||||
charm.use_defaults(
|
||||
'charm.installed',
|
||||
'config.changed',
|
||||
'update-status')
|
||||
|
||||
|
||||
@reactive.when('ovsdb-manager.access.available')
|
||||
@reactive.when('charm.installed')
|
||||
def configure_openvswitch(odl_ovsdb):
|
||||
with charm.provide_charm_instance() as ovs_odl_charm:
|
||||
ovs_odl_charm.configure_openvswitch(odl_ovsdb)
|
||||
reactive.set_state('ovs.configured')
|
||||
|
||||
|
||||
@reactive.when('ovs.configured')
|
||||
@reactive.when_not('ovsdb-manager.access.available')
|
||||
def unconfigure_openvswitch(odl_ovsdb=None):
|
||||
with charm.provide_charm_instance() as ovs_odl_charm:
|
||||
ovs_odl_charm.unconfigure_openvswitch(odl_ovsdb)
|
||||
reactive.remove_state('ovs.configured')
|
||||
|
||||
|
||||
@reactive.when('neutron-plugin.connected')
|
||||
def configure_neutron_plugin(neutron_plugin):
|
||||
with charm.provide_charm_instance() as ovs_odl_charm:
|
||||
ovs_odl_charm.configure_neutron_plugin(neutron_plugin)
|
||||
|
||||
|
||||
@reactive.when('controller-api.access.available')
|
||||
def odl_node_registration(controller):
|
||||
with charm.provide_charm_instance() as ovs_odl_charm:
|
||||
ovs_odl_charm.register_node(controller)
|
||||
|
||||
|
||||
@reactive.when('controller-api.access.available')
|
||||
def odl_mac_registration(controller):
|
||||
with charm.provide_charm_instance() as ovs_odl_charm:
|
||||
ovs_odl_charm.register_macs(controller)
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"neutron-device-map:physicalNetwork": {
|
||||
"name": "{{ network }}",
|
||||
"device": [
|
||||
{
|
||||
"interface": [
|
||||
{
|
||||
"macAddress": "{{ mac }}",
|
||||
"interface-name": "{{ interface }}"
|
||||
}
|
||||
],
|
||||
"device-name": "{{ vpp_host }}",
|
||||
"device-type": "{{ device_type }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
|
||||
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">prefix:sal-netconf-connector</type>
|
||||
<name>{{ vpp_host }}</name>
|
||||
<address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">{{ vpp_ip }}</address>
|
||||
<port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">2022</port>
|
||||
<username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">{{ vpp_username }}</username>
|
||||
<password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">{{ vpp_password }}</password>
|
||||
<tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only>
|
||||
<event-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
|
||||
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type>
|
||||
<name>global-event-executor</name>
|
||||
</event-executor>
|
||||
<binding-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
|
||||
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-broker-osgi-registry</type>
|
||||
<name>binding-osgi-broker</name>
|
||||
</binding-registry>
|
||||
<dom-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
|
||||
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type>
|
||||
<name>dom-broker</name>
|
||||
</dom-registry>
|
||||
<client-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
|
||||
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf">prefix:netconf-client-dispatcher</type>
|
||||
<name>global-netconf-dispatcher</name>
|
||||
</client-dispatcher>
|
||||
<processing-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
|
||||
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</type>
|
||||
<name>global-netconf-processing-executor</name>
|
||||
</processing-executor>
|
||||
</module>
|
|
@ -1,33 +0,0 @@
|
|||
# This file is managed centrally. If you find the need to modify this as a
|
||||
# one-off, please don't. Intead, consult #openstack-charms and ask about
|
||||
# requirements management in charms via bot-control. Thank you.
|
||||
charm-tools>=2.4.4
|
||||
coverage>=3.6
|
||||
mock>=1.2
|
||||
flake8>=2.2.4,<=2.4.1
|
||||
os-testr>=0.4.1
|
||||
requests>=2.18.4
|
||||
# BEGIN: Amulet OpenStack Charm Helper Requirements
|
||||
# Liberty client lower constraints
|
||||
amulet>=1.14.3,<2.0;python_version=='2.7'
|
||||
bundletester>=0.6.1,<1.0;python_version=='2.7'
|
||||
aodhclient>=0.1.0
|
||||
gnocchiclient>=3.1.0,<3.2.0
|
||||
python-barbicanclient>=4.0.1
|
||||
python-ceilometerclient>=1.5.0
|
||||
python-cinderclient>=1.4.0
|
||||
python-designateclient>=1.5
|
||||
python-glanceclient>=1.1.0
|
||||
python-heatclient>=0.8.0
|
||||
python-keystoneclient>=1.7.1
|
||||
python-manilaclient>=1.8.1
|
||||
python-neutronclient>=3.1.0
|
||||
python-novaclient>=2.30.1
|
||||
python-openstackclient>=1.7.0
|
||||
python-swiftclient>=2.6.0
|
||||
pika>=0.10.0,<1.0
|
||||
distro-info
|
||||
git+https://github.com/juju/charm-helpers.git#egg=charmhelpers
|
||||
# END: Amulet OpenStack Charm Helper Requirements
|
||||
pytz # workaround for 14.04 pip/tox
|
||||
pyudev # for ceph-* charm unit tests (not mocked?)
|
|
@ -1,9 +0,0 @@
|
|||
# Overview
|
||||
|
||||
This directory provides Amulet tests to verify basic deployment functionality
|
||||
from the perspective of this charm, its requirements and its features, as
|
||||
exercised in a subset of the full OpenStack deployment test bundle topology.
|
||||
|
||||
For full details on functional testing of OpenStack charms please refer to
|
||||
the [functional testing](http://docs.openstack.org/developer/charm-guide/testing.html#functional-testing)
|
||||
section of the OpenStack Charm Guide.
|
|
@ -1,279 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import amulet
|
||||
import os
|
||||
from neutronclient.v2_0 import client as neutronclient
|
||||
|
||||
from charmhelpers.contrib.openstack.amulet.deployment import (
|
||||
OpenStackAmuletDeployment
|
||||
)
|
||||
|
||||
from charmhelpers.contrib.openstack.amulet.utils import (
|
||||
OpenStackAmuletUtils,
|
||||
DEBUG,
|
||||
)
|
||||
|
||||
# Use DEBUG to turn on debug logging
|
||||
u = OpenStackAmuletUtils(DEBUG)
|
||||
|
||||
ODL_QUERY_PATH = '/restconf/operational/opendaylight-inventory:nodes/'
|
||||
ODL_PROFILES = {
|
||||
'helium': {
|
||||
'location': 'AMULET_ODL_LOCATION',
|
||||
'profile': 'openvswitch-odl'
|
||||
},
|
||||
'beryllium': {
|
||||
'location': 'AMULET_ODL_BE_LOCATION',
|
||||
'profile': 'openvswitch-odl-beryllium'
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class OVSODLBasicDeployment(OpenStackAmuletDeployment):
|
||||
"""Amulet tests on a basic neutron-openvswitch deployment."""
|
||||
|
||||
def __init__(self, series, openstack=None, source=None, git=False,
|
||||
stable=False, odl_version='helium'):
|
||||
"""Deploy the entire test environment."""
|
||||
super(OVSODLBasicDeployment, self).__init__(series, openstack,
|
||||
source, stable)
|
||||
self.odl_version = odl_version
|
||||
self._add_services()
|
||||
self._add_relations()
|
||||
self._configure_services()
|
||||
self._deploy()
|
||||
|
||||
u.log.info('Waiting on extended status checks...')
|
||||
# odl-controller: https://bugs.launchpad.net/bugs/1632032
|
||||
exclude_services = ['odl-controller']
|
||||
self._auto_wait_for_status(exclude_services=exclude_services)
|
||||
|
||||
self.d.sentry.wait()
|
||||
self._initialize_tests()
|
||||
|
||||
def _add_services(self):
|
||||
"""Add services
|
||||
|
||||
Add the services that we're testing, where openvswitch-odl is local,
|
||||
and the rest of the service are from lp branches that are
|
||||
compatible with the local charm (e.g. stable or next).
|
||||
"""
|
||||
this_service = {'name': 'openvswitch-odl'}
|
||||
other_services = [
|
||||
{
|
||||
'name': 'nova-compute',
|
||||
'constraints': {'mem': '4G'},
|
||||
},
|
||||
{
|
||||
'name': 'neutron-api',
|
||||
},
|
||||
{
|
||||
'name': 'neutron-gateway',
|
||||
},
|
||||
{
|
||||
'name': 'odl-controller',
|
||||
'constraints': {'mem': '8G'},
|
||||
},
|
||||
{
|
||||
'name': 'neutron-api-odl',
|
||||
},
|
||||
{'name': 'percona-cluster', 'constraints': {'mem': '3072M'}},
|
||||
{'name': 'rabbitmq-server'},
|
||||
{'name': 'keystone'},
|
||||
{'name': 'nova-cloud-controller'},
|
||||
{'name': 'glance'},
|
||||
]
|
||||
super(OVSODLBasicDeployment, self)._add_services(this_service,
|
||||
other_services)
|
||||
|
||||
def _add_relations(self):
|
||||
"""Add all of the relations for the services."""
|
||||
relations = {
|
||||
'neutron-api:neutron-plugin-api-subordinate':
|
||||
'neutron-api-odl:neutron-plugin-api-subordinate',
|
||||
'nova-compute:neutron-plugin': 'openvswitch-odl:neutron-plugin',
|
||||
'openvswitch-odl:ovsdb-manager': 'odl-controller:ovsdb-manager',
|
||||
'neutron-api-odl:odl-controller': 'odl-controller:controller-api',
|
||||
'keystone:shared-db': 'percona-cluster:shared-db',
|
||||
'nova-cloud-controller:shared-db': 'percona-cluster:shared-db',
|
||||
'nova-cloud-controller:amqp': 'rabbitmq-server:amqp',
|
||||
'nova-cloud-controller:image-service': 'glance:image-service',
|
||||
'nova-cloud-controller:identity-service':
|
||||
'keystone:identity-service',
|
||||
'nova-compute:cloud-compute':
|
||||
'nova-cloud-controller:cloud-compute',
|
||||
'nova-compute:amqp': 'rabbitmq-server:amqp',
|
||||
'nova-compute:image-service': 'glance:image-service',
|
||||
'glance:shared-db': 'percona-cluster:shared-db',
|
||||
'glance:identity-service': 'keystone:identity-service',
|
||||
'glance:amqp': 'rabbitmq-server:amqp',
|
||||
'neutron-api:shared-db': 'percona-cluster:shared-db',
|
||||
'neutron-api:amqp': 'rabbitmq-server:amqp',
|
||||
'neutron-api:neutron-api': 'nova-cloud-controller:neutron-api',
|
||||
'neutron-api:identity-service': 'keystone:identity-service',
|
||||
'neutron-gateway:amqp': 'rabbitmq-server:amqp',
|
||||
'neutron-gateway:neutron-plugin-api':
|
||||
'neutron-api:neutron-plugin-api',
|
||||
'neutron-gateway:quantum-network-service':
|
||||
'nova-cloud-controller:quantum-network-service',
|
||||
'neutron-gateway:juju-info': 'openvswitch-odl:container',
|
||||
}
|
||||
super(OVSODLBasicDeployment, self)._add_relations(relations)
|
||||
|
||||
def _configure_services(self):
|
||||
"""Configure all of the services."""
|
||||
neutron_api = {
|
||||
'neutron-security-groups': False,
|
||||
}
|
||||
nova_compute = {
|
||||
'enable-live-migration': False,
|
||||
}
|
||||
keystone = {
|
||||
'admin-password': 'openstack',
|
||||
'admin-token': 'ubuntutesting',
|
||||
}
|
||||
pxc_config = {
|
||||
'dataset-size': '25%',
|
||||
'max-connections': 1000,
|
||||
'root-password': 'ChangeMe123',
|
||||
'sst-password': 'ChangeMe123',
|
||||
}
|
||||
odl_controller = {}
|
||||
if os.environ.get(ODL_PROFILES[self.odl_version]['location']):
|
||||
odl_controller['install-url'] = \
|
||||
os.environ.get(ODL_PROFILES[self.odl_version]['location'])
|
||||
if os.environ.get('AMULET_HTTP_PROXY'):
|
||||
odl_controller['http-proxy'] = \
|
||||
os.environ['AMULET_HTTP_PROXY']
|
||||
if os.environ.get('AMULET_HTTP_PROXY'):
|
||||
odl_controller['https-proxy'] = \
|
||||
os.environ['AMULET_HTTP_PROXY']
|
||||
odl_controller['profile'] = \
|
||||
ODL_PROFILES[self.odl_version]['profile']
|
||||
neutron_gateway = {
|
||||
'plugin': 'ovs-odl'
|
||||
}
|
||||
neutron_api_odl = {
|
||||
'overlay-network-type': 'vxlan gre',
|
||||
}
|
||||
nova_cc = {
|
||||
'network-manager': 'Neutron',
|
||||
}
|
||||
configs = {
|
||||
'neutron-api': neutron_api,
|
||||
'nova-compute': nova_compute,
|
||||
'keystone': keystone,
|
||||
'percona-cluster': pxc_config,
|
||||
'odl-controller': odl_controller,
|
||||
'neutron-api-odl': neutron_api_odl,
|
||||
'neutron-gateway': neutron_gateway,
|
||||
'nova-cloud-controller': nova_cc,
|
||||
}
|
||||
super(OVSODLBasicDeployment, self)._configure_services(configs)
|
||||
|
||||
def _initialize_tests(self):
|
||||
"""Perform final initialization before tests get run."""
|
||||
# Access the sentries for inspecting service units
|
||||
self.compute_sentry = self.d.sentry['nova-compute'][0]
|
||||
self.neutron_api_sentry = self.d.sentry['neutron-api'][0]
|
||||
self.ovsodl_sentry = self.d.sentry['openvswitch-odl'][0]
|
||||
self.pxc_sentry = self.d.sentry['percona-cluster'][0]
|
||||
self.rabbitmq_server_sentry = self.d.sentry['rabbitmq-server'][0]
|
||||
self.keystone_sentry = self.d.sentry['keystone'][0]
|
||||
self.glance_sentry = self.d.sentry['glance'][0]
|
||||
self.nova_cc_sentry = self.d.sentry['nova-cloud-controller'][0]
|
||||
self.neutron_api_odl_sentry = self.d.sentry['neutron-api-odl'][0]
|
||||
self.odl_controller_sentry = self.d.sentry['odl-controller'][0]
|
||||
self.gateway_sentry = self.d.sentry['neutron-gateway'][0]
|
||||
|
||||
self.keystone = u.authenticate_keystone_admin(self.keystone_sentry,
|
||||
user='admin',
|
||||
password='openstack',
|
||||
tenant='admin')
|
||||
ep = self.keystone.service_catalog.url_for(service_type='identity',
|
||||
interface='publicURL')
|
||||
self.neutron = neutronclient.Client(auth_url=ep,
|
||||
username='admin',
|
||||
password='openstack',
|
||||
tenant_name='admin',
|
||||
region_name='RegionOne')
|
||||
|
||||
def test_services(self):
|
||||
"""Verify the expected services are running on the corresponding
|
||||
service units."""
|
||||
|
||||
commands = {
|
||||
self.compute_sentry: ['nova-compute',
|
||||
'openvswitch-switch'],
|
||||
self.gateway_sentry: ['openvswitch-switch',
|
||||
'neutron-dhcp-agent',
|
||||
'neutron-l3-agent',
|
||||
'neutron-metadata-agent',
|
||||
'neutron-metering-agent',
|
||||
'neutron-lbaas-agent',
|
||||
'nova-api-metadata'],
|
||||
self.odl_controller_sentry: ['odl-controller'],
|
||||
}
|
||||
|
||||
if self._get_openstack_release() >= self.xenial_newton:
|
||||
commands[self.gateway_sentry].remove('neutron-lbaas-agent')
|
||||
commands[self.gateway_sentry].append('neutron-lbaasv2-agent')
|
||||
|
||||
ret = u.validate_services_by_name(commands)
|
||||
if ret:
|
||||
amulet.raise_status(amulet.FAIL, msg=ret)
|
||||
|
||||
def test_gateway_bridges(self):
|
||||
"""Ensure that all bridges are present and configured with the
|
||||
ODL controller as their NorthBound controller URL."""
|
||||
odl_ip = self.odl_controller_sentry.relation(
|
||||
'ovsdb-manager',
|
||||
'openvswitch-odl:ovsdb-manager'
|
||||
)['private-address']
|
||||
# NOTE: 6633 is legacy 6653 is IANA assigned
|
||||
if self.odl_version == 'helium':
|
||||
controller_url = "tcp:{}:6633".format(odl_ip)
|
||||
check_bridges = ['br-int', 'br-ex', 'br-data']
|
||||
else:
|
||||
controller_url = "tcp:{}:6653".format(odl_ip)
|
||||
# NOTE: later ODL releases only manage br-int
|
||||
check_bridges = ['br-int']
|
||||
cmd = 'ovs-vsctl list-br'
|
||||
output, _ = self.gateway_sentry.run(cmd)
|
||||
bridges = output.split()
|
||||
for bridge in check_bridges:
|
||||
if bridge not in bridges:
|
||||
amulet.raise_status(
|
||||
amulet.FAIL,
|
||||
msg="Missing bridge {} from gateway unit".format(bridge)
|
||||
)
|
||||
cmd = 'ovs-vsctl get-controller {}'.format(bridge)
|
||||
br_controllers, _ = self.gateway_sentry.run(cmd)
|
||||
# Beware of duplicate entries:
|
||||
# https://bugs.opendaylight.org/show_bug.cgi?id=960
|
||||
br_controllers = list(set(br_controllers.split('\n')))
|
||||
if len(br_controllers) != 1 or br_controllers[0] != controller_url:
|
||||
status, _ = self.gateway_sentry.run('ovs-vsctl show')
|
||||
amulet.raise_status(
|
||||
amulet.FAIL,
|
||||
msg="Controller configuration on bridge"
|
||||
" {} incorrect: {} != {}\n"
|
||||
"{}".format(bridge,
|
||||
br_controllers,
|
||||
controller_url,
|
||||
status)
|
||||
)
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Amulet tests on a basic openvswitch ODL deployment on bionic-queens."""
|
||||
|
||||
from basic_deployment import OVSODLBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = OVSODLBasicDeployment(series='bionic',
|
||||
odl_version='beryllium')
|
||||
deployment.run_tests()
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Amulet tests on a basic openvswitch ODL deployment on xenial-queens."""
|
||||
|
||||
from basic_deployment import OVSODLBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = OVSODLBasicDeployment(series='xenial',
|
||||
openstack='cloud:xenial-queens',
|
||||
source='cloud:xenial-updates/queens',
|
||||
odl_version='beryllium')
|
||||
deployment.run_tests()
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Amulet tests on a basic openvswitch ODL deployment on trusty-icehouse."""
|
||||
|
||||
from basic_deployment import OVSODLBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = OVSODLBasicDeployment(series='trusty')
|
||||
deployment.run_tests()
|
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Amulet tests on a basic openvswitch ODL deployment on trusty-mitaka."""
|
||||
|
||||
from basic_deployment import OVSODLBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = OVSODLBasicDeployment(series='trusty',
|
||||
openstack='cloud:trusty-mitaka',
|
||||
source='cloud:trusty-updates/mitaka')
|
||||
deployment.run_tests()
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Amulet tests on a basic openvswitch ODL deployment on xenial-mitaka."""
|
||||
|
||||
from basic_deployment import OVSODLBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = OVSODLBasicDeployment(series='xenial',
|
||||
odl_version='beryllium')
|
||||
deployment.run_tests()
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Amulet tests on a basic openvswitch ODL deployment on xenial-ocata."""
|
||||
|
||||
from basic_deployment import OVSODLBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = OVSODLBasicDeployment(series='xenial',
|
||||
openstack='cloud:xenial-ocata',
|
||||
source='cloud:xenial-updates/ocata',
|
||||
odl_version='beryllium')
|
||||
deployment.run_tests()
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Amulet tests on a basic openvswitch ODL deployment on xenial-pike."""
|
||||
|
||||
from basic_deployment import OVSODLBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = OVSODLBasicDeployment(series='xenial',
|
||||
openstack='cloud:xenial-pike',
|
||||
source='cloud:xenial-updates/pike',
|
||||
odl_version='beryllium')
|
||||
deployment.run_tests()
|
|
@ -1,18 +0,0 @@
|
|||
# Bootstrap the model if necessary.
|
||||
bootstrap: True
|
||||
# Re-use bootstrap node.
|
||||
reset: True
|
||||
# Use tox/requirements to drive the venv instead of bundletester's venv feature.
|
||||
virtualenv: False
|
||||
# Leave makefile empty, otherwise unit/lint tests will rerun ahead of amulet.
|
||||
makefile: []
|
||||
# Do not specify juju PPA sources. Juju is presumed to be pre-installed
|
||||
# and configured in all test runner environments.
|
||||
#sources:
|
||||
# Do not specify or rely on system packages.
|
||||
#packages:
|
||||
# Do not specify python packages here. Use test-requirements.txt
|
||||
# and tox instead. ie. The venv is constructed before bundletester
|
||||
# is invoked.
|
||||
#python-packages:
|
||||
reset_timeout: 600
|
53
src/tox.ini
53
src/tox.ini
|
@ -1,53 +0,0 @@
|
|||
# Source charm: ./src/tox.ini
|
||||
# This file is managed centrally by release-tools and should not be modified
|
||||
# within individual charm repos.
|
||||
[tox]
|
||||
envlist = pep8
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONHASHSEED=0
|
||||
AMULET_SETUP_TIMEOUT=5400
|
||||
whitelist_externals = juju
|
||||
passenv = HOME TERM AMULET_* CS_*
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
install_command =
|
||||
pip install {opts} {packages}
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python2.7
|
||||
commands = charm-proof
|
||||
|
||||
[testenv:func27-noop]
|
||||
# DRY RUN - For Debug
|
||||
basepython = python2.7
|
||||
commands =
|
||||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy
|
||||
|
||||
[testenv:func27]
|
||||
# Run all gate tests which are +x (expected to always pass)
|
||||
basepython = python2.7
|
||||
commands =
|
||||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy
|
||||
|
||||
[testenv:func27-smoke]
|
||||
# Run a specific test as an Amulet smoke test (expected to always pass)
|
||||
basepython = python2.7
|
||||
commands =
|
||||
bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-mitaka --no-destroy
|
||||
|
||||
[testenv:func27-dfs]
|
||||
# Run all deploy-from-source tests which are +x (may not always pass!)
|
||||
basepython = python2.7
|
||||
commands =
|
||||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy
|
||||
|
||||
[testenv:func27-dev]
|
||||
# Run all development test targets which are +x (may not always pass!)
|
||||
basepython = python2.7
|
||||
commands =
|
||||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
|
@ -1,13 +0,0 @@
|
|||
# This file is managed centrally. If you find the need to modify this as a
|
||||
# one-off, please don't. Intead, consult #openstack-charms and ask about
|
||||
# requirements management in charms via bot-control. Thank you.
|
||||
#
|
||||
# Lint and unit test requirements
|
||||
flake8>=2.2.4,<=2.4.1
|
||||
os-testr>=0.4.1
|
||||
requests>=2.18.4
|
||||
charms.reactive
|
||||
mock>=1.2
|
||||
nose>=1.3.7
|
||||
coverage>=3.6
|
||||
git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack
|
56
tox.ini
56
tox.ini
|
@ -1,56 +0,0 @@
|
|||
# Source charm: ./tox.ini
|
||||
# This file is managed centrally by release-tools and should not be modified
|
||||
# within individual charm repos.
|
||||
[tox]
|
||||
skipsdist = True
|
||||
envlist = pep8,py34,py35
|
||||
skip_missing_interpreters = True
|
||||
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONHASHSEED=0
|
||||
TERM=linux
|
||||
LAYER_PATH={toxinidir}/layers
|
||||
INTERFACE_PATH={toxinidir}/interfaces
|
||||
JUJU_REPOSITORY={toxinidir}/build
|
||||
passenv = http_proxy https_proxy
|
||||
install_command =
|
||||
pip install {opts} {packages}
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
|
||||
[testenv:build]
|
||||
basepython = python2.7
|
||||
commands =
|
||||
charm-build --log-level DEBUG -o {toxinidir}/build src {posargs}
|
||||
|
||||
[testenv:py27]
|
||||
basepython = python2.7
|
||||
# Reactive source charms are Python3-only, but a py27 unit test target
|
||||
# is required by OpenStack Governance. Remove this shim as soon as
|
||||
# permitted. https://governance.openstack.org/tc/reference/cti/python_cti.html
|
||||
whitelist_externals = true
|
||||
commands = true
|
||||
|
||||
[testenv:py34]
|
||||
basepython = python3.4
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = ostestr {posargs}
|
||||
|
||||
[testenv:py35]
|
||||
basepython = python3.5
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = ostestr {posargs}
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3.5
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = flake8 {posargs} src unit_tests
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# E402 ignore necessary for path append before sys module import in actions
|
||||
ignore = E402
|
|
@ -1,24 +0,0 @@
|
|||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import sys
|
||||
|
||||
sys.path.append('src')
|
||||
sys.path.append('src/lib')
|
||||
|
||||
# Mock out charmhelpers so that we can test without it.
|
||||
import charms_openstack.test_mocks # noqa
|
||||
charms_openstack.test_mocks.mock_charmhelpers()
|
||||
sys.modules['charmhelpers.core.decorators'] = (
|
||||
charms_openstack.test_mocks.charmhelpers.core.decorators)
|
|
@ -1,168 +0,0 @@
|
|||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
import unittest
|
||||
|
||||
import mock
|
||||
|
||||
import charm.openstack.openvswitch_odl as openvswitch_odl
|
||||
|
||||
CONN_STRING = 'tcp:odl-controller:6640'
|
||||
LOCALHOST = '10.1.1.1'
|
||||
|
||||
|
||||
class Helper(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self._patches = {}
|
||||
self._patches_start = {}
|
||||
|
||||
def tearDown(self):
|
||||
for k, v in self._patches.items():
|
||||
v.stop()
|
||||
setattr(self, k, None)
|
||||
self._patches = None
|
||||
self._patches_start = None
|
||||
|
||||
def patch(self, obj, attr, return_value=None, **kwargs):
|
||||
mocked = mock.patch.object(obj, attr, **kwargs)
|
||||
self._patches[attr] = mocked
|
||||
started = mocked.start()
|
||||
started.return_value = return_value
|
||||
self._patches_start[attr] = started
|
||||
setattr(self, attr, started)
|
||||
|
||||
|
||||
class TestOpenStackOVSODLCharm(Helper):
|
||||
|
||||
def test_configure_openvswitch(self):
|
||||
odl_ovsdb = mock.MagicMock()
|
||||
self.patch(openvswitch_odl.ch_ip, 'get_address_in_network')
|
||||
self.patch(openvswitch_odl.hookenv, 'log')
|
||||
self.patch(openvswitch_odl.hookenv, 'status_set')
|
||||
self.patch(openvswitch_odl.hookenv, 'unit_private_ip')
|
||||
self.patch(openvswitch_odl.ovs, 'set_config')
|
||||
self.patch(openvswitch_odl.ovs, 'set_manager')
|
||||
self.patch(openvswitch_odl.socket, 'gethostname')
|
||||
self.gethostname.return_value = 'ovs-host'
|
||||
self.unit_private_ip.return_value = LOCALHOST
|
||||
self.get_address_in_network.return_value = LOCALHOST
|
||||
odl_ovsdb.connection_string.return_value = CONN_STRING
|
||||
odl_ovsdb.private_address.return_value = 'odl-controller'
|
||||
a = openvswitch_odl.OVSODLCharm()
|
||||
a.configure_openvswitch(odl_ovsdb)
|
||||
self.set_manager.assert_called_with(CONN_STRING)
|
||||
self.set_config.assert_has_calls([
|
||||
mock.call('local_ip', '10.1.1.1'),
|
||||
mock.call('controller-ips', 'odl-controller',
|
||||
table='external_ids'),
|
||||
mock.call('host-id', 'ovs-host',
|
||||
table='external_ids'),
|
||||
])
|
||||
self.get_address_in_network.assert_called_with(mock.ANY, '10.1.1.1')
|
||||
self.status_set.assert_called_with('active',
|
||||
'Unit is ready')
|
||||
|
||||
def test_unconfigure_openvswitch(self):
|
||||
odl_ovsdb = mock.MagicMock()
|
||||
self.patch(openvswitch_odl.hookenv, 'log')
|
||||
self.patch(openvswitch_odl.hookenv, 'status_set')
|
||||
self.patch(openvswitch_odl.subprocess, 'check_call')
|
||||
self.patch(openvswitch_odl.subprocess, 'check_output')
|
||||
self.check_output.return_value = "br-data\nbr-ex\nbr-int\n"
|
||||
a = openvswitch_odl.OVSODLCharm()
|
||||
a.unconfigure_openvswitch(odl_ovsdb)
|
||||
check_call_calls = [
|
||||
mock.call(['ovs-vsctl', 'del-manager']),
|
||||
mock.call(['ovs-vsctl', 'del-controller', 'br-data']),
|
||||
mock.call(['ovs-vsctl', 'del-controller', 'br-ex']),
|
||||
mock.call(['ovs-vsctl', 'del-controller', 'br-int'])]
|
||||
self.check_call.assert_has_calls(check_call_calls)
|
||||
self.check_output.assert_called_once_with(['ovs-vsctl', 'list-br'])
|
||||
self.status_set.assert_called
|
||||
|
||||
def test_configure_neutron_plugin(self):
|
||||
neutron_plugin = mock.MagicMock()
|
||||
a = openvswitch_odl.OVSODLCharm()
|
||||
a.configure_neutron_plugin(neutron_plugin)
|
||||
neutron_plugin.configure_plugin.assert_called_with(
|
||||
plugin='ovs-odl',
|
||||
config={
|
||||
"nova-compute": {
|
||||
"/etc/nova/nova.conf": {
|
||||
"sections": {
|
||||
'DEFAULT': [
|
||||
('firewall_driver',
|
||||
'nova.virt.firewall.NoopFirewallDriver'),
|
||||
('libvirt_vif_driver',
|
||||
'nova.virt.libvirt.vif.'
|
||||
'LibvirtGenericVIFDriver'),
|
||||
('security_group_api', 'neutron'),
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
def test_odl_node_registration(self):
|
||||
controller = mock.MagicMock()
|
||||
odl = mock.MagicMock()
|
||||
self.patch(openvswitch_odl.socket, 'gethostname')
|
||||
self.patch(openvswitch_odl.odl, 'ODLConfig')
|
||||
self.patch(openvswitch_odl.ch_ip, 'get_address_in_network')
|
||||
self.patch(openvswitch_odl.hookenv, 'log')
|
||||
self.patch(openvswitch_odl.hookenv, 'unit_private_ip')
|
||||
self.gethostname.return_value = 'ovs-host'
|
||||
self.unit_private_ip.return_value = LOCALHOST
|
||||
self.get_address_in_network.return_value = LOCALHOST
|
||||
self.ODLConfig.return_value = odl
|
||||
odl.is_device_registered.return_value = False
|
||||
a = openvswitch_odl.OVSODLCharm()
|
||||
a.odl_node_registration(controller)
|
||||
self.get_address_in_network.assert_called_once_with(mock.ANY,
|
||||
'10.1.1.1')
|
||||
odl.odl_register_node.assert_called_once_with('ovs-host', '10.1.1.1')
|
||||
|
||||
def test_odl_node_registration_already_registered(self):
|
||||
controller = mock.MagicMock()
|
||||
odl = mock.MagicMock()
|
||||
self.patch(openvswitch_odl.socket, 'gethostname')
|
||||
self.patch(openvswitch_odl.odl, 'ODLConfig')
|
||||
self.ODLConfig.return_value = odl
|
||||
odl.is_device_registered.return_value = True
|
||||
a = openvswitch_odl.OVSODLCharm()
|
||||
a.odl_node_registration(controller)
|
||||
self.assertFalse(odl.odl_register_node.called)
|
||||
|
||||
def test_odl_register_macs(self):
|
||||
controller = mock.MagicMock()
|
||||
odl = mock.MagicMock()
|
||||
odl.is_net_device_registered.return_value = False
|
||||
self.patch(openvswitch_odl.socket, 'gethostname')
|
||||
self.patch(openvswitch_odl.odl, 'ODLConfig')
|
||||
self.patch(openvswitch_odl.pci, 'PCIInfo')
|
||||
self.ODLConfig.return_value = odl
|
||||
self.gethostname.return_value = 'ovs-host'
|
||||
self.PCIInfo.return_value = {
|
||||
'local_config': {
|
||||
'mac1': [
|
||||
{'net': 'net1', 'interface': 'eth1'}]}}
|
||||
a = openvswitch_odl.OVSODLCharm()
|
||||
a.odl_register_macs(controller)
|
||||
odl.odl_register_macs.assert_called_once_with(
|
||||
'ovs-host', 'net1', 'eth1', 'mac1', device_type='ovs')
|
|
@ -1,111 +0,0 @@
|
|||
# Copyright 2016 Canonical Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
import mock
|
||||
|
||||
import reactive.openvswitch_odl_handlers as handlers
|
||||
|
||||
import charms_openstack.test_utils as test_utils
|
||||
|
||||
|
||||
class TestRegisteredHooks(test_utils.TestRegisteredHooks):
|
||||
|
||||
def test_hooks(self):
|
||||
defaults = [
|
||||
'charm.installed',
|
||||
'config.changed',
|
||||
'update-status']
|
||||
hook_set = {
|
||||
'when': {
|
||||
'configure_openvswitch': (
|
||||
'charm.installed',
|
||||
'ovsdb-manager.access.available',),
|
||||
'unconfigure_openvswitch': (
|
||||
'ovs.configured',),
|
||||
'configure_neutron_plugin': (
|
||||
'neutron-plugin.connected',),
|
||||
'odl_node_registration': (
|
||||
'controller-api.access.available',),
|
||||
'odl_mac_registration': (
|
||||
'controller-api.access.available',),
|
||||
},
|
||||
'when_not': {
|
||||
'unconfigure_openvswitch': (
|
||||
'ovsdb-manager.access.available',),
|
||||
}
|
||||
}
|
||||
# test that the hooks were registered via the
|
||||
# reactive.barbican_handlers
|
||||
self.registered_hooks_test_helper(handlers, hook_set, defaults)
|
||||
|
||||
|
||||
class TestConfigureOpenvswitch(test_utils.PatchHelper):
|
||||
|
||||
def test_configure_openvswitch(self):
|
||||
ovs_odl_charm = mock.MagicMock()
|
||||
self.patch_object(handlers.reactive, 'set_state')
|
||||
self.patch_object(handlers.charm, 'provide_charm_instance',
|
||||
new=mock.MagicMock())
|
||||
self.provide_charm_instance().__enter__.return_value = ovs_odl_charm
|
||||
self.provide_charm_instance().__exit__.return_value = None
|
||||
|
||||
handlers.configure_openvswitch('arg1')
|
||||
ovs_odl_charm.configure_openvswitch.assert_called_once_with(('arg1'))
|
||||
self.set_state.assert_called_once_with('ovs.configured')
|
||||
|
||||
def test_unconfigure_openvswitch(self):
|
||||
ovs_odl_charm = mock.MagicMock()
|
||||
self.patch_object(handlers.reactive, 'remove_state')
|
||||
self.patch_object(handlers.charm, 'provide_charm_instance',
|
||||
new=mock.MagicMock())
|
||||
self.provide_charm_instance().__enter__.return_value = ovs_odl_charm
|
||||
self.provide_charm_instance().__exit__.return_value = None
|
||||
|
||||
handlers.unconfigure_openvswitch()
|
||||
ovs_odl_charm.unconfigure_openvswitch.assert_called_once_with(None)
|
||||
self.remove_state.assert_called_once_with('ovs.configured')
|
||||
|
||||
def test_configure_neutron_plugin(self):
|
||||
ovs_odl_charm = mock.MagicMock()
|
||||
self.patch_object(handlers.charm, 'provide_charm_instance',
|
||||
new=mock.MagicMock())
|
||||
self.provide_charm_instance().__enter__.return_value = ovs_odl_charm
|
||||
self.provide_charm_instance().__exit__.return_value = None
|
||||
|
||||
handlers.configure_neutron_plugin('arg1')
|
||||
ovs_odl_charm.configure_neutron_plugin.assert_called_once_with(
|
||||
('arg1'))
|
||||
|
||||
def test_odl_node_registration(self):
|
||||
ovs_odl_charm = mock.MagicMock()
|
||||
self.patch_object(handlers.charm, 'provide_charm_instance',
|
||||
new=mock.MagicMock())
|
||||
self.provide_charm_instance().__enter__.return_value = ovs_odl_charm
|
||||
self.provide_charm_instance().__exit__.return_value = None
|
||||
|
||||
handlers.odl_node_registration('arg1')
|
||||
ovs_odl_charm.register_node.assert_called_once_with(('arg1'))
|
||||
|
||||
def test_odl_mac_registration(self):
|
||||
ovs_odl_charm = mock.MagicMock()
|
||||
self.patch_object(handlers.charm, 'provide_charm_instance',
|
||||
new=mock.MagicMock())
|
||||
self.provide_charm_instance().__enter__.return_value = ovs_odl_charm
|
||||
self.provide_charm_instance().__exit__.return_value = None
|
||||
|
||||
handlers.odl_mac_registration('arg1')
|
||||
ovs_odl_charm.register_macs.assert_called_once_with(('arg1'))
|
Loading…
Reference in New Issue