From 10a386f27b4133067bc99eba576cc9075b1ba41b Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 18 Aug 2025 09:30:13 -0400 Subject: [PATCH 1/7] Add UUID field for LDAP configuration --- .../resources/META-INF/db/schema-42010to42100.sql | 7 +++++++ .../api/response/LdapConfigurationResponse.java | 15 ++++++++++++++- .../cloudstack/ldap/LdapConfigurationVO.java | 11 +++++++++++ .../apache/cloudstack/ldap/LdapManagerImpl.java | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql b/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql index 167dd92730cc..206e2080024d 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql @@ -757,3 +757,10 @@ SET `cs`.`domain_id` = ( -- Re-apply VPC: update default network offering for vpc tier to conserve_mode=1 (#8309) UPDATE `cloud`.`network_offerings` SET conserve_mode = 1 WHERE name = 'DefaultIsolatedNetworkOfferingForVpcNetworks'; + +-- Move to 4.22 +-- Add uuid column to ldap_configuration table +CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.ldap_configuration', 'uuid', 'VARCHAR(40) NOT NULL'); + +-- Populate uuid for existing rows where uuid is NULL or empty +UPDATE `cloud`.`ldap_configuration` SET uuid = UUID() WHERE uuid IS NULL OR uuid = ''; diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java index 744c73d8e774..7fe068fb549d 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java @@ -27,6 +27,10 @@ @EntityReference(value = LdapConfiguration.class) public class LdapConfigurationResponse extends BaseResponse { + @SerializedName("id") + @Param(description = "the ID of the LDAP configuration") + private String id; + @SerializedName(ApiConstants.HOST_NAME) @Param(description = "name of the host running the ldap server") private String hostname; @@ -53,9 +57,18 @@ public LdapConfigurationResponse(final String hostname, final int port) { setPort(port); } - public LdapConfigurationResponse(final String hostname, final int port, final String domainId) { + public LdapConfigurationResponse(final String hostname, final int port, final String domainId, final String id) { this(hostname, port); setDomainId(domainId); + setId(id); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; } public String getHostname() { diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapConfigurationVO.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapConfigurationVO.java index ee9f0930c47f..9381297c21f4 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapConfigurationVO.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapConfigurationVO.java @@ -25,6 +25,8 @@ import org.apache.cloudstack.api.InternalIdentity; +import java.util.UUID; + @Entity @Table(name = "ldap_configuration") public class LdapConfigurationVO implements InternalIdentity { @@ -36,6 +38,9 @@ public class LdapConfigurationVO implements InternalIdentity { @Column(name = "id") private Long id; + @Column(name = "uuid") + private String uuid; + @Column(name = "port") private int port; @@ -43,12 +48,14 @@ public class LdapConfigurationVO implements InternalIdentity { private Long domainId; public LdapConfigurationVO() { + this.uuid = UUID.randomUUID().toString(); } public LdapConfigurationVO(final String hostname, final int port, final Long domainId) { this.hostname = hostname; this.port = port; this.domainId = domainId; + this.uuid = UUID.randomUUID().toString(); } public String getHostname() { @@ -60,6 +67,10 @@ public long getId() { return id; } + public String getUuid() { + return uuid; + } + public int getPort() { return port; } diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java index 05b8578bb420..b51907f005ff 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java @@ -240,7 +240,7 @@ public LdapConfigurationResponse createLdapConfigurationResponse(final LdapConfi domainUuid = domain.getUuid(); } } - return new LdapConfigurationResponse(configuration.getHostname(), configuration.getPort(), domainUuid); + return new LdapConfigurationResponse(configuration.getHostname(), configuration.getPort(), domainUuid, configuration.getUuid()); } @Override From 5d043c3a2b5ead0d61e18ea55284e175298f4e69 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 15 Sep 2025 08:09:01 -0400 Subject: [PATCH 2/7] move db changes to the lastest schema file --- .../src/main/resources/META-INF/db/schema-42010to42100.sql | 7 ------- .../src/main/resources/META-INF/db/schema-42100to42200.sql | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql b/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql index 206e2080024d..167dd92730cc 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql @@ -757,10 +757,3 @@ SET `cs`.`domain_id` = ( -- Re-apply VPC: update default network offering for vpc tier to conserve_mode=1 (#8309) UPDATE `cloud`.`network_offerings` SET conserve_mode = 1 WHERE name = 'DefaultIsolatedNetworkOfferingForVpcNetworks'; - --- Move to 4.22 --- Add uuid column to ldap_configuration table -CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.ldap_configuration', 'uuid', 'VARCHAR(40) NOT NULL'); - --- Populate uuid for existing rows where uuid is NULL or empty -UPDATE `cloud`.`ldap_configuration` SET uuid = UUID() WHERE uuid IS NULL OR uuid = ''; diff --git a/engine/schema/src/main/resources/META-INF/db/schema-42100to42200.sql b/engine/schema/src/main/resources/META-INF/db/schema-42100to42200.sql index cf3fe2ed7726..7bc1e569b8d5 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-42100to42200.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-42100to42200.sql @@ -21,3 +21,9 @@ -- Increase length of scripts_version column to 128 due to md5sum to sha512sum change CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('cloud.domain_router', 'scripts_version', 'scripts_version', 'VARCHAR(128)'); + +-- Add uuid column to ldap_configuration table +CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.ldap_configuration', 'uuid', 'VARCHAR(40) NOT NULL'); + +-- Populate uuid for existing rows where uuid is NULL or empty +UPDATE `cloud`.`ldap_configuration` SET uuid = UUID() WHERE uuid IS NULL OR uuid = ''; From 5558fe0e234391b7bea3dc396e66b66417fdd134 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 29 Sep 2025 21:54:36 -0400 Subject: [PATCH 3/7] Add ID param to list ldapConf API & delete ldapConf API --- .../command/LdapDeleteConfigurationCmd.java | 8 +++++++- .../api/command/LdapListConfigurationCmd.java | 7 +++++++ .../response/LdapConfigurationResponse.java | 4 ++-- .../cloudstack/ldap/LdapConfigurationVO.java | 9 +++++---- .../cloudstack/ldap/LdapManagerImpl.java | 17 ++++++++++++++++- .../ldap/dao/LdapConfigurationDao.java | 2 +- .../ldap/dao/LdapConfigurationDaoImpl.java | 19 ++++++++++++------- ui/src/config/section/config.js | 2 +- ui/src/views/AutogenView.vue | 5 ----- 9 files changed, 51 insertions(+), 22 deletions(-) diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapDeleteConfigurationCmd.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapDeleteConfigurationCmd.java index 15e6c836d0db..0ce7daff432b 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapDeleteConfigurationCmd.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapDeleteConfigurationCmd.java @@ -40,8 +40,10 @@ public class LdapDeleteConfigurationCmd extends BaseCmd { @Inject private LdapManager _ldapManager; + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, required = false, entityType = LdapConfigurationResponse.class, description = "ID of the LDAP configuration") + private Long id; - @Parameter(name = ApiConstants.HOST_NAME, type = CommandType.STRING, required = true, description = "Hostname") + @Parameter(name = ApiConstants.HOST_NAME, type = CommandType.STRING, description = "Hostname") private String hostname; @Parameter(name = ApiConstants.PORT, type = CommandType.INTEGER, required = false, description = "port") @@ -71,6 +73,10 @@ public Long getDomainId() { return domainId; } + public Long getId() { + return id; + } + @Override public void execute() throws ServerApiException { try { diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListConfigurationCmd.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListConfigurationCmd.java index c34d026f89b2..ba0fa0d6bd87 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListConfigurationCmd.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListConfigurationCmd.java @@ -53,6 +53,9 @@ public class LdapListConfigurationCmd extends BaseListCmd { @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, required = false, entityType = DomainResponse.class, description = "linked domain") private Long domainId; + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LdapConfigurationResponse.class, description = "list ldap configuration by ID") + private Long id; + @Parameter(name = ApiConstants.LIST_ALL, type = CommandType.BOOLEAN, description = "If set to true, " + " and no domainid specified, list all LDAP configurations irrespective of the linked domain", since = "4.13.2") private Boolean listAll; @@ -120,6 +123,10 @@ public void setDomainId(final Long domainId) { this.domainId = domainId; } + public Long getId() { + return id; + } + public boolean listAll() { return listAll != null && listAll; } diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java index 7fe068fb549d..4c24b366bb0d 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/response/LdapConfigurationResponse.java @@ -23,9 +23,9 @@ import com.cloud.serializer.Param; import org.apache.cloudstack.api.EntityReference; -import org.apache.cloudstack.ldap.LdapConfiguration; +import org.apache.cloudstack.ldap.LdapConfigurationVO; -@EntityReference(value = LdapConfiguration.class) +@EntityReference(value = LdapConfigurationVO.class) public class LdapConfigurationResponse extends BaseResponse { @SerializedName("id") @Param(description = "the ID of the LDAP configuration") diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapConfigurationVO.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapConfigurationVO.java index 9381297c21f4..7e51fe352d96 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapConfigurationVO.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapConfigurationVO.java @@ -23,21 +23,22 @@ import javax.persistence.Id; import javax.persistence.Table; +import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; import java.util.UUID; @Entity @Table(name = "ldap_configuration") -public class LdapConfigurationVO implements InternalIdentity { - @Column(name = "hostname") - private String hostname; - +public class LdapConfigurationVO implements Identity, InternalIdentity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; + @Column(name = "hostname") + private String hostname; + @Column(name = "uuid") private String uuid; diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java index b51907f005ff..abf47d4094e8 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/LdapManagerImpl.java @@ -52,6 +52,7 @@ import org.apache.cloudstack.ldap.dao.LdapConfigurationDao; import org.apache.cloudstack.ldap.dao.LdapTrustMapDao; import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import com.cloud.domain.DomainVO; @@ -257,6 +258,19 @@ public LdapUserResponse createLdapUserResponse(final LdapUser user) { @Override public LdapConfigurationResponse deleteConfiguration(final LdapDeleteConfigurationCmd cmd) throws InvalidParameterValueException { + Long id = cmd.getId(); + String hostname = cmd.getHostname(); + if (id == null && StringUtils.isEmpty(hostname)) { + throw new InvalidParameterValueException("Either id or hostname must be specified"); + } + if (id != null) { + final LdapConfigurationVO config = _ldapConfigurationDao.findById(cmd.getId()); + if (config != null) { + _ldapConfigurationDao.remove(config.getId()); + return createLdapConfigurationResponse(config); + } + throw new InvalidParameterValueException("Cannot find configuration with id " + id); + } return deleteConfigurationInternal(cmd.getHostname(), cmd.getPort(), cmd.getDomainId()); } @@ -377,7 +391,8 @@ public Pair, Integer> listConfigurations(fin final int port = cmd.getPort(); final Long domainId = cmd.getDomainId(); final boolean listAll = cmd.listAll(); - final Pair, Integer> result = _ldapConfigurationDao.searchConfigurations(hostname, port, domainId, listAll); + final Long id = cmd.getId(); + final Pair, Integer> result = _ldapConfigurationDao.searchConfigurations(id, hostname, port, domainId, listAll); return new Pair, Integer>(result.first(), result.second()); } diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDao.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDao.java index af774b685ed6..889efa3ef90b 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDao.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDao.java @@ -41,5 +41,5 @@ public interface LdapConfigurationDao extends GenericDao, Integer> searchConfigurations(String hostname, int port, Long domainId); - Pair, Integer> searchConfigurations(String hostname, int port, Long domainId, boolean listAll); + Pair, Integer> searchConfigurations(Long id, String hostname, int port, Long domainId, boolean listAll); } diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDaoImpl.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDaoImpl.java index c053e87b6bf6..67d09feed90d 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDaoImpl.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/dao/LdapConfigurationDaoImpl.java @@ -48,6 +48,7 @@ public LdapConfigurationDaoImpl() { listGlobalConfigurationsSearch.done(); listDomainConfigurationsSearch = createSearchBuilder(); + listDomainConfigurationsSearch.and("id", listDomainConfigurationsSearch.entity().getId(), SearchCriteria.Op.EQ); listDomainConfigurationsSearch.and("hostname", listDomainConfigurationsSearch.entity().getHostname(), Op.EQ); listDomainConfigurationsSearch.and("port", listDomainConfigurationsSearch.entity().getPort(), Op.EQ); listDomainConfigurationsSearch.and("domain_id", listDomainConfigurationsSearch.entity().getDomainId(), Op.EQ); @@ -63,31 +64,35 @@ public LdapConfigurationVO findByHostname(final String hostname) { @Override public LdapConfigurationVO find(String hostname, int port, Long domainId) { - SearchCriteria sc = getSearchCriteria(hostname, port, domainId, false); + SearchCriteria sc = getSearchCriteria(null, hostname, port, domainId, false); return findOneBy(sc); } @Override public LdapConfigurationVO find(String hostname, int port, Long domainId, boolean listAll) { - SearchCriteria sc = getSearchCriteria(hostname, port, domainId, listAll); + SearchCriteria sc = getSearchCriteria(null, hostname, port, domainId, listAll); return findOneBy(sc); } @Override public Pair, Integer> searchConfigurations(final String hostname, final int port, final Long domainId) { - SearchCriteria sc = getSearchCriteria(hostname, port, domainId, false); + SearchCriteria sc = getSearchCriteria(null, hostname, port, domainId, false); return searchAndCount(sc, null); } @Override - public Pair, Integer> searchConfigurations(final String hostname, final int port, final Long domainId, final boolean listAll) { - SearchCriteria sc = getSearchCriteria(hostname, port, domainId, listAll); + public Pair, Integer> searchConfigurations(final Long id, final String hostname, final int port, final Long domainId, final boolean listAll) { + SearchCriteria sc = getSearchCriteria(id, hostname, port, domainId, listAll); return searchAndCount(sc, null); } - private SearchCriteria getSearchCriteria(String hostname, int port, Long domainId,boolean listAll) { + private SearchCriteria getSearchCriteria(Long id, String hostname, int port, Long domainId,boolean listAll) { SearchCriteria sc; - if (domainId != null) { + if (id != null) { + // If id is present, ignore all other parameters + sc = listDomainConfigurationsSearch.create(); + sc.setParameters("id", id); + } else if (domainId != null) { // If domainid is present, ignore listall sc = listDomainConfigurationsSearch.create(); sc.setParameters("domain_id", domainId); diff --git a/ui/src/config/section/config.js b/ui/src/config/section/config.js index e69f6d1e6c41..1961186e0bbd 100644 --- a/ui/src/config/section/config.js +++ b/ui/src/config/section/config.js @@ -41,7 +41,7 @@ export default { permission: ['listLdapConfigurations'], searchFilters: ['domainid', 'hostname', 'port'], columns: ['hostname', 'port', 'domainid'], - details: ['hostname', 'port', 'domainid'], + details: ['id', 'hostname', 'port', 'domainid'], actions: [ { api: 'addLdapConfiguration', diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index f55767ded2a0..765515033efd 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -1078,8 +1078,6 @@ export default { } if (this.$route.path.startsWith('/vmsnapshot/')) { params.vmsnapshotid = this.$route.params.id - } else if (this.$route.path.startsWith('/ldapsetting/')) { - params.hostname = this.$route.params.id } if (this.$route.path.startsWith('/tungstenpolicy/')) { params.policyuuid = this.$route.params.id @@ -1192,9 +1190,6 @@ export default { this.items[idx][key] = func(this.items[idx]) } } - if (this.$route.path.startsWith('/ldapsetting')) { - this.items[idx].id = this.items[idx].hostname - } } if (this.items.length > 0) { if (!this.showAction || this.dataView) { From 8204b2cdb17e4fd16a67b03745311e6138cd5bcc Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 29 Sep 2025 22:12:22 -0400 Subject: [PATCH 4/7] fix ui test --- ui/tests/unit/views/AutogenView.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/tests/unit/views/AutogenView.spec.js b/ui/tests/unit/views/AutogenView.spec.js index 6b1085637b30..12edb9295dd9 100644 --- a/ui/tests/unit/views/AutogenView.spec.js +++ b/ui/tests/unit/views/AutogenView.spec.js @@ -652,7 +652,7 @@ describe('Views > AutogenView.vue', () => { testapinamecase1response: { count: 0, testapinamecase1: [{ - id: 'test-id-1', + id: 'uuid1', name: 'test-name-1' }] } @@ -668,7 +668,7 @@ describe('Views > AutogenView.vue', () => { command: 'testApiNameCase1', response: 'json', listall: true, - id: 'test-id', + id: 'uuid1', hostname: 'test-id', page: 1, pagesize: 20 @@ -786,13 +786,13 @@ describe('Views > AutogenView.vue', () => { await flushPromises() expect(wrapper.vm.items).toEqual([{ - id: 'test-hostname-value', + id: 'uuid1', name: 'test-name-value', hostname: 'test-hostname-value', key: 0 }]) expect(wrapper.vm.resource).toEqual({ - id: 'test-hostname-value', + id: 'uuid1', name: 'test-name-value', hostname: 'test-hostname-value', key: 0 From 0762b088a14bccd9a2f5042d25b916ddb7493ef9 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Tue, 30 Sep 2025 01:15:56 -0400 Subject: [PATCH 5/7] fix 1 ui test --- ui/tests/unit/views/AutogenView.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/tests/unit/views/AutogenView.spec.js b/ui/tests/unit/views/AutogenView.spec.js index 12edb9295dd9..56e1295fe390 100644 --- a/ui/tests/unit/views/AutogenView.spec.js +++ b/ui/tests/unit/views/AutogenView.spec.js @@ -777,6 +777,7 @@ describe('Views > AutogenView.vue', () => { testapinamecase1response: { count: 1, testapinamecase1: [{ + id: 'uuid1', name: 'test-name-value', hostname: 'test-hostname-value' }] From 89efeb1699b248ddfce953fab3bdb9c02211057d Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Tue, 30 Sep 2025 01:19:42 -0400 Subject: [PATCH 6/7] fix test --- ui/tests/unit/views/AutogenView.spec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/tests/unit/views/AutogenView.spec.js b/ui/tests/unit/views/AutogenView.spec.js index 56e1295fe390..16e8ae219e3b 100644 --- a/ui/tests/unit/views/AutogenView.spec.js +++ b/ui/tests/unit/views/AutogenView.spec.js @@ -657,7 +657,7 @@ describe('Views > AutogenView.vue', () => { }] } }) - await router.push({ name: 'testRouter13', params: { id: 'test-id' } }) + await router.push({ name: 'testRouter13', params: { id: 'uuid1' } }) await flushPromises() expect(mockAxios).toHaveBeenCalled() @@ -669,7 +669,6 @@ describe('Views > AutogenView.vue', () => { response: 'json', listall: true, id: 'uuid1', - hostname: 'test-id', page: 1, pagesize: 20 }) From 9ab2d6ef8c9e01b6bf4934554d5f1b309829ec27 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Wed, 1 Oct 2025 07:49:53 -0400 Subject: [PATCH 7/7] fix api description --- .../apache/cloudstack/api/command/LdapListConfigurationCmd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListConfigurationCmd.java b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListConfigurationCmd.java index ba0fa0d6bd87..c950554b0d1f 100644 --- a/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListConfigurationCmd.java +++ b/plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LdapListConfigurationCmd.java @@ -53,7 +53,7 @@ public class LdapListConfigurationCmd extends BaseListCmd { @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, required = false, entityType = DomainResponse.class, description = "linked domain") private Long domainId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LdapConfigurationResponse.class, description = "list ldap configuration by ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LdapConfigurationResponse.class, description = "list ldap configuration by ID; when passed, all other parameters are ignored") private Long id; @Parameter(name = ApiConstants.LIST_ALL, type = CommandType.BOOLEAN, description = "If set to true, "