mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss
This commit is contained in:
commit
f8d23c2e1d
|
|
@ -111,3 +111,5 @@ for name,meth in load_dynamic_methods(): setattr(CloudAPI,name,meth)
|
|||
implementor = CloudAPI
|
||||
|
||||
del name,meth,describe,load_dynamic_methods
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ def main(argv=None):
|
|||
api = __import__("cloudapis")
|
||||
apis = getattr(api, "implementor")
|
||||
if len(prelim_args) == 0:
|
||||
parser.error("you need to specify an API as the first argument\n\nSupported APIs:\n" + "\n".join(utils.get_api_list()))
|
||||
parser.error("you need to specify an API as the first argument\n\nSupported APIs:\n" + "\n".join(utils.get_api_list(apis)))
|
||||
elif len(prelim_args) == 1:
|
||||
commandlist = utils.get_command_list(apis)
|
||||
parser.error("you need to specify a command name as the second argument\n\nCommands supported by the %s API:\n"%prelim_args[0] + "\n".join(commandlist))
|
||||
|
|
|
|||
|
|
@ -165,14 +165,13 @@ def lookup_command_in_api(api,command_name):
|
|||
command = getattr(api,command_name.replace("-","_"),None)
|
||||
return command
|
||||
|
||||
def get_api_list():
|
||||
apilist = []
|
||||
for api in apis.get_all_apis():
|
||||
api_module = api
|
||||
api_name = api.__name__.split(".")[-1]
|
||||
if not api_name.startswith("_") and hasattr(api_module,'__doc__'):
|
||||
apilist.append( " %20s %s"%(api_name.replace("_",'-'),api_module.__doc__) )
|
||||
return apilist
|
||||
def get_api_list(api):
|
||||
apilist = []
|
||||
for cmd_name in dir(api):
|
||||
cmd = getattr(api,cmd_name)
|
||||
if callable(cmd) and not cmd_name.startswith("_"):
|
||||
apilist.append(cmd_name)
|
||||
return apilist
|
||||
|
||||
def get_command_list(api):
|
||||
cmds = []
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import com.cloud.storage.VMTemplateVO;
|
|||
import com.cloud.storage.dao.VMTemplateDao.TemplateFilter;
|
||||
import com.cloud.storage.template.TemplateConstants;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.AccountVO;
|
||||
import com.cloud.user.UserContext;
|
||||
|
||||
@Implementation(method="listTemplates", description="List all public, private, and privileged templates.")
|
||||
|
|
@ -151,7 +152,9 @@ public class ListTemplatesCmd extends BaseListCmd {
|
|||
List<TemplateResponse> templateResponses = new ArrayList<TemplateResponse>();
|
||||
|
||||
for (VMTemplateVO template : templates) {
|
||||
if (!showDomr && template.getId() == TemplateConstants.DEFAULT_SYSTEM_VM_DB_ID) {
|
||||
// Since we've added multiple domR templates and with different DB ids, I'm changing
|
||||
// this to filter out any templates with names that start with system for now.
|
||||
if (!showDomr && template.getName().startsWith("SystemVM")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2556,6 +2556,45 @@ a:hover.search_button {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
.row_celltitles.status_red {
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#AB0202;
|
||||
text-align:left;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
margin:0 0 0 10px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.row_celltitles.status_green {
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#538002;
|
||||
text-align:left;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
margin:0 0 0 10px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.row_celltitles.status_gray {
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#666666;
|
||||
text-align:left;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
margin:0 0 0 10px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.row_celltitles.alert {
|
||||
width:100%;
|
||||
height:auto;
|
||||
|
|
|
|||
|
|
@ -34,71 +34,78 @@
|
|||
<p>Loading …</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_actionpanel">
|
||||
<div class="grid_editbox" id="edit_button">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_header">
|
||||
<div id="grid_header_title" class="grid_header_title">(title)</div>
|
||||
<div id="action_link" class="grid_actionbox" id="account_action_link">
|
||||
<div class="grid_actionsdropdown_box" id="action_menu" style="display: none;">
|
||||
<ul class="actionsdropdown_boxlist" id="action_list">
|
||||
<li><%=t.t("no.available.actions")%></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="grid_header_cell" style="width:25%;">
|
||||
<div class="grid_header_title">Name</div>
|
||||
</div>
|
||||
<div class="gridheader_loaderbox" id="spinning_wheel" style="border: 1px solid #999;
|
||||
display: none;">
|
||||
<div class="gridheader_loader" id="Div1">
|
||||
</div>
|
||||
<p id="description">
|
||||
Waiting …</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("name")%>:</div>
|
||||
<div class="grid_header_cell" style="width:20%;">
|
||||
<div class="grid_header_title">Value</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
<div class="grid_header_cell" style="width:24%;">
|
||||
<div class="grid_header_title">Description</div>
|
||||
</div>
|
||||
<div class="grid_header_cell" style="width:20%;">
|
||||
<div class="grid_header_title">Category</div>
|
||||
</div>
|
||||
<div class="grid_header_cell" style="width:10%;">
|
||||
<div class="grid_header_title"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("value")%>:</div>
|
||||
<div class="grid_row_cell" style="width: 25%;">
|
||||
<div class="row_celltitles" id="name"></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles" id="value">
|
||||
</div>
|
||||
<input class="text" id="value_edit" style="width: 200px; display: none;" type="text" />
|
||||
<div id="value_edit_errormsg" style="display:none"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("description")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="grid_row_cell" style="width: 24%;">
|
||||
<div class="row_celltitles" id="description">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("category")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="category">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 10%;">
|
||||
<div class="row_celltitles">
|
||||
<a id="edit_button" href="#">Edit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 25%;">
|
||||
<div class="row_celltitles" id="name"></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles" id="value">
|
||||
</div>
|
||||
<input class="text" id="value_edit" style="width: 200px; display: none;" type="text" />
|
||||
<div id="value_edit_errormsg" style="display:none"></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 24%;">
|
||||
<div class="row_celltitles" id="description">
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles" id="category">
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 10%;">
|
||||
<div class="row_celltitles">
|
||||
<a href="#">Edit</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="grid_botactionpanel">
|
||||
<div class="gridbot_buttons" id="save_button" style="display:none;">Save</div>
|
||||
|
|
|
|||
|
|
@ -310,19 +310,24 @@
|
|||
</div>
|
||||
<div class="rev_wizmid_tempbox_right">
|
||||
<div class="rev_wiztemplistpanel" id="template_container">
|
||||
<!--
|
||||
|
||||
<div id="vmtemplate_in_vmwizard" class="rev_wiztemplistbox">
|
||||
<div id="icon">
|
||||
<div id="icon" class="rev_wiztemo_centosicons">
|
||||
</div>
|
||||
<div class="rev_wiztemp_listtext">
|
||||
<span id="name"></span>
|
||||
<span id="name">Centos</span>
|
||||
<div class="rev_wiztemp_listtext hypervisortext">
|
||||
Hypervisor: <strong id="hypervisor"></strong></div>
|
||||
Hypervisor: <select class="select" style="width:70px; float:none; height:15px; font-size:10px; margin:0 0 0 5px; display:inline;">
|
||||
<option value="op1">Hypervisor 1 </option>
|
||||
<option value="op1">Hypervisor 2</option>
|
||||
<option value="op1">Hypervisor 3</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rev_wiztemp_ownertext">
|
||||
[Submitted by: <span id="submitted_by"></span>]</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
<div class="rev_wiztemplistactions">
|
||||
<div class="rev_wiztemplist_actionsbox">
|
||||
|
|
@ -729,12 +734,15 @@
|
|||
<input type="radio" class="radio" value="custom" checked />
|
||||
<label class="label">
|
||||
Custom:</label>
|
||||
<label class="label1">
|
||||
Disk Size:</label>
|
||||
<input type="text" id="custom_disk_size" class="text" />
|
||||
<span>MB</span>
|
||||
<div id="custom_disk_size_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
<div class="vmpopup_offdescriptionbox_bot" style="background:none;">
|
||||
<label class="label1" style="margin-left:33px; display:inline;">
|
||||
Disk Size:</label>
|
||||
<input type="text" id="custom_disk_size" class="text" />
|
||||
<span>MB</span>
|
||||
|
||||
<div id="custom_disk_size_errormsg" class="errormsg" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vmpopup_offeringbox" id="vm_popup_disk_offering_template_existing" style="display: none">
|
||||
<input type="radio" class="radio" checked />
|
||||
|
|
|
|||
|
|
@ -535,11 +535,10 @@ function initVMWizard() {
|
|||
var commandString;
|
||||
var searchInput = $vmPopup.find("#search_input").val();
|
||||
if (selectedTemplateTypeInVmPopup != "blank") { //template
|
||||
var hypervisor = $vmPopup.find("#wizard_hypervisor").val();
|
||||
if (searchInput != null && searchInput.length > 0)
|
||||
commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&hypervisor="+hypervisor+"&keyword="+searchInput+"&page="+currentPageInTemplateGridInVmPopup;
|
||||
commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&keyword="+searchInput+"&page="+currentPageInTemplateGridInVmPopup;
|
||||
else
|
||||
commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&hypervisor="+hypervisor+"&page="+currentPageInTemplateGridInVmPopup;
|
||||
commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&page="+currentPageInTemplateGridInVmPopup;
|
||||
}
|
||||
else { //ISO
|
||||
if (searchInput != null && searchInput.length > 0)
|
||||
|
|
@ -671,13 +670,6 @@ function initVMWizard() {
|
|||
return false;
|
||||
});
|
||||
|
||||
$vmPopup.find("#wizard_hypervisor").bind("change", function(event) {
|
||||
var selectedHypervisor = $(this).val();
|
||||
if(selectedHypervisor != null && selectedHypervisor.length > 0)
|
||||
listTemplatesInVmPopup();
|
||||
return false;
|
||||
});
|
||||
|
||||
function displayDiskOffering(type) {
|
||||
if(type=="data") {
|
||||
$vmPopup.find("#wizard_data_disk_offering_title").show();
|
||||
|
|
@ -761,8 +753,9 @@ function initVMWizard() {
|
|||
$thisPopup.find("#root_disk_offering_container").hide();
|
||||
}
|
||||
|
||||
$thisPopup.find("#wizard_review_zone").text($thisPopup.find("#wizard_zone option:selected").text());
|
||||
$thisPopup.find("#wizard_review_hypervisor").text($thisPopup.find("#wizard_hypervisor option:selected").text());
|
||||
$thisPopup.find("#wizard_review_zone").text($thisPopup.find("#wizard_zone option:selected").text());
|
||||
// This is taking from the selected template but need to change this to the dropdown that supports ISO.
|
||||
$thisPopup.find("#wizard_review_hypervisor").text($selectedVmWizardTemplate.data("hypervisor"));
|
||||
$thisPopup.find("#wizard_review_template").text($thisPopup.find("#step1 .rev_wiztemplistbox_selected .rev_wiztemp_listtext").text());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue