You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "dheeraj12347 (via GitHub)" <gi...@apache.org> on 2026/08/16 18:11:27 UTC

[PR] Refactor API allowedValues to derive values from enums [cloudstack]

dheeraj12347 opened a new pull request, #13895:
URL: https://github.com/apache/cloudstack/pull/13895

   ## Description
   
   Refactor API parameter `allowedValues` discovery to support enum-backed values.
   
   Previously, enum values were specified directly as hard-coded strings in API parameter annotations. This can result in duplicated sources of truth when the corresponding enum changes.
   
   This change introduces `allowedValueType` to `@Parameter`. When an enum type is provided, API discovery derives the allowed values directly from the enum constants.
   
   The existing explicit `allowedValues` mechanism is retained for parameters that do not have a corresponding enum.
   
   The change also expands enum-backed allowed-values coverage across existing API parameters.
   
   ## Changes
   
   - Add `allowedValueType` to `@Parameter`.
   - Derive allowed values from enum constants in `ApiDiscoveryServiceImpl`.
   - Retain explicit `allowedValues` support as a fallback.
   - Refactor existing hard-coded enum values to use their corresponding enums.
   - Add unit-test coverage for enum-based allowed-value discovery.
   
   ## Validation
   
   - `mvn -pl plugins/api/discovery -am -DskipTests compile`
   - `mvn -pl plugins/api/discovery -Dtest=ApiDiscoveryServiceImplTest -DfailIfNoTests=false test`
   - `git diff --check`
   - Checkstyle: 0 violations
   
   API Discovery tests: 8/8 passed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-6035528215

   @dheeraj12347 that covers it, thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r3831747274


##########
api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java:
##########
@@ -111,6 +111,7 @@ public class ListNetworksCmd extends BaseListRetrieveOnlyResourceCountCmd implem
 
     @Parameter(name = ApiConstants.NETWORK_FILTER,
             type = CommandType.STRING,
+            allowedValues = {"account", "domain", "accountdomain", "shared", "all"},

Review Comment:
   there's an enum - Network.NetworkFilter



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r3974961087


##########
scripts/check_allowed_values.py:
##########
@@ -0,0 +1,293 @@
+#!/usr/bin/env python3
+
+import re
+import sys
+from pathlib import Path
+
+
+ROOT = Path(__file__).resolve().parent.parent
+
+
+def find_java_files():
+    return ROOT.glob("**/*.java")
+
+
+def extract_parameter_blocks(source):
+    blocks = []
+    start = 0
+
+    while True:
+        match = source.find("@Parameter(", start)
+        if match == -1:
+            break
+
+        depth = 0
+        in_string = False
+        escape = False
+        end = None
+
+        for i in range(match, len(source)):
+            char = source[i]
+
+            if in_string:
+                if escape:
+                    escape = False
+                elif char == "\\":
+                    escape = True
+                elif char == '"':
+                    in_string = False
+                continue
+
+            if char == '"':
+                in_string = True
+            elif char == "(":
+                depth += 1
+            elif char == ")":
+                depth -= 1
+                if depth == 0:
+                    end = i + 1
+                    break
+
+        if end is None:
+            break
+
+        blocks.append((match, source[match:end]))
+        start = end
+
+    return blocks
+
+
+def is_string_parameter(block):
+    return bool(
+        re.search(
+            r"\btype\s*=\s*CommandType\.STRING\b",
+            block,
+        )
+    )
+
+
+def extract_description(block):
+    match = re.search(
+        r"\bdescription\s*=\s*((?:\"(?:\\.|[^\"\\])*\")"
+        r"(?:\s*\+\s*\"(?:\\.|[^\"\\])*\")*)",
+        block,
+        re.DOTALL,
+    )
+
+    if not match:
+        return ""
+
+    expression = match.group(1)
+
+    strings = re.findall(
+        r'"((?:\\.|[^"\\])*)"',
+        expression,
+        re.DOTALL,
+    )
+
+    return "".join(strings)
+
+
+def extract_valid_values(description):
+    patterns = [
+        r"\bvalid\s+values?\s*(?:are|:)\s*(.+?)(?:\.|$)",
+        r"\bvalid\s+options?\s*(?:are|:)\s*(.+?)(?:\.|$)",
+        r"\bpossible\s+values?\s*(?:are|:|include)\s*(.+?)(?:\.|$)",
+        r"\bpossible\s+options?\s*(?:are|:|include)\s*(.+?)(?:\.|$)",
+        r"\ballowed\s+values?\s*(?:are|:)\s*(.+?)(?:\.|$)",
+    ]
+
+    match = None
+
+    for pattern in patterns:
+        match = re.search(pattern, description, re.IGNORECASE)
+        if match:
+            break
+
+    if not match:
+        return []
+
+    values_text = match.group(1).strip()
+
+    # Some descriptions contain a fixed set of examples but also
+    # explicitly allow additional values. These are not closed enums
+    # and therefore should not require an allowedValues annotation.
+    if re.search(r"\bor\s+valid\s+protocol\s+number\b", values_text, re.IGNORECASE):
+        return []
+
+    # Remove a leading colon if the wording leaves one behind.
+    values_text = values_text.lstrip(":").strip()
+
+    # Convert "A, B, and C" into "A, B, C".
+    values_text = re.sub(
+        r",?\s+and\s+",
+        ", ",
+        values_text,
+        flags=re.IGNORECASE,
+    )
+
+    values = [
+        value.strip().strip('"').strip("'")
+        for value in values_text.split(",")
+    ]
+
+    return [value for value in values if value]
+
+
+def extract_parameter_name(block):
+    match = re.search(
+        r"\bname\s*=\s*(?:ApiConstants\.([A-Z0-9_]+)|\"([^\"]+)\")",
+        block,
+    )
+
+    if not match:
+        return "<unknown>"
+
+    if match.group(1):
+        return f"ApiConstants.{match.group(1)}"
+
+    return match.group(2)
+
+def extract_inner_enums(source):
+    enums = {}
+
+    pattern = re.compile(
+        r"\benum\s+([A-Za-z_][A-Za-z0-9_]*)\s*\{([^}]*)\}",
+        re.DOTALL,
+    )
+
+    for match in pattern.finditer(source):
+        enum_name = match.group(1)
+        body = match.group(2)
+
+        constants = []
+
+        for constant in body.split(","):
+            constant = constant.strip()
+
+            constant_match = re.match(
+                r"([A-Z][A-Z0-9_]*)\b",
+                constant,
+            )
+
+            if constant_match:
+                constants.append(constant_match.group(1))
+
+        if constants:
+            enums[enum_name] = constants
+
+    return enums
+
+
+def extract_parameter_field_name(source, parameter_end):
+    match = re.match(
+        r"\s*private\s+String\s+([A-Za-z_][A-Za-z0-9_]*)\s*;",
+        source[parameter_end:],
+    )
+
+    if not match:
+        return None
+
+    return match.group(1)
+
+
+def find_enum_for_parameter(source, parameter_end, field_name):
+    if not field_name:
+        return None
+
+    enum_pattern = re.compile(
+        rf"\benum\s+{re.escape(field_name.capitalize())}Values\b"
+        r"\s*\{",
+    )
+
+    if enum_pattern.search(source):
+        return field_name.capitalize() + "Values"
+
+    return None
+
+def check_file(path):
+    source = Path(path).read_text(encoding="utf-8")
+    violations = []
+
+    enums = extract_inner_enums(source)
+
+    for start, block in extract_parameter_blocks(source):
+        if not is_string_parameter(block):
+            continue
+
+        if re.search(r"\ballowedValues\s*=", block):
+            continue
+
+        if re.search(r"\ballowedValueType\s*=", block):

Review Comment:
   this early return means the check cant catch a wrong list, only a missing one. it never compares the annotation against the values in the `description`.
   
   `listTemplates.arch` passes clean today even though the two disagree. if i drop the `allowedValueType` off it, the script prints exactly the values the enum fails to produce:
   
   ```
   $ python3 scripts/check_allowed_values.py
   api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java:116:
     parameter 'ApiConstants.ARCH' specifies valid values ['x86_64', 'aarch64', 's390x']
     but has no allowedValues annotation
   ```
   
   so it already knows the right answer and throws it away.
   
   can we make it compare instead of skip, when a `description` has a valid values list? that would have caught the `arch` thing in ci.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5317883352

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5611824993

   one unrelated thing i hit while testing this, `TemplateManagerImpl:2449` has the join args backwards so an invalid templatetype prints the array object:
   
   ```
   $ cmk register template ... templatetype=BOGUS
   Error: (HTTP 431, error code 4350) Please specify a valid templatetype: ,[Lcom.cloud.storage.Storage$TemplateType;@d54b45e
   ```
   
   `StringUtils.join(",", TemplateType.values())` should be `StringUtils.join(TemplateType.values(), ",")`.
   
   not yours, but its the same area. want to pick it up here or leave it?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5490661539

   @DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r3843796574


##########
plugins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java:
##########
@@ -236,10 +237,34 @@ protected ApiDiscoveryResponse getCmdRequestMap(Class<?> cmdClass, APICommand ap
                     paramResponse.setSince(parameterAnnotation.since());
                 }
                 paramResponse.setRelated(parameterAnnotation.entityType()[0].getName());
-                if (parameterAnnotation.authorized() != null) {
-                    paramResponse.setAuthorizedRoleTypes(Arrays.asList(parameterAnnotation.authorized()));
+
+                Class<? extends Enum> allowedValueType = parameterAnnotation.allowedValueType();
+
+                if (allowedValueType != Enum.class) {
+                    Enum<?>[] enumConstants = allowedValueType.getEnumConstants();
+                    if (enumConstants != null) {
+                        List<String> allowedValues = Arrays.stream(enumConstants)
+                                .map(Enum::toString)
+                                .collect(Collectors.toList());
+
+                        paramResponse.setAllowedValues(
+                                Collections.unmodifiableList(allowedValues)
+                        );
+                    }
+                } else {
+                    String[] allowedValues = parameterAnnotation.allowedValues();
+                    if (allowedValues != null && allowedValues.length > 0) {
+                        paramResponse.setAllowedValues(
+                                Collections.unmodifiableList(Arrays.asList(allowedValues))
+                        );
+                    }
                 }
-                response.addParam(paramResponse);
+
+                    if (parameterAnnotation.authorized() != null) {
+                        paramResponse.setAuthorizedRoleTypes(Arrays.asList(parameterAnnotation.authorized()));
+                    }
+
+                    response.addParam(paramResponse);

Review Comment:
   nit: fix indentation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5318244068

   @dheeraj12347 :
   ```
   18:57:12 [ERROR] /jenkins/workspace/acs-centos8-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.23.0.0-SNAPSHOT/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java:[52,35] error: package DateUtil does not exist
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5414764541

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5490643681

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5424455577

   @borisstoyanov this is interesting for the next cloudmonkey release!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5414792967

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  no SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r3974923862


##########
api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java:
##########
@@ -111,9 +113,11 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd implements User
             since = "4.21.0")
     private Boolean forCks;
 
-    @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
-            description = "the CPU arch of the template. Valid options are: x86_64, aarch64, s390x",
-            since = "4.20")
+    @Parameter(name = ApiConstants.ARCH,
+           type = CommandType.STRING,
+           description = "the CPU arch of the template. Valid options are: x86_64, aarch64, s390x",
+           since = "4.20",
+           allowedValueType = CPU.CPUArch.class)

Review Comment:
   tested on a lab, 3 of the 4 values here get rejected. `CPUArch` has no `toString()` so we publish the constant names, but the api parses with `fromType()` which matches the `type` field.
   
   ```
   $ cmk list templates templatefilter=all listall=true arch=amd64
   Error: (HTTP 431, error code 9999) Unsupported arch type: amd64
   
   $ cmk list templates templatefilter=all listall=true arch=arm64
   Error: (HTTP 431, error code 9999) Unsupported arch type: arm64
   
   $ cmk list templates templatefilter=all listall=true arch=x86
   Error: (HTTP 431, error code 9999) Unsupported arch type: x86
   
   $ cmk list templates templatefilter=all listall=true arch=x86_64
     "count": 2
   ```
   
   ```
   listApis says   x86, amd64, arm64, s390x
   api accepts     i686, x86_64, aarch64, s390x
   ```
   
   the `description` on this same annotation already says `x86_64, aarch64, s390x`.
   
   same on `ListIsosCmd:95`, and it flows through to `listVnfTemplates`.
   
   can we add a `toString()` on `CPUArch` returning `type`? `ProvisioningType` only works because it overrides `toString()`.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-6035528462

   can we get the allowed-values check green? it fails on this prs own params, templatetype, networkmode and snapshottype get reported as missing even though they have the annotation


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5502482776

   <b>[SF] Trillian test result (tid-16860)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 56360 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13895-t16860-kvm-ol8.zip
   Smoke tests completed. 156 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5415340021

   Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18982


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "dheeraj12347 (via GitHub)" <gi...@apache.org>.
dheeraj12347 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5652270018

   Hi @Damans227 , @Pearl1594 
   
   Thanks for the review and for testing this.
   
   I’ve addressed the issues raised in the review:
   
   - Added `CPUArch.toString()` to return the `type` value, so API discovery now exposes the same values that the API accepts. I also updated the affected `ListTemplatesCmd` and `ListIsosCmd` descriptions to include `i686`.
   - Added `TemplateApiType` validation in `TemplateManagerImpl` before mapping to `Storage.TemplateType`, so values such as `PERHOST`, `DATADISK`, and `ISODISK` that are not advertised by the API are rejected.
   - Updated `check_allowed_values.py` so that when `allowedValueType` can be resolved, it compares the enum-derived values against the valid values listed in the parameter description instead of skipping the check. Added regression coverage for the `CPUArch` mismatch case.
   - Left the unrelated `StringUtils.join()` issue out of this PR as it is outside the scope of this change.
   
   Validation completed:
   - `python3 -m unittest scripts/test_check_allowed_values.py` — 14/14 passed
   - `mvn -pl server -am -Dtest=TemplateManagerImplTest -DfailIfNoTests=false test` — 35/35 passed
   - `git diff --check` — clean
   - Checkstyle — 0 violations
   
   The changes have been pushed in commit `fba666fab2`. Please take another look when the CI checks complete.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "dheeraj12347 (via GitHub)" <gi...@apache.org>.
dheeraj12347 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-6109286850

   Hi @Damans227 , I've pushed commit `7e147f1` to address the allowed-values checker issue. The checker now reports no missing annotations locally, and all 15 Python unit tests pass.
   
   Could you please take another look when the checks are available? Thanks for the feedback.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r3831767237


##########
api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java:
##########
@@ -39,7 +39,9 @@ public class UpdateTemplateCmd extends BaseUpdateTemplateOrIsoCmd implements Use
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name = ApiConstants.TEMPLATE_TYPE, type = CommandType.STRING,
+    @Parameter(name = ApiConstants.TEMPLATE_TYPE,
+            type = CommandType.STRING,
+            allowedValues = {"USER", "VNF", "SYSTEM", "ROUTING", "BUILTIN"},

Review Comment:
   I'd probably create an enum - as these are repeated at multiple places.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r4181748172


##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -2447,7 +2447,7 @@ public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, boolean i
                 templateType = TemplateType.valueOf(newType.toUpperCase());
             } catch (IllegalArgumentException ex) {
                 throw new InvalidParameterValueException(String.format("Please specify a valid templatetype: %s",
-                    org.apache.commons.lang3.StringUtils.join(",", TemplateApiType.values())));
+                    org.apache.commons.lang3.StringUtils.join(TemplateApiType.values(), ",")));

Review Comment:
   ```suggestion
                     StringUtils.join(TemplateApiType.values(), ",")));
   ```
   
   com.cloud.utils.StringUtils inherits this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r4158485829


##########
api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java:
##########
@@ -111,9 +113,11 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd implements User
             since = "4.21.0")
     private Boolean forCks;
 
-    @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
-            description = "the CPU arch of the template. Valid options are: x86_64, aarch64, s390x",
-            since = "4.20")
+    @Parameter(name = ApiConstants.ARCH,
+           type = CommandType.STRING,
+           description = "the CPU arch of the template. Valid options are: x86_64, aarch64, s390x",
+           since = "4.20",
+           allowedValueType = CPU.CPUArch.class)

Review Comment:
   ok that covers it, thanks



##########
api/src/main/java/com/cloud/template/TemplateApiType.java:
##########
@@ -0,0 +1,26 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package com.cloud.template;
+
+public enum TemplateApiType {

Review Comment:
   got it, thanks



##########
scripts/check_allowed_values.py:
##########
@@ -0,0 +1,293 @@
+#!/usr/bin/env python3
+
+import re
+import sys
+from pathlib import Path
+
+
+ROOT = Path(__file__).resolve().parent.parent
+
+
+def find_java_files():
+    return ROOT.glob("**/*.java")
+
+
+def extract_parameter_blocks(source):
+    blocks = []
+    start = 0
+
+    while True:
+        match = source.find("@Parameter(", start)
+        if match == -1:
+            break
+
+        depth = 0
+        in_string = False
+        escape = False
+        end = None
+
+        for i in range(match, len(source)):
+            char = source[i]
+
+            if in_string:
+                if escape:
+                    escape = False
+                elif char == "\\":
+                    escape = True
+                elif char == '"':
+                    in_string = False
+                continue
+
+            if char == '"':
+                in_string = True
+            elif char == "(":
+                depth += 1
+            elif char == ")":
+                depth -= 1
+                if depth == 0:
+                    end = i + 1
+                    break
+
+        if end is None:
+            break
+
+        blocks.append((match, source[match:end]))
+        start = end
+
+    return blocks
+
+
+def is_string_parameter(block):
+    return bool(
+        re.search(
+            r"\btype\s*=\s*CommandType\.STRING\b",
+            block,
+        )
+    )
+
+
+def extract_description(block):
+    match = re.search(
+        r"\bdescription\s*=\s*((?:\"(?:\\.|[^\"\\])*\")"
+        r"(?:\s*\+\s*\"(?:\\.|[^\"\\])*\")*)",
+        block,
+        re.DOTALL,
+    )
+
+    if not match:
+        return ""
+
+    expression = match.group(1)
+
+    strings = re.findall(
+        r'"((?:\\.|[^"\\])*)"',
+        expression,
+        re.DOTALL,
+    )
+
+    return "".join(strings)
+
+
+def extract_valid_values(description):
+    patterns = [
+        r"\bvalid\s+values?\s*(?:are|:)\s*(.+?)(?:\.|$)",
+        r"\bvalid\s+options?\s*(?:are|:)\s*(.+?)(?:\.|$)",
+        r"\bpossible\s+values?\s*(?:are|:|include)\s*(.+?)(?:\.|$)",
+        r"\bpossible\s+options?\s*(?:are|:|include)\s*(.+?)(?:\.|$)",
+        r"\ballowed\s+values?\s*(?:are|:)\s*(.+?)(?:\.|$)",
+    ]
+
+    match = None
+
+    for pattern in patterns:
+        match = re.search(pattern, description, re.IGNORECASE)
+        if match:
+            break
+
+    if not match:
+        return []
+
+    values_text = match.group(1).strip()
+
+    # Some descriptions contain a fixed set of examples but also
+    # explicitly allow additional values. These are not closed enums
+    # and therefore should not require an allowedValues annotation.
+    if re.search(r"\bor\s+valid\s+protocol\s+number\b", values_text, re.IGNORECASE):
+        return []
+
+    # Remove a leading colon if the wording leaves one behind.
+    values_text = values_text.lstrip(":").strip()
+
+    # Convert "A, B, and C" into "A, B, C".
+    values_text = re.sub(
+        r",?\s+and\s+",
+        ", ",
+        values_text,
+        flags=re.IGNORECASE,
+    )
+
+    values = [
+        value.strip().strip('"').strip("'")
+        for value in values_text.split(",")
+    ]
+
+    return [value for value in values if value]
+
+
+def extract_parameter_name(block):
+    match = re.search(
+        r"\bname\s*=\s*(?:ApiConstants\.([A-Z0-9_]+)|\"([^\"]+)\")",
+        block,
+    )
+
+    if not match:
+        return "<unknown>"
+
+    if match.group(1):
+        return f"ApiConstants.{match.group(1)}"
+
+    return match.group(2)
+
+def extract_inner_enums(source):
+    enums = {}
+
+    pattern = re.compile(
+        r"\benum\s+([A-Za-z_][A-Za-z0-9_]*)\s*\{([^}]*)\}",
+        re.DOTALL,
+    )
+
+    for match in pattern.finditer(source):
+        enum_name = match.group(1)
+        body = match.group(2)
+
+        constants = []
+
+        for constant in body.split(","):
+            constant = constant.strip()
+
+            constant_match = re.match(
+                r"([A-Z][A-Z0-9_]*)\b",
+                constant,
+            )
+
+            if constant_match:
+                constants.append(constant_match.group(1))
+
+        if constants:
+            enums[enum_name] = constants
+
+    return enums
+
+
+def extract_parameter_field_name(source, parameter_end):
+    match = re.match(
+        r"\s*private\s+String\s+([A-Za-z_][A-Za-z0-9_]*)\s*;",
+        source[parameter_end:],
+    )
+
+    if not match:
+        return None
+
+    return match.group(1)
+
+
+def find_enum_for_parameter(source, parameter_end, field_name):
+    if not field_name:
+        return None
+
+    enum_pattern = re.compile(
+        rf"\benum\s+{re.escape(field_name.capitalize())}Values\b"
+        r"\s*\{",
+    )
+
+    if enum_pattern.search(source):
+        return field_name.capitalize() + "Values"
+
+    return None
+
+def check_file(path):
+    source = Path(path).read_text(encoding="utf-8")
+    violations = []
+
+    enums = extract_inner_enums(source)
+
+    for start, block in extract_parameter_blocks(source):
+        if not is_string_parameter(block):
+            continue
+
+        if re.search(r"\ballowedValues\s*=", block):
+            continue
+
+        if re.search(r"\ballowedValueType\s*=", block):

Review Comment:
   ok that covers it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "dheeraj12347 (via GitHub)" <gi...@apache.org>.
dheeraj12347 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5968405634

   Thanks @Damans227, fixed the argument order in StringUtils.join() as suggested. TemplateApiType.values() is now passed as the first argument and "," as the separator, so the valid values are formatted correctly instead of printing the array object.
   I also verified that git diff --check passes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5317954009

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13895?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 3.41%. Comparing base ([`a4a52c9`](https://app.codecov.io/gh/apache/cloudstack/commit/a4a52c96659d9f94fd080096aa673916ae221ef2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`37d4a44`](https://app.codecov.io/gh/apache/cloudstack/commit/37d4a4417a0d0c4234fe2e83052a073b1b32b086?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 199 commits behind head on main.
   > :exclamation:  There is a different number of reports uploaded between BASE (a4a52c9) and HEAD (37d4a44). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (a4a52c9) | HEAD (37d4a44) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               main   #13895       +/-   ##
   =============================================
   - Coverage     18.08%    3.41%   -14.68%     
   =============================================
     Files          6037      487     -5550     
     Lines        542580    41867   -500713     
     Branches      66428     7912    -58516     
   =============================================
   - Hits          98149     1429    -96720     
   + Misses       433409    40238   -393171     
   + Partials      11022      200    -10822     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13895/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/13895/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.41% <ø> (-0.11%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/13895/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cloudstack/pull/13895?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5317902832

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  no SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "dheeraj12347 (via GitHub)" <gi...@apache.org>.
dheeraj12347 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5308969605

   Hi @Pearl1594 and @soreana , I’ve opened PR #13895 with the updated allowedValues implementation.
   
   I incorporated the work from #13783 into this branch and addressed the hard-coded enum concern by adding allowedValueType to @Parameter and deriving the values from the enum constants during API discovery. I’ve also retained the existing explicit allowedValues path for parameters where there is no corresponding enum, and added test coverage for both paths.
   
   I’ve verified the implementation with the API Discovery build, the API Discovery tests (8/8 passing), git diff --check, and checkstyle.
   
   Regarding your earlier request to merge #13783 into #13543: since the #13783 work is now incorporated into #13895, should I still merge #13783 explicitly into #13543, or is #13895 intended to supersede that merge?
   
   I also want to confirm whether you’d like me to do any further audit of the remaining explicit allowedValues entries where a corresponding enum may exist, before considering this complete.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5317972335

   Packaging result [SF]: ✖️ el8 ✖️ el9  ✖️ debian ✖️ suse15. SL-JID 18890


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5424449407

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r3974957363


##########
api/src/main/java/com/cloud/template/TemplateApiType.java:
##########
@@ -0,0 +1,26 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package com.cloud.template;
+
+public enum TemplateApiType {

Review Comment:
   this lists 5 but the api still validates against `Storage.TemplateType` which has 8. `TemplateManagerImpl:2446` does `TemplateType.valueOf(newType.toUpperCase())`.
   
   so the 3 we dont advertise still go through:
   
   ```
   $ cmk register template name=av-tt-PERHOST ... templatetype=PERHOST
         "templatetype": "PERHOST",
   $ cmk register template name=av-tt-DATADISK ... templatetype=DATADISK
         "templatetype": "DATADISK",
   $ cmk register template name=av-tt-ISODISK ... templatetype=ISODISK
         "templatetype": "ISODISK",
   ```
   
   listed them back after, all 3 registered fine.
   
   hiding PERHOST/DATADISK/ISODISK from users makes sense. but this pr is about removing duplicate lists and now we have a second one that doesnt match what the code checks.
   
   should the api validate against `TemplateApiType` too? or drop the new enum and point at `Storage.TemplateType`?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Pearl1594 (via GitHub)" <gi...@apache.org>.
Pearl1594 commented on code in PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#discussion_r3831735737


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java:
##########
@@ -92,10 +92,15 @@ public class CreateVPCOfferingCmd extends BaseAsyncCreateCmd {
     @Parameter(name = ApiConstants.SERVICE_CAPABILITY_LIST, type = CommandType.MAP, description = "Desired service capabilities as part of VPC offering", since = "4.4")
     private Map<String, List<String>> serviceCapabilityList;
 
-    @Parameter(name = ApiConstants.INTERNET_PROTOCOL,
-            type = CommandType.STRING,
-            description = "The internet protocol of the offering. Options are IPv4 and dualstack. Default is IPv4. dualstack will create an offering that supports both IPv4 and IPv6",
-            since = "4.17.0")
+    @Parameter(
+        name = ApiConstants.INTERNET_PROTOCOL,
+        type = CommandType.STRING,
+        description = "The internet protocol of the offering. Options are IPv4 and dualstack. Default is IPv4. dualstack will create an offering that supports both IPv4 and IPv6",
+        since = "4.17.0",
+        allowedValues = {
+                "IPv4",
+                "DualStack"
+        })

Review Comment:
   examples where using hardcoded values can be an issue - here, ipv6 is missing. There's an enum - NetUtils.InternetProtocol



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-5936942240

   fair enough, but that line got edited here anyway so can we swap the two args while youre there? it still prints the array object


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor API allowedValues to derive values from enums [cloudstack]

Posted by "Damans227 (via GitHub)" <gi...@apache.org>.
Damans227 commented on PR #13895:
URL: https://github.com/apache/cloudstack/pull/13895#issuecomment-6109542345

   thanks @dheeraj12347, the check passes for me too now..


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org