More fixes.

This commit is contained in:
Adam Gandelman
2013-01-24 14:09:43 -08:00
parent 6d9c73b6d0
commit 809a18d0f5
3 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ import sys
import time
import os
import maas
import maas as MAAS
import utils
import pcmk
@@ -304,7 +304,7 @@ def configure_cluster():
if None in [url, creds]:
utils.juju_log('ERROR', 'maas_url and maas_credentials must be set'\
' in config to enable STONITH.')
maas = maas.MAASHelper(url, creds)
maas = MAAS.MAASHelper(url, creds)
nodes = maas.list_nodes()
if not nodes:
utils.juju_log('ERROR', 'Could not obtain node inventory from '\

View File

@@ -10,7 +10,7 @@ MAAS_STABLE_PPA = 'ppa:maas-maintainers/stable '
MAAS_PROFILE_NAME = 'maas-juju-hacluster'
class MAASHelper(object):
def __init__(url, creds):
def __init__(self, url, creds):
self.url = url
self.creds = creds
self.install_maas_cli()
@@ -30,7 +30,7 @@ class MAASHelper(object):
subprocess.check_call(cmd)
cmd = ['apt-get', 'update']
subprocess.check_call(cmd)
install_maas_cli()
self.install_maas_cli()
return
if not pkg.current_ver:
@@ -42,7 +42,7 @@ class MAASHelper(object):
try:
subprocess.check_call(cmd)
except subprocess.CalledProcessError:
utils.juju_log('ERROR', 'Could not login to MAAS @ %s.' % url)
utils.juju_log('ERROR', 'Could not login to MAAS @ %s.' % self.url)
return False
@@ -51,7 +51,7 @@ class MAASHelper(object):
subprocess.check_call(cmd)
def list_nodes():
def list_nodes(self):
self.login()
try:

View File

@@ -1 +1 @@
45
50