Merge "Scenario test: Create/extend share and write data"
diff --git a/.gitreview b/.gitreview
index 69109d1..46d37a0 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,4 +1,4 @@
 [gerrit]
-host=review.openstack.org
+host=review.opendev.org
 port=29418
 project=openstack/manila-tempest-plugin.git
diff --git a/README.rst b/README.rst
index 0a2d95b..f84f23f 100644
--- a/README.rst
+++ b/README.rst
@@ -1,6 +1,6 @@
-===============================
-openstack
-===============================
+=====================
+manila-tempest-plugin
+=====================
 
 Tempest plugin manila-tempest-plugin
 
@@ -9,7 +9,7 @@
 * Free software: Apache license
 * Documentation: https://docs.openstack.org/manila/latest/
 * Release notes: https://docs.openstack.org/releasenotes/manila/
-* Source: https://git.openstack.org/cgit/openstack/manila-tempest-plugin
+* Source: https://opendev.org/openstack/manila-tempest-plugin
 * Bugs: https://bugs.launchpad.net/manila-tempest-plugin
 
 Features
diff --git a/devstack/README.rst b/devstack/README.rst
new file mode 100644
index 0000000..efacb7e
--- /dev/null
+++ b/devstack/README.rst
@@ -0,0 +1,21 @@
+====================
+Enabling in Devstack
+====================
+
+**WARNING**: the stack.sh script must be run in a disposable VM that is not
+being created automatically, see the README.md file in the "devstack"
+repository.  See contrib/vagrant to create a vagrant VM.
+
+1. Download DevStack::
+
+    git clone https://opendev.org/openstack/devstack.git
+    cd devstack
+
+2. Add this repo as an external repository::
+
+     > cat local.conf
+     [[local|localrc]]
+     enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
+
+3. run ``stack.sh``
+
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
new file mode 100644
index 0000000..4ee1622
--- /dev/null
+++ b/devstack/plugin.sh
@@ -0,0 +1,16 @@
+# Directory where this plugin.sh file is
+MANILA_TEMPEST_PLUGIN_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
+
+# install_manila_tempest_plugin
+function install_manila_tempest_plugin {
+    setup_dev_lib "manila-tempest-plugin"
+}
+
+if [[ "$1" == "stack" ]]; then
+    case "$2" in
+        install)
+            echo_summary "Installing manila-tempest-plugin"
+            install_manila_tempest_plugin
+            ;;
+    esac
+fi
diff --git a/devstack/settings b/devstack/settings
new file mode 100644
index 0000000..8b95762
--- /dev/null
+++ b/devstack/settings
@@ -0,0 +1,3 @@
+GITREPO["manila-tempest-plugin"]=${MANILA_TEMPEST_REPO:-${GIT_BASE}/openstack/manila-tempest-plugin.git}
+GITDIR["manila-tempest-plugin"]=$DEST/manila-tempest-plugin
+GITBRANCH["manila-tempest-plugin"]=master
diff --git a/manila_tempest_tests/tests/scenario/manager_share.py b/manila_tempest_tests/tests/scenario/manager_share.py
index 175f265..5a38079 100644
--- a/manila_tempest_tests/tests/scenario/manager_share.py
+++ b/manila_tempest_tests/tests/scenario/manager_share.py
@@ -47,8 +47,8 @@
         return self.ip_version == 6
 
     @classmethod
-    def resource_setup(cls):
-        super(ShareScenarioTest, cls).resource_setup()
+    def setup_clients(cls):
+        super(ShareScenarioTest, cls).setup_clients()
 
         # Manila clients
         cls.shares_client = cls.os_primary.share_v1.SharesClient()
diff --git a/manila_tempest_tests/tests/scenario/test_share_shrink.py b/manila_tempest_tests/tests/scenario/test_share_shrink.py
index 8bbb921..03427af 100644
--- a/manila_tempest_tests/tests/scenario/test_share_shrink.py
+++ b/manila_tempest_tests/tests/scenario/test_share_shrink.py
@@ -71,7 +71,7 @@
         LOG.debug('Step 5 - mount')
         self.mount_share(locations[0], remote_client)
 
-        total_blocks = (1024 * default_share_size) / 64
+        total_blocks = int((1024 * default_share_size) / 64)
         blocks = total_blocks + 4
         LOG.debug('Step 6 - writing {} * 64MB blocks'.format(blocks))
         self.write_data_to_mounted_share_using_dd(remote_client,
diff --git a/tox.ini b/tox.ini
index 8dc2a65..f32dd68 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,7 @@
 
 [testenv]
 usedevelop = True
-install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
+install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
 setenv =
    VIRTUAL_ENV={envdir}
    PYTHONWARNINGS=default::DeprecationWarning