Skip to content

Commit

Permalink
remove cloud documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ankicabarisic committed Nov 4, 2024
1 parent fdb2ac9 commit a5a2325
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 7 additions & 3 deletions endpoints/2-cloud-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,19 @@ Contains authentication details for accessing the cloud. The fields are:

#### 2.7- RemoveClouds endpoint:

**Description**: An endpoint to get all the remove a list of defined clouds.
**Description**: This endpoint removes a specified list of cloud infrastructures.

**Path:**

```url
🔴 DEL {{protocol}}://{{sal_host}}:{{sal_port}}/sal/cloud/remove
```
**Path Variable (optional):** `preempt` = Boolean

**Headers:** `sessionid`
- `true` - Removes all deployed nodes within the specified cloud infrastructures.
- `false`: (default) Removes only the specified cloud infrastructures without affecting deployed nodes.

**Headers (optional):** `sessionid`

**Body:**

Expand All @@ -230,4 +234,4 @@ Contains authentication details for accessing the cloud. The fields are:
"{{cloud_name2}}"
]
```
**Reply:** Boolean, True if cloud infrastructure was removed. False, otherwise.
**Reply:** Boolean, `true` if cloud infrastructure was removed. `false`, otherwise.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public class CloudService {
@Autowired
private RepositoryService repositoryService;

private static final String DUMMY_INFRA_NAME_TEMPLATE = "iamadummy%s_%s";

/**
* Add clouds to the ProActive Resource Manager
* @param sessionId A valid session id
Expand Down Expand Up @@ -96,7 +98,9 @@ public Integer addClouds(String sessionId, List<CloudDefinition> clouds) throws
repositoryService.saveCredentials(credentials);
newCloud.setCredentials(credentials);

String dummyInfraName = "iamadummy" + newCloud.getCloudProviderName() + "_" + newCloud.getCloudId();
String dummyInfraName = String.format(DUMMY_INFRA_NAME_TEMPLATE,
newCloud.getCloudProviderName(),
newCloud.getCloudId());
connectorIaasGateway.defineInfrastructure(dummyInfraName, newCloud, "");
newCloud.setDummyInfrastructureName(dummyInfraName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@ public class ClusterService {

// Define cluster state constants
private static final String STATUS_DEFINED = "defined";

private static final String STATUS_DEPLOYED = "deployed";

private static final String STATUS_RUNNING = "running";

private static final String STATUS_FAILED = "failed";

private static final String STATUS_SUBMITTED = "submitted"; // New status
private static final String STATUS_SCALING = "scaling";

private static final String STATUS_SCALING = "scaling";

public boolean defineCluster(String sessionId, ClusterDefinition clusterDefinition)
throws NotConnectedException, IOException {
Expand Down

0 comments on commit a5a2325

Please sign in to comment.