summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--docs/conf.py1
-rw-r--r--docs/conf.yaml3
-rw-r--r--docs/index.rst16
-rw-r--r--docs/requirements.txt2
-rw-r--r--examples/launch.py4
-rw-r--r--requirements.txt4
-rw-r--r--snaps/openstack/create_instance.py4
-rw-r--r--snaps/openstack/utils/launch_utils.py4
-rw-r--r--snaps/openstack/utils/neutron_utils.py2
-rw-r--r--snaps/provisioning/ansible_utils.py4
-rw-r--r--snaps/provisioning/tests/ansible_utils_tests.py2
-rw-r--r--tox.ini17
13 files changed, 61 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index b3c2444..9292c06 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@
*.*project
build
dist
+.tox
+docs/_build/*
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..3c4453e
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1 @@
+from docs_conf.conf import *
diff --git a/docs/conf.yaml b/docs/conf.yaml
new file mode 100644
index 0000000..0bb596d
--- /dev/null
+++ b/docs/conf.yaml
@@ -0,0 +1,3 @@
+---
+project_cfg: opnfv
+project: SNAPS
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000..aceb2fc
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,16 @@
+.. _snaps:
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. SPDX-License-Identifier CC-BY-4.0
+.. (c) Open Platform for NFV Project, Inc. and its contributors
+
+*********************************
+OPNFV Snaps
+*********************************
+
+.. toctree::
+ :numbered:
+ :maxdepth: 3
+
+ /how-to-use/index
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644
index 0000000..9fde2df
--- /dev/null
+++ b/docs/requirements.txt
@@ -0,0 +1,2 @@
+lfdocs-conf
+sphinx_opnfv_theme
diff --git a/examples/launch.py b/examples/launch.py
index 04bc5d6..cfd7f65 100644
--- a/examples/launch.py
+++ b/examples/launch.py
@@ -32,6 +32,10 @@ logger = logging.getLogger('snaps_launcher')
ARG_NOT_SET = "argument not set"
+from warnings import warn
+warn('This script will be removed in a subsequent release',
+ DeprecationWarning)
+
def main(arguments):
"""
diff --git a/requirements.txt b/requirements.txt
index 2404837..6721540 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,5 +13,5 @@ wrapt>=1.7.0 # BSD License
scp
cryptography>=2.1 # BSD/Apache-2.0
concurrencytest
-jinja2
-keystoneauth1
+Jinja2 # BSD License (3 clause)
+keystoneauth1 # Apache-2.0
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py
index e2a6991..b158a25 100644
--- a/snaps/openstack/create_instance.py
+++ b/snaps/openstack/create_instance.py
@@ -475,6 +475,10 @@ class OpenStackVmInstance(OpenStackComputeObject):
:param fip_name: the name of the floating IP to use for applying the
playbook (default - will take the first)
"""
+ from warnings import warn
+ warn('This method will be removed in a subsequent release',
+ DeprecationWarning)
+
ansible_utils.apply_playbook(
pb_file_loc, [self.get_floating_ip(fip_name=fip_name).ip],
self.get_image_user(),
diff --git a/snaps/openstack/utils/launch_utils.py b/snaps/openstack/utils/launch_utils.py
index bb7600c..ddaad12 100644
--- a/snaps/openstack/utils/launch_utils.py
+++ b/snaps/openstack/utils/launch_utils.py
@@ -53,6 +53,10 @@ from snaps.openstack.utils import deploy_utils, neutron_utils, keystone_utils
from snaps.openstack.utils.nova_utils import RebootType
from snaps.provisioning import ansible_utils
+from warnings import warn
+warn('This utility will be removed in a subsequent release',
+ DeprecationWarning)
+
logger = logging.getLogger('lanuch_utils')
DEFAULT_CREDS_KEY = 'admin'
diff --git a/snaps/openstack/utils/neutron_utils.py b/snaps/openstack/utils/neutron_utils.py
index c199b99..f1a5ac2 100644
--- a/snaps/openstack/utils/neutron_utils.py
+++ b/snaps/openstack/utils/neutron_utils.py
@@ -890,7 +890,7 @@ def __get_os_floating_ip(neutron, floating_ip):
"""
logger.debug('Attempting to retrieve existing floating ip with IP - %s',
floating_ip.ip)
- fips = neutron.list_floatingips(ip=floating_ip.id)
+ fips = neutron.list_floatingips(floating_ip_address=floating_ip.ip)
for fip in fips['floatingips']:
if fip['id'] == floating_ip.id:
diff --git a/snaps/provisioning/ansible_utils.py b/snaps/provisioning/ansible_utils.py
index b4c86f2..019a8e7 100644
--- a/snaps/provisioning/ansible_utils.py
+++ b/snaps/provisioning/ansible_utils.py
@@ -29,6 +29,10 @@ except:
__author__ = 'spisarski'
+from warnings import warn
+warn('This utility will be removed in a subsequent release',
+ DeprecationWarning)
+
logger = logging.getLogger('ansible_utils')
diff --git a/snaps/provisioning/tests/ansible_utils_tests.py b/snaps/provisioning/tests/ansible_utils_tests.py
index 33e8edd..b6ace31 100644
--- a/snaps/provisioning/tests/ansible_utils_tests.py
+++ b/snaps/provisioning/tests/ansible_utils_tests.py
@@ -91,7 +91,7 @@ class AnsibleProvisioningTests(OSIntegrationTestCase):
self.pub_net_config = openstack_tests.get_pub_net_config(
project_name=self.os_creds.project_name,
net_name=guid + '-pub-net',
- mtu=1450, subnet_name=guid + '-pub-subnet',
+ mtu=1442, subnet_name=guid + '-pub-subnet',
router_name=guid + '-pub-router',
external_net=self.ext_net_name)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..69aa189
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,17 @@
+[tox]
+minversion = 1.6
+envlist =
+ docs,
+ docs-linkcheck
+skipsdist = true
+
+[testenv:docs]
+deps = -rdocs/requirements.txt
+commands =
+ sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+ echo "Generated docs available in {toxinidir}/docs/_build/html"
+whitelist_externals = echo
+
+[testenv:docs-linkcheck]
+deps = -rdocs/requirements.txt
+commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck