Skip to content

Commit bf8c2ae

Browse files
committed
resolve conflict
2 parents 5451815 + 2081ac4 commit bf8c2ae

67 files changed

Lines changed: 1212 additions & 429 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/aw/imports/github/gh-aw/359795d49ada21681ab616bd4cbcb144a7387115/.github_workflows_shared_noop-reminder.md

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/aw/imports/github/gh-aw/94662b1dee8ce96c876ba9f33b3ab8be32de82a4/.github_workflows_shared_reporting.md

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/issue-triage-agent.lock.yml

Lines changed: 15 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/issue-triage-agent.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ permissions:
66
issues: read
77
imports:
88
- github/gh-aw/.github/workflows/shared/reporting.md@359795d49ada21681ab616bd4cbcb144a7387115
9+
- github/gh-aw/.github/workflows/shared/noop-reminder.md@359795d49ada21681ab616bd4cbcb144a7387115
910
safe-outputs:
1011
add-comment: {}
1112
add-labels:
@@ -88,5 +89,3 @@ This provides both per-issue context and batch visibility.
8889
- `question`: Used for issues that are asking for clarification or have questions about the project.
8990
- `help-wanted`: Indicates that the issue is a good candidate for external contributions and help
9091
- `good-first-issue`: Marks issues that are suitable for newcomers to the project, often with simpler scope.
91-
92-
{{#runtime-import shared/noop-reminder.md}}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ repos:
151151
^server/src/test/resources/certs/rsa_self_signed\.key$|
152152
^services/console-proxy/rdpconsole/src/test/doc/rdp-key\.pem$|
153153
^systemvm/agent/certs/localhost\.key$|
154-
^systemvm/agent/certs/realhostip\.key$|
154+
^systemvm/agent/certs/systemvm\.key$|
155155
^test/integration/smoke/test_ssl_offloading\.py$
156156
- id: end-of-file-fixer
157157
exclude: \.vhd$|\.svg$

api/src/main/java/com/cloud/host/Host.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ public static String[] toStrings(Host.Type... types) {
6363
String HOST_OVFTOOL_VERSION = "host.ovftool.version";
6464
String HOST_VIRTV2V_VERSION = "host.virtv2v.version";
6565
String HOST_SSH_PORT = "host.ssh.port";
66+
String GUEST_OS_CATEGORY_ID = "guest.os.category.id";
67+
String GUEST_OS_RULE = "guest.os.rule";
6668

6769
int DEFAULT_SSH_PORT = 22;
6870

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ public class ApiConstants {
449449
public static final String MAX_VGPU_PER_PHYSICAL_GPU = "maxvgpuperphysicalgpu";
450450
public static final String GUEST_OS_LIST = "guestoslist";
451451
public static final String GUEST_OS_COUNT = "guestoscount";
452+
public static final String GUEST_OS_RULE = "guestosrule";
452453
public static final String OS_MAPPING_CHECK_ENABLED = "osmappingcheckenabled";
453454
public static final String OUTOFBANDMANAGEMENT_POWERSTATE = "outofbandmanagementpowerstate";
454455
public static final String OUTOFBANDMANAGEMENT_ENABLED = "outofbandmanagementenabled";
@@ -602,6 +603,8 @@ public class ApiConstants {
602603
public static final String SUITABLE_FOR_VM = "suitableforvirtualmachine";
603604
public static final String SUPPORTS_STORAGE_SNAPSHOT = "supportsstoragesnapshot";
604605
public static final String TARGET_IQN = "targetiqn";
606+
public static final String TARIFF_ID = "tariffid";
607+
public static final String TARIFF_NAME = "tariffname";
605608
public static final String TASKS_FILTER = "tasksfilter";
606609
public static final String TEMPLATE_FILTER = "templatefilter";
607610
public static final String TEMPLATE_ID = "templateid";
@@ -663,6 +666,7 @@ public class ApiConstants {
663666
public static final String VIRTUAL_MACHINE_STATE = "vmstate";
664667
public static final String VIRTUAL_MACHINES = "virtualmachines";
665668
public static final String USAGE_ID = "usageid";
669+
public static final String USAGE_NAME = "usagename";
666670
public static final String USAGE_TYPE = "usagetype";
667671
public static final String INCLUDE_TAGS = "includetags";
668672

@@ -879,6 +883,7 @@ public class ApiConstants {
879883
public static final String IS_SOURCE_NAT = "issourcenat";
880884
public static final String IS_STATIC_NAT = "isstaticnat";
881885
public static final String ITERATIONS = "iterations";
886+
public static final String ITEMS = "items";
882887
public static final String SORT_BY = "sortby";
883888
public static final String CHANGE_CIDR = "changecidr";
884889
public static final String PURPOSE = "purpose";

api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,14 @@ public class UpdateHostCmd extends BaseCmd {
4949
@Parameter(name = ApiConstants.OS_CATEGORY_ID,
5050
type = CommandType.UUID,
5151
entityType = GuestOSCategoryResponse.class,
52-
description = "The ID of OS category to update the host with")
52+
description = "the ID of OS category used to prioritize VMs with matching OS category during the allocation process. " +
53+
"It cannot be used alongside the 'guestosrule' parameter.")
5354
private Long osCategoryId;
5455

56+
@Parameter(name = ApiConstants.GUEST_OS_RULE, type = CommandType.STRING, description = "the guest OS rule written in JavaScript to match with the OS of the VM." +
57+
"It cannot be used alongside the 'oscategoryid' parameter.")
58+
private String guestOsRule;
59+
5560
@Parameter(name = ApiConstants.ALLOCATION_STATE,
5661
type = CommandType.STRING,
5762
description = "Change resource state of host, valid values are [Enable, Disable]. Operation may failed if host in states not allowing Enable/Disable")
@@ -96,6 +101,10 @@ public Long getOsCategoryId() {
96101
return osCategoryId;
97102
}
98103

104+
public String getGuestOsRule() {
105+
return guestOsRule;
106+
}
107+
99108
public String getAllocationState() {
100109
return allocationState;
101110
}

api/src/main/java/org/apache/cloudstack/api/response/HostResponse.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ public class HostResponse extends BaseResponseWithAnnotations {
6363
@Param(description = "The OS category name of the host")
6464
private String osCategoryName;
6565

66+
@SerializedName(ApiConstants.GUEST_OS_RULE)
67+
@Param(description = "the guest OS rule")
68+
private String guestOsRule;
69+
6670
@SerializedName(ApiConstants.IP_ADDRESS)
6771
@Param(description = "The IP address of the host")
6872
private String ipAddress;
@@ -999,4 +1003,12 @@ public void setExtensionName(String extensionName) {
9991003
public String getExtensionName() {
10001004
return extensionName;
10011005
}
1006+
1007+
public String getGuestOsRule() {
1008+
return guestOsRule;
1009+
}
1010+
1011+
public void setGuestOsRule(String guestOsRule) {
1012+
this.guestOsRule = guestOsRule;
1013+
}
10021014
}

engine/schema/src/main/java/com/cloud/host/HostVO.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import com.cloud.cpu.CPU;
4646
import org.apache.cloudstack.util.CPUArchConverter;
4747
import org.apache.cloudstack.util.HypervisorTypeConverter;
48-
import org.apache.cloudstack.utils.jsinterpreter.TagAsRuleHelper;
48+
import org.apache.cloudstack.utils.jsinterpreter.GenericRuleHelper;
4949
import org.apache.cloudstack.utils.reflectiontostringbuilderutils.ReflectionToStringBuilderUtils;
5050
import org.apache.commons.collections.CollectionUtils;
5151
import org.apache.commons.lang.BooleanUtils;
@@ -856,7 +856,8 @@ public boolean checkHostServiceOfferingTags(ServiceOffering serviceOffering) {
856856
}
857857

858858
if (BooleanUtils.isTrue(this.getIsTagARule())) {
859-
return TagAsRuleHelper.interpretTagAsRule(this.getHostTags().get(0), serviceOffering.getHostTag(), HostTagsDao.hostTagRuleExecutionTimeout.value());
859+
return GenericRuleHelper.interpretTagAsRule(this.getHostTags().get(0), serviceOffering.getHostTag(), HostTagsDao.hostTagRuleExecutionTimeout.value(),
860+
HostTagsDao.hostTagRuleExecutionTimeout.key());
860861
}
861862

862863
if (StringUtils.isEmpty(serviceOffering.getHostTag())) {

0 commit comments

Comments
 (0)