Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[artifact-manager,plugins,installer] (#305) Restructure Aria Automation components #581

Merged
merged 21 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1654514
refactor: Moved `ConfigurationVraNg` to new place
Michaelpalacce Dec 11, 2024
1e39487
fix: `AbstractIacMojo` import for Configuration vrang
Michaelpalacce Dec 16, 2024
27be43e
refactor: Moved models
Michaelpalacce Dec 16, 2024
4b0e807
refactor!: Moved VRANG Stores
Michaelpalacce Dec 16, 2024
0a6074a
refactor!: Moved the rest clients and helpers
Michaelpalacce Dec 16, 2024
f182652
refactor!: Moved tests to correct place
Michaelpalacce Dec 16, 2024
fb4e810
Merge branch 'main' into refactor/305-restructure-aria-components
Michaelpalacce Jan 13, 2025
7e42cb6
docs: Added a notice for aria migration
Michaelpalacce Jan 14, 2025
4a9801c
test: Fixed package
Michaelpalacce Jan 14, 2025
df3e9fb
style(lint): A bunch of lint changes. Disabled VisibilityModifier rule
Michaelpalacce Jan 14, 2025
082ebf1
style(lint): Lint fixes
Michaelpalacce Jan 14, 2025
b05d088
style(lint): Clearning out linting issues
Michaelpalacce Jan 14, 2025
4bb49c7
fix: Imports
Michaelpalacce Jan 14, 2025
c6d4168
style(lint): Final lint issues
Michaelpalacce Jan 14, 2025
1d5e6b2
style(lint): Don't know what the linter wants at this point..
Michaelpalacce Jan 14, 2025
49957f0
fix: build docs
Michaelpalacce Jan 14, 2025
d04e812
fix: Docs build
Michaelpalacce Jan 14, 2025
5855647
docs: Added release docs
Michaelpalacce Jan 14, 2025
a8bcfa6
refator(aria-automation): Updated path
Michaelpalacce Jan 14, 2025
d609cbe
Update common/artifact-manager/src/main/java/com/vmware/pscoe/iac/art…
Michaelpalacce Jan 14, 2025
c65b2d3
Update docs/versions/latest/Release.md
Michaelpalacce Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/linters/sun_checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,11 @@ https://www.oracle.com/java/technologies/javase/codeconventions-contents.html

<!-- Checks for class design -->
<!-- See https://checkstyle.org/config_design.html -->
<module name="DesignForExtension" />
<!-- Uncomment later -->
<!-- <module name="DesignForExtension" /> -->
VenelinBakalov marked this conversation as resolved.
Show resolved Hide resolved
<module name="FinalClass" />
<module name="HideUtilityClassConstructor" />
<module name="InterfaceIsType" />
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true" />
</module>

<!-- Miscellaneous other checks. -->
<!-- See https://checkstyle.org/config_misc.html -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import com.vmware.pscoe.iac.artifact.model.abx.AbxConstant;
import com.vmware.pscoe.iac.artifact.model.abx.AbxPackageContent;
import com.vmware.pscoe.iac.artifact.model.abx.AbxPackageDescriptor;
import com.vmware.pscoe.iac.artifact.model.vrang.VraNgSecret;
import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg;
import com.vmware.pscoe.iac.artifact.aria.models.VraNgSecret;
import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg;
import org.apache.commons.lang3.NotImplementedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import com.vmware.pscoe.iac.artifact.model.abx.AbxAction;
import com.vmware.pscoe.iac.artifact.model.abx.AbxActionVersion;
import com.vmware.pscoe.iac.artifact.model.abx.AbxPackageDescriptor;
import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg;
import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg;

public class AbxReleaseManager {
private final Logger logger = LoggerFactory.getLogger(AbxReleaseManager.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# What?

The structure of this folder is being reworked. Classes are being moved based on solution.

## Progres
Michaelpalacce marked this conversation as resolved.
Show resolved Hide resolved

- [x] Aria Automation
- [ ] Aria Orchestrator
- [ ] Aria Logs
- [ ] Aria Operations
- [ ] SSH
- [ ] vCD
- [ ] CS
- [ ] ABX
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg;
import com.vmware.pscoe.iac.artifact.aria.configuration.ConfigurationVraNg;
import com.vmware.pscoe.iac.artifact.cli.CliManagerFactory;
import com.vmware.pscoe.iac.artifact.cli.CliManagerVrops;
import com.vmware.pscoe.iac.artifact.model.Version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.configuration;
package com.vmware.pscoe.iac.artifact.aria.configuration;

import java.net.URISyntaxException;
import java.util.Properties;
Expand All @@ -22,6 +22,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.vmware.pscoe.iac.artifact.configuration.Configuration;
import com.vmware.pscoe.iac.artifact.configuration.ConfigurationException;
import com.vmware.pscoe.iac.artifact.model.PackageType;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
/**
* Configuration classes for ARIA.
*/
package com.vmware.pscoe.iac.artifact.aria.configuration;

/*-
* #%L
* artifact-manager
* %%
* Copyright (C) 2023 VMware
* Copyright (C) 2023 - 2024 VMware
* %%
* Build Tools for VMware Aria
* Copyright 2023 VMware, Inc.
Expand All @@ -12,9 +17,3 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/

/**
* Package that represents IAC Artifact.
*
*/
package com.vmware.pscoe.iac.artifact.rest.vrang;
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

/**
* Interface that makes a Aria automation resource identifiable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import com.google.gson.JsonObject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import org.apache.commons.lang3.builder.HashCodeBuilder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,59 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import java.util.LinkedHashMap;
import java.util.Map;

/**
* VraNgCatalogEntitlementDto is used to store the entitlement details of the
* VraNgCatalog.
*/
public class VraNgCatalogEntitlementDto {

private String id;
private String projectId;
private Map<String, String> definition = new LinkedHashMap<String, String>();

/**
* @return the id
*/
public String getId() {
return id;
}

/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}

/**
* @return the project id
*/
public String getProjectId() {
return projectId;
}

/**
* @param projectId to set
*/
public void setProjectId(String projectId) {
this.projectId = projectId;
}

/**
* @return the definition
*/
public Map<String, String> getDefinition() {
return definition;
}

/**
* @param definition to set
*/
public void setDefinition(Map<String, String> definition) {
this.definition = definition;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

/**
* Service Broker catalog item.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

public class VraNgCatalogItemType {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,39 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import java.util.Collections;
import java.util.List;

import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* VraNgCloudAccount is the Aria Automation > Infrastructire > Cloud Account
* representation.
*/
public class VraNgCloudAccount {
/**
* @param Prime Number 17.
*/
private static final int PRIME_NUMBER_17 = 17;

/**
* @param Prime Number 31.
*/
private static final int PRIME_NUMBER_31 = 31;
private final String id;
private final String name;
private final String type;
private final List<String> regionIds;
private final List<String> tags;

/**
* @param id - the id of the CA
* @param name - the name of the CA
* @param type - the type of the CA
* @param regionIds - all the region IDs for the cloud account
*/
public VraNgCloudAccount(String id, String name, String type, List<String> regionIds, List<String> tags) {
this.id = id;
this.name = name;
Expand All @@ -33,26 +53,44 @@ public VraNgCloudAccount(String id, String name, String type, List<String> regio
this.tags = tags;
}

/**
* @return the id of the cloud account
*/
public String getId() {
return this.id;
}

/**
* @return the name of the CA
*/
public String getName() {
return this.name;
}

/**
* @return the type of the CA
*/
public String getType() {
return this.type;
}

/**
* @return the region ids associated with the CA
*/
public List<String> getRegionIds() {
return Collections.unmodifiableList(this.regionIds);
}

/**
* @return the tags associated with the CA
*/
public List<String> getTags() {
return Collections.unmodifiableList(this.tags);
}

/**
* @param obj - object to check if it equals to this one
*/
@Override
public boolean equals(Object obj) {
if (obj == null || !this.getClass().equals(obj.getClass())) {
Expand All @@ -63,4 +101,15 @@ public boolean equals(Object obj) {
return this.id.equals(other.getId());
}

/**
* @return the hash code of the object
*/
@Override
public int hashCode() {
return new HashCodeBuilder(PRIME_NUMBER_17, PRIME_NUMBER_31)
.append(name)
.append(type)
.toHashCode();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import java.io.Serializable;
import java.util.ArrayList;
Expand All @@ -23,6 +23,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
* Content Source Configuration.
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ "workflows" })
public class VraNgConfig implements Serializable {
Expand All @@ -31,11 +34,17 @@ public class VraNgConfig implements Serializable {
@JsonProperty("workflows")
private List<VraNgWorkflow> workflows = new ArrayList<>();

/**
* @return the workflows
*/
@JsonProperty("workflows")
public List<VraNgWorkflow> getWorkflows() {
return workflows;
}

/**
* @param workflows - the workflows to set
*/
@JsonProperty("workflows")
public void setWorkflows(List<VraNgWorkflow> workflows) {
this.workflows = workflows;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

/**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
* #L%
*/
package com.vmware.pscoe.iac.artifact.model.vrang;
package com.vmware.pscoe.iac.artifact.aria.models;

import java.util.ArrayList;
import java.util.List;
Expand Down
Loading
Loading