mirror of https://github.com/apache/cloudstack.git
Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x
This commit is contained in:
commit
c5a196f005
|
|
@ -25,7 +25,7 @@ import com.cloud.user.Account;
|
|||
import com.cloud.user.UserContext;
|
||||
import com.cloud.uservm.UserVm;
|
||||
|
||||
@Implementation(description="Updates parameters of a virtual machine.", responseObject=UserVmResponse.class)
|
||||
@Implementation(description="Updates properties of a virtual machine. The VM has to be stopped and restarted for the new properties to take effect. UpdateVirtualMachine does not first check whether the VM is stopped. Therefore, stop the VM manually before issuing this call.", responseObject=UserVmResponse.class)
|
||||
public class UpdateVMCmd extends BaseCmd{
|
||||
public static final Logger s_logger = Logger.getLogger(UpdateVMCmd.class.getName());
|
||||
private static final String s_name = "updatevirtualmachineresponse";
|
||||
|
|
|
|||
|
|
@ -1024,7 +1024,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
|
|||
protected GetVncPortAnswer execute(GetVncPortCommand cmd) {
|
||||
try {
|
||||
Integer vncPort = OvmVm.getVncPort(_conn, cmd.getName());
|
||||
return new GetVncPortAnswer(cmd, vncPort);
|
||||
return new GetVncPortAnswer(cmd, _ip, vncPort);
|
||||
} catch (Exception e) {
|
||||
s_logger.debug("get vnc port for " + cmd.getName() + " failed", e);
|
||||
return new GetVncPortAnswer(cmd, e.getMessage());
|
||||
|
|
|
|||
|
|
@ -242,15 +242,24 @@ for full help
|
|||
self.info(None, True)
|
||||
|
||||
awsApiDbDir = '/usr/share/cloud/setup/bridge/db'
|
||||
for f in ["cloudbridge_db.sql", "deploy-db-bridge.sh"]:
|
||||
for f in ["cloudbridge_db.sql"]:
|
||||
p = os.path.join(awsApiDbDir,f)
|
||||
if not os.path.exists(p): continue
|
||||
text = file(p).read()
|
||||
for t, r in replacements: text = text.replace(t,r)
|
||||
file(p, 'w').write(text)
|
||||
self.info("Applying %s"%p)
|
||||
self.runMysql(text, p, True)
|
||||
self.info(None, True)
|
||||
|
||||
awsApiCmds = ['cd %s;'%awsApiDbDir, 'sh deploy-db-bridge.sh %s;'%self.rootpassword, 'cd -']
|
||||
runCmd(awsApiCmds)
|
||||
for f in ["cloudbridge_schema", "cloudbridge_multipart", "cloudbridge_index", "cloudbridge_multipart_alter", "cloudbridge_bucketpolicy", "cloudbridge_policy_alter",
|
||||
"cloudbridge_offering", "cloudbridge_offering_alter"]:
|
||||
if os.path.isfile(p):
|
||||
p = os.path.join(awsApiDbDir,"%s.sql"%f)
|
||||
if not os.path.exists(p): continue
|
||||
text = file(p).read()
|
||||
self.info("Applying %s"%p)
|
||||
self.runMysql(text, p, True)
|
||||
self.info(None, True)
|
||||
|
||||
def prepareDBFiles(self):
|
||||
def prepareDBDotProperties():
|
||||
|
|
|
|||
|
|
@ -1716,8 +1716,7 @@
|
|||
allowedActions.push("restore");
|
||||
}
|
||||
}
|
||||
else if (jsonObj.state == 'Running') {
|
||||
allowedActions.push("edit");
|
||||
else if (jsonObj.state == 'Running') {
|
||||
allowedActions.push("stop");
|
||||
allowedActions.push("restart");
|
||||
allowedActions.push("destroy");
|
||||
|
|
|
|||
Loading…
Reference in New Issue