minor error fix and and clouds.yaml
This commit is contained in:
parent
642871c5fb
commit
1092f0a37c
|
@ -0,0 +1 @@
|
|||
Subproject commit 642871c5fb615cdcc1cd95536a2060a5c46d42b9
|
|
@ -358,4 +358,4 @@ if __name__ == '__main__':
|
|||
# print(VM_info)
|
||||
|
||||
# run API server
|
||||
app.run(debug=True)
|
||||
app.run(host='0.0.0.0')
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
clouds:
|
||||
Stella:
|
||||
auth:
|
||||
auth_url: http://Controller:5000
|
||||
password: ADMIN_PASS
|
||||
project_domain_id: default
|
||||
project_name: admin
|
||||
user_domain_id: default
|
||||
username: admin
|
||||
identity_api_version: '3'
|
||||
region_name: RegionOne
|
||||
volume_api_version: '2'
|
|
@ -19,7 +19,7 @@ utils.enable_logging(True, stream=sys.stdout)
|
|||
#: typically in $HOME/.config/openstack/clouds.yaml. That configuration
|
||||
#: will determine where the examples will be run and what resource defaults
|
||||
#: will be used to run the examples.
|
||||
STELLA_CLOUD = os.getenv('OS_CLOUD', 'Stella-DevStack')
|
||||
STELLA_CLOUD = os.getenv('OS_CLOUD', 'Stella')
|
||||
config = loader.OpenStackConfig()
|
||||
CLOUD = openstack.connect(cloud=STELLA_CLOUD)
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
vm=$1
|
||||
sla_option=$2
|
||||
sla_value=$3
|
||||
|
||||
count=`expr 0`
|
||||
pid=$(sudo grep domstatus /var/run/libvirt/qemu/${vm}.xml | tr -dc '0-9')
|
||||
dev_string=$(virsh dumpxml ${vm} | egrep 'nvme|sd')
|
||||
name_dev=${dev_string#*\'}
|
||||
name_dev=${name_dev%\'*}
|
||||
|
||||
if [ ! "${name_dev}"];then
|
||||
name_dev="null"
|
||||
fi
|
||||
|
||||
if [ "$2" = "n_maxcredit" ];then
|
||||
vhost_cmd=$(ps -el | grep vhost | grep ${pid})
|
||||
for vhost_pid in ${vhost_cmd}
|
||||
do
|
||||
count=`expr ${count} + 1`
|
||||
|
||||
if [ ${count} = 4 ];then
|
||||
pid=${vhost_pid}
|
||||
fi
|
||||
done
|
||||
#check this command line
|
||||
#name_dev="null"
|
||||
fi
|
||||
|
||||
cmd="$1 $2 $3 ${pid} ${name_dev}"
|
||||
echo ${cmd} > /proc/gos_vm_info
|
Loading…
Reference in New Issue