-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FlexibleEngine plugin - implement, start, stop and restart services
- Loading branch information
1 parent
9c90d85
commit 84e34d1
Showing
19 changed files
with
620 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...c/main/java/org/eclipse/xpanse/plugins/flexibleengine/FlexibleEngineClientCredential.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
* | ||
*/ | ||
|
||
package org.eclipse.xpanse.plugins.flexibleengine; | ||
|
||
/** | ||
* Credential for FlexibleEngine Client. | ||
*/ | ||
public record FlexibleEngineClientCredential(String accessKey, | ||
String secretKey) { | ||
} |
35 changes: 35 additions & 0 deletions
35
...gine/src/main/java/org/eclipse/xpanse/plugins/flexibleengine/FlexibleEngineConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
* | ||
*/ | ||
|
||
package org.eclipse.xpanse.plugins.flexibleengine; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.eclipse.xpanse.plugins.flexibleengine.models.constant.FlexibleEngineConstants; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* FlexibleEngine Resource Converter. | ||
*/ | ||
@Slf4j | ||
@Component | ||
public class FlexibleEngineConverter { | ||
|
||
/** | ||
* Get url to query project info. | ||
* | ||
* @param region The region of resource. | ||
* @return Returns query url. | ||
*/ | ||
public StringBuilder buildProjectQueryUrl(String region) { | ||
return new StringBuilder(FlexibleEngineConstants.PROTOCOL_HTTPS) | ||
.append(FlexibleEngineConstants.IAM_ENDPOINT_PREFIX) | ||
.append(region) | ||
.append(FlexibleEngineConstants.ENDPOINT_SUFFIX).append("/") | ||
.append(FlexibleEngineConstants.IAM_API_VERSION).append("/") | ||
.append(FlexibleEngineConstants.PROJECTS_PATH).append("?") | ||
.append("name=").append(region); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
.../eclipse/xpanse/plugins/flexibleengine/manage/constant/FlexibleEngineManageConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
* | ||
*/ | ||
|
||
package org.eclipse.xpanse.plugins.flexibleengine.manage.constant; | ||
|
||
import org.eclipse.xpanse.plugins.flexibleengine.models.constant.FlexibleEngineConstants; | ||
|
||
/** | ||
* FlexibleEngine Manage Constants Class. | ||
*/ | ||
public class FlexibleEngineManageConstants extends FlexibleEngineConstants { | ||
|
||
public static final String ECS_ENDPOINT_PREFIX = "ecs."; | ||
|
||
public static final String ECS_API_VERSION = "v1"; | ||
public static final String CLOUD_SERVERS = "cloudservers"; | ||
public static final String ACTION = "action"; | ||
public static final String JOBS = "jobs"; | ||
} |
Oops, something went wrong.