marvin: establishing some defaults

when logging in just use defaults if no service dict values are provided
This commit is contained in:
Prasanna Santhanam 2012-12-13 14:08:39 -08:00
parent 82a17a413b
commit fd6be7a37b
1 changed files with 6 additions and 0 deletions

View File

@ -205,10 +205,16 @@ class VirtualMachine:
self.__dict__.update(items)
if "username" in services:
self.username = services["username"]
else:
self.username = 'root'
if "password" in services:
self.password = services["password"]
else:
self.password = 'password'
if "ssh_port" in services:
self.ssh_port = services["ssh_port"]
else:
self.ssh_port = 22
self.ssh_client = None
#extract out the ipaddress
self.ipaddress = self.nic[0].ipaddress