Get latest changes, Merge branch 'master' into api_refactoring

This commit is contained in:
Rohit Yadav 2013-01-04 17:22:57 -08:00
commit 0659c21f2d
8 changed files with 28 additions and 15 deletions

View File

@ -266,6 +266,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${cs.mysql.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>

View File

@ -109,6 +109,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${cs.mysql.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>

View File

@ -50,6 +50,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${cs.mysql.version}</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -764,7 +764,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
VirtualMachineTO vmTO = hvGuru.implement(vmProfile);
cmds = new Commands(OnError.Stop);
cmds.addCommand(new StartCommand(vmTO));
cmds.addCommand(new StartCommand(vmTO, dest.getHost()));
vmGuru.finalizeDeployment(cmds, vmProfile, dest, ctx);

View File

@ -160,11 +160,11 @@ class CloudMonkeyShell(cmd.Cmd, object):
elif 'type' in arg:
print colored.green(arg),
elif 'state' in arg or 'count' in arg:
print colored.yellow(arg),
elif 'id =' in arg:
print colored.cyan(arg),
elif 'name =' in arg:
print colored.magenta(arg),
elif 'id =' in arg:
print colored.yellow(arg),
elif 'name =' in arg:
print colored.cyan(arg),
else:
print arg,
else:
@ -203,7 +203,8 @@ class CloudMonkeyShell(cmd.Cmd, object):
print printer
def print_result_as_dict(result, result_filter=None):
for key in result.keys():
for key in sorted(result.keys(),
key=lambda x: x!='id' and x!='count' and x):
if not (isinstance(result[key], list) or
isinstance(result[key], dict)):
self.print_shell("%s = %s" % (key, result[key]))
@ -265,10 +266,18 @@ class CloudMonkeyShell(cmd.Cmd, object):
command = "queryAsyncJobResult"
requests = {'jobid': jobId}
timeout = int(self.timeout)
pollperiod = 3
while timeout > 0:
progress = int((int(self.timeout) - timeout) / pollperiod ) + 1
print '\r' + '.' * progress,
sys.stdout.flush()
response = process_json(conn.make_request_with_auth(command,
requests))
result = response[response.keys()[0]]
responsekeys = filter(lambda x: 'response' in x,
response.keys())
if len(responsekeys) < 1:
continue
result = response[responsekeys[0]]
jobstatus = result['jobstatus']
if jobstatus == 2:
jobresult = result["jobresult"]
@ -277,9 +286,10 @@ class CloudMonkeyShell(cmd.Cmd, object):
jobresult["errortext"])
return
elif jobstatus == 1:
print '\r',
return response
time.sleep(4)
timeout = timeout - 4
time.sleep(pollperiod)
timeout = timeout - pollperiod
logger.debug("job: %s to timeout in %ds" % (jobId, timeout))
self.print_shell("Error:", "Async query timeout for jobid=", jobId)
@ -346,9 +356,9 @@ class CloudMonkeyShell(cmd.Cmd, object):
if result is None:
return
try:
# Response is in the key "apiname+response" (lowercase)
self.print_result(result[api_name.lower() + 'response'],
field_filter)
responsekeys = filter(lambda x: 'response' in x, result.keys())
for responsekey in responsekeys:
self.print_result(result[responsekey], field_filter)
print
except Exception as e:
self.print_shell("🙈 Error on parsing and printing", e)

View File

@ -2062,7 +2062,6 @@ div.detail-group.actions td {
float: right;
margin-top: 8px;
display: inline-block;
background: url(../images/citrix-logo-darkbg.png) no-repeat 97% 8px;
padding: 0 96px 0 0;
}

View File

@ -867,9 +867,9 @@
hiddenTabs.push("addloadBalancer");
}
if (isVPC || isAdvancedSGZone || hasSRXFirewall) {
// if (isVPC || isAdvancedSGZone || hasSRXFirewall) {
hiddenTabs.push('egressRules');
}
// }
return hiddenTabs;
},

View File

@ -137,6 +137,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${cs.mysql.version}</version>
<scope>test</scope>
</dependency>
<dependency>