Upgraded to novaclient.v2
This commit is contained in:
parent
8fd1b1e684
commit
cb60d4b797
@ -74,7 +74,7 @@ from neat.contracts_extra import *
|
||||
import bottle
|
||||
from hashlib import sha1
|
||||
import novaclient
|
||||
from novaclient.v1_1 import client
|
||||
from novaclient.v2 import client
|
||||
import time
|
||||
import subprocess
|
||||
|
||||
|
@ -17,7 +17,7 @@ from pyqcy import *
|
||||
|
||||
import bottle
|
||||
from hashlib import sha1
|
||||
from novaclient.v1_1 import client
|
||||
from novaclient.v2 import client
|
||||
import time
|
||||
import subprocess
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from novaclient.v1_1 import client
|
||||
from novaclient.v2 import client
|
||||
import neat.common as common
|
||||
import neat.globals.manager as manager
|
||||
from neat.config import *
|
||||
@ -65,7 +65,7 @@ for host, vms in hosts_to_vms.items():
|
||||
hosts_cpu_usage[host] = hosts_cpu_usage_hypervisor[host] + \
|
||||
sum(vms_cpu_usage[x] for x in vms)
|
||||
hosts_ram_usage[host] = manager.host_used_ram(nova, host)
|
||||
|
||||
|
||||
|
||||
first = True
|
||||
for host in sorted(hosts_to_vms.keys()):
|
||||
@ -74,8 +74,8 @@ for host in sorted(hosts_to_vms.keys()):
|
||||
first = False
|
||||
vms = hosts_to_vms[host]
|
||||
print '{0:24} {1:5d} / {2:5d} MHz {3:5d} / {4:5d} MB'. \
|
||||
format(host,
|
||||
hosts_cpu_usage[host],
|
||||
format(host,
|
||||
hosts_cpu_usage[host],
|
||||
hosts_cpu_total[host],
|
||||
hosts_ram_usage[host],
|
||||
hosts_ram_total[host])
|
||||
@ -88,7 +88,7 @@ for host in sorted(hosts_to_vms.keys()):
|
||||
print ' {0:10} {1:9} {2:5d} / {3:5d} MHz {4:5d} / {5:5d} MB'. \
|
||||
format(vm,
|
||||
vms_status[uuid],
|
||||
vms_cpu_usage[uuid],
|
||||
vms_cpu_usage[uuid],
|
||||
hosts_cpu_core[host],
|
||||
vms_ram,
|
||||
vms_ram)
|
||||
|
Loading…
Reference in New Issue
Block a user