Switch everything to rally db
Use `rally db` command instead of `rally-manage db` everywhere Change-Id: Ief8613d60b0c0a763bd9bf3086d7225f1dfe6905
This commit is contained in:
parent
b84a79e98b
commit
a76ae0f20b
@ -109,7 +109,7 @@ function configure_rally() {
|
||||
function init_rally() {
|
||||
recreate_database rally utf8
|
||||
# Recreate rally database
|
||||
rally-manage --config-file $RALLY_CONF_DIR/$RALLY_CONF_FILE db recreate
|
||||
rally --config-file $RALLY_CONF_DIR/$RALLY_CONF_FILE db recreate
|
||||
# Add current DevStack deployment to Rally
|
||||
if [ "$RALLY_ADD_DEPLOYMENT" = "True" ]; then
|
||||
local tmpfile=$(mktemp)
|
||||
|
@ -94,7 +94,7 @@ complete:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
rally-manage db recreate
|
||||
rally db recreate
|
||||
|
||||
.. include:: ../../../devstack/README.rst
|
||||
|
||||
@ -149,7 +149,7 @@ anything with Rally, but you need to create the database first:
|
||||
.. code-block:: console
|
||||
|
||||
user@box:~/rally$ dock_rally
|
||||
rally@1cc98e0b5941:~$ rally-manage db recreate
|
||||
rally@1cc98e0b5941:~$ rally db recreate
|
||||
rally@1cc98e0b5941:~$ rally deployment list
|
||||
There are no deployments. To create a new deployment, use:
|
||||
rally deployment create
|
||||
|
@ -309,7 +309,7 @@ Rally-as-a-Service itself should be started via new command:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ rally-manage service start
|
||||
$ rally service start
|
||||
|
||||
Rally Web Portal
|
||||
----------------
|
||||
|
@ -455,7 +455,7 @@ setup_rally_configuration () {
|
||||
sed "s|#connection *=.*|connection = \"$DBCONNSTRING\"|" "$ETCDIR"/rally.conf > "$CONF_TMPFILE"
|
||||
cat "$CONF_TMPFILE" > "$ETCDIR"/rally.conf
|
||||
rm "$CONF_TMPFILE"
|
||||
rally-manage db recreate
|
||||
rally db recreate
|
||||
}
|
||||
|
||||
rally_venv () {
|
||||
|
@ -1270,14 +1270,14 @@ class API(object):
|
||||
if rev["revision"] is None:
|
||||
raise exceptions.RallyException(_(
|
||||
"Database is missing. Create database by command "
|
||||
"`rally-manage db create'"))
|
||||
"`rally db create'"))
|
||||
|
||||
# Check that db is updated
|
||||
if rev["revision"] != rev["current_head"]:
|
||||
raise exceptions.RallyException(_(
|
||||
"Database seems to be outdated. Run upgrade from "
|
||||
"revision %(revision)s to %(current_head)s by command "
|
||||
"`rally-manage db upgrade'") % rev)
|
||||
"`rally db upgrade'") % rev)
|
||||
|
||||
def _request(self, path, method, **kwargs):
|
||||
headers = {
|
||||
|
@ -30,7 +30,7 @@ End user is provided with the following possibilities:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
rally-manage db revision
|
||||
rally db revision
|
||||
|
||||
- Upgrade existing DB to the latest state.
|
||||
|
||||
@ -39,7 +39,7 @@ End user is provided with the following possibilities:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
rally-manage db upgrade
|
||||
rally db upgrade
|
||||
|
||||
**AFTER** upgrading Rally package. DB schema
|
||||
will get upgraded to the latest state and all existing data will be kept.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
LOCAL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
DB_CONNECTION="$(rally-manage db show)"
|
||||
DB_CONNECTION="$(rally db show)"
|
||||
|
||||
if [[ $DB_CONNECTION == sqlite* ]]; then
|
||||
CONCURRENCY=0
|
||||
|
@ -29,7 +29,7 @@ RALLY="rally --config-file $TMP_RALLY_CONF"
|
||||
# Create temp db
|
||||
cp etc/rally/rally.conf.sample $TMP_RALLY_CONF
|
||||
sed -i.bak "s|#connection =.*|connection = \"$DBCONNSTRING\"|" $TMP_RALLY_CONF
|
||||
rally-manage --config-file $TMP_RALLY_CONF db create
|
||||
rally --config-file $TMP_RALLY_CONF db create
|
||||
|
||||
# Create self deployment
|
||||
echo '{}' > $TMP_RALLY_DEPLOYMENT
|
||||
|
@ -117,12 +117,12 @@ class Rally(object):
|
||||
with open(config_filename, "w") as conf:
|
||||
config.write(conf)
|
||||
self.args = ["rally", "--config-file", config_filename]
|
||||
subprocess.call(["rally-manage", "--config-file", config_filename,
|
||||
subprocess.call(["rally", "--config-file", config_filename,
|
||||
"db", "recreate"], env=self.env)
|
||||
self.config_filename = config_filename
|
||||
else:
|
||||
self.args = ["rally"]
|
||||
subprocess.call(["rally-manage", "db", "recreate"], env=self.env)
|
||||
subprocess.call(["rally", "db", "recreate"], env=self.env)
|
||||
|
||||
self.reports_root = os.environ.get("REPORTS_ROOT",
|
||||
"rally-cli-output-files")
|
||||
|
@ -973,7 +973,7 @@ class APITestCase(test.TestCase):
|
||||
mock_database_revision,
|
||||
mock_isfile):
|
||||
exc = self.assertRaises(exceptions.RallyException, api.API)
|
||||
self.assertIn("rally-manage db upgrade", str(exc))
|
||||
self.assertIn("rally db upgrade", str(exc))
|
||||
mock_conf.assert_called_once_with(
|
||||
[], default_config_files=None, project="rally", version="0.0.0")
|
||||
|
||||
@ -987,7 +987,7 @@ class APITestCase(test.TestCase):
|
||||
mock_database_revision,
|
||||
mock_isfile):
|
||||
exc = self.assertRaises(exceptions.RallyException, api.API)
|
||||
self.assertIn("rally-manage db create", str(exc))
|
||||
self.assertIn("rally db create", str(exc))
|
||||
mock_conf.assert_called_once_with(
|
||||
[], default_config_files=None, project="rally", version="0.0.0")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user