summaryrefslogtreecommitdiff
path: root/devstack/plugin.sh
diff options
context:
space:
mode:
authorDylan McCulloch <dylan.mcculloch@gmail.com>2022-02-03 18:41:18 +1100
committerDylan McCulloch <dylan.mcculloch@gmail.com>2022-02-03 20:00:23 +1100
commitf6327f0668b31895f8e27c4e631c60ea20d44b79 (patch)
treecf8073ec4fc3ff1d83aae735a7dbe76120ecf412 /devstack/plugin.sh
parentbe86b79119d16ee77f596172f43b0c97cb2617bd (diff)
downloadtrove-f6327f0668b31895f8e27c4e631c60ea20d44b79.tar.gz
Use os-cloud trove creds
Task: 44414 Story: 2009826 Change-Id: I382b86c341de2d5c4687fbb4cc9cc48b17a03081
Diffstat (limited to 'devstack/plugin.sh')
-rw-r--r--devstack/plugin.sh18
1 files changed, 6 insertions, 12 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 2c8b3b7a..01800907 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -479,8 +479,7 @@ function create_guest_image {
fi
echo "Add the image to glance"
- glance_image_id=$(openstack --os-region-name RegionOne --os-password ${SERVICE_PASSWORD} \
- --os-project-name service --os-username trove \
+ glance_image_id=$(openstack --os-cloud trove \
image create ${image_name} \
--disk-format qcow2 --container-format bare \
--tag trove \
@@ -593,16 +592,13 @@ function config_nova_keypair {
fi
echo "Creating Trove management keypair ${TROVE_MGMT_KEYPAIR_NAME}"
- openstack --os-region-name RegionOne --os-password ${SERVICE_PASSWORD} --os-project-name service --os-username trove \
- keypair create --public-key ${SSH_DIR}/id_rsa.pub ${TROVE_MGMT_KEYPAIR_NAME}
+ openstack --os-cloud trove keypair create --public-key ${SSH_DIR}/id_rsa.pub ${TROVE_MGMT_KEYPAIR_NAME}
iniset $TROVE_CONF DEFAULT nova_keypair ${TROVE_MGMT_KEYPAIR_NAME}
}
function config_cinder_volume_type {
- volume_type=$(openstack --os-region-name RegionOne --os-password ${SERVICE_PASSWORD} \
- --os-project-name service --os-username trove \
- volume type list -c Name -f value | awk 'NR==1 {print}')
+ volume_type=$(openstack --os-cloud trove volume type list -c Name -f value | awk 'NR==1 {print}')
iniset $TROVE_CONF DEFAULT cinder_volume_type ${volume_type}
}
@@ -611,14 +607,12 @@ function config_mgmt_security_group {
local sgid
echo "Creating Trove management security group."
- sgid=$(openstack --os-region-name RegionOne --os-password ${SERVICE_PASSWORD} --os-project-name service --os-username trove security group create ${TROVE_MGMT_SECURITY_GROUP} -f value -c id)
+ sgid=$(openstack --os-cloud trove security group create ${TROVE_MGMT_SECURITY_GROUP} -f value -c id)
# Allow ICMP
- openstack --os-region-name RegionOne --os-password ${SERVICE_PASSWORD} --os-project-name service --os-username trove \
- security group rule create --proto icmp $sgid
+ openstack --os-cloud trove security group rule create --proto icmp $sgid
# Allow SSH
- openstack --os-region-name RegionOne --os-password ${SERVICE_PASSWORD} --os-project-name service --os-username trove \
- security group rule create --protocol tcp --dst-port 22 $sgid
+ openstack --os-cloud trove security group rule create --protocol tcp --dst-port 22 $sgid
iniset $TROVE_CONF DEFAULT management_security_groups $sgid
}