forked from indigo-dc/orchestrator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration of the Federation Registry service into Orchestrator (#25)
* Added some dto classes (Quota, BlockStorageQuota, ComputeQuota, NetworkQuota, Project, Provider, Service, Sla, UserGroup) for the fedreg * Added small fixes on files prevously added * Fix date type * Added Flavor, Image, Network, Region dto classes and adjusted Project, Service, Sla to support the objects returned from project API * Add AuthMethod dto e fix related dtos to include it * First attempt to use fedreg apis to populate classes * Remove skip certificate verification and change fed-reg url * First working version of remap function for slamPreferences with only preferences * add usage attribute in Quota class and use it in remapAttributes function * Completed the part of creation of a list of services in slamPreferences * Completed sla element and so also slamPreferences * Start working for CMDB replacement * Implemented remap for cloudProvider and ComputeService * Fixes for CMDB remap function * Clean Slam and CMDB and update the filter * Adapted the code to introduce the Identity Service * Cleaned SlamServiceV2 and the remapAttributesForPreferences function * Set identityServices as a list os Services * Cleaned SlamServiceV2 and added comments * cleaned CmdbServiceV2Impl class and improved code integrating jacoco suggestions * change error printing into LOG.error * remove comment about casting in remapAttributesForSla * fix IAM clients and S3 buckets creation when deployment fails in a provider * Fix log messages when find an IAM client and S3 bucket node and when skipping their creation * set CloudProvider Name correctly in deployment info stored in database * add region info of the cloudProvider to be returned in deployment info * adapted orchestrator to accept cloudServices of oject-store type from fedreg
- Loading branch information
Showing
43 changed files
with
1,708 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
ignite/ | ||
.DS_Store | ||
*.pydevproject | ||
.metadata | ||
|
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
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
42 changes: 42 additions & 0 deletions
42
src/main/java/it/reply/orchestrator/dto/fedreg/AuthMethod.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,42 @@ | ||
/* | ||
* Copyright © 2015-2021 I.N.F.N. | ||
* Copyright © 2015-2020 Santer Reply S.p.A. | ||
* | ||
* Licensed 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 it.reply.orchestrator.dto.fedreg; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import javax.validation.constraints.NotNull; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class AuthMethod { | ||
|
||
@JsonProperty("idp_name") | ||
@NotNull | ||
private String idpName; | ||
|
||
@JsonProperty("protocol") | ||
@NotNull | ||
private String protocol; | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/it/reply/orchestrator/dto/fedreg/BlockStorageQuota.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,42 @@ | ||
/* | ||
* Copyright © 2015-2021 I.N.F.N. | ||
* Copyright © 2015-2020 Santer Reply S.p.A. | ||
* | ||
* Licensed 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 it.reply.orchestrator.dto.fedreg; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class BlockStorageQuota extends Quota { | ||
|
||
@JsonProperty("gigabytes") | ||
private Integer gigabytes; | ||
|
||
@JsonProperty("per_volume_gigabytes") | ||
private Integer perVolumeGigabytes; | ||
|
||
@JsonProperty("volumes") | ||
private Integer volumes; | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/it/reply/orchestrator/dto/fedreg/ComputeQuota.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,42 @@ | ||
/* | ||
* Copyright © 2015-2021 I.N.F.N. | ||
* Copyright © 2015-2020 Santer Reply S.p.A. | ||
* | ||
* Licensed 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 it.reply.orchestrator.dto.fedreg; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class ComputeQuota extends Quota { | ||
|
||
@JsonProperty("cores") | ||
private Integer cores; | ||
|
||
@JsonProperty("instances") | ||
private Integer instances; | ||
|
||
@JsonProperty("ram") | ||
private Integer ram; | ||
|
||
} |
82 changes: 82 additions & 0 deletions
82
src/main/java/it/reply/orchestrator/dto/fedreg/Flavor.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,82 @@ | ||
/* | ||
* Copyright © 2015-2021 I.N.F.N. | ||
* Copyright © 2015-2020 Santer Reply S.p.A. | ||
* | ||
* Licensed 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 it.reply.orchestrator.dto.fedreg; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import javax.validation.constraints.NotNull; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Flavor { | ||
|
||
@JsonProperty("description") | ||
private String description; | ||
|
||
@JsonProperty("name") | ||
@NotNull | ||
private String name; | ||
|
||
@JsonProperty("uuid") | ||
@NotNull | ||
private String uuid; | ||
|
||
@JsonProperty("disk") | ||
private Integer disk; | ||
|
||
@JsonProperty("is_public") | ||
private Boolean isPublic; | ||
|
||
@JsonProperty("ram") | ||
private Integer ram; | ||
|
||
@JsonProperty("vcpus") | ||
private Integer vcpus; | ||
|
||
@JsonProperty("swap") | ||
private Integer swap; | ||
|
||
@JsonProperty("ephemeral") | ||
private Integer ephemeral; | ||
|
||
@JsonProperty("infiniband") | ||
private Boolean infiniband; | ||
|
||
@JsonProperty("gpus") | ||
private Integer gpus; | ||
|
||
@JsonProperty("gpu_model") | ||
private String gpuModel; | ||
|
||
@JsonProperty("gpu_vendor") | ||
private String gpuVendor; | ||
|
||
@JsonProperty("local_storage") | ||
private String localStorage; | ||
|
||
@JsonProperty("uid") | ||
@NotNull | ||
private String uid; | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
src/main/java/it/reply/orchestrator/dto/fedreg/IdentityProvider.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,54 @@ | ||
/* | ||
* Copyright © 2015-2021 I.N.F.N. | ||
* Copyright © 2015-2020 Santer Reply S.p.A. | ||
* | ||
* Licensed 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 it.reply.orchestrator.dto.fedreg; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import javax.validation.constraints.NotNull; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class IdentityProvider { | ||
|
||
@JsonProperty("description") | ||
private String description; | ||
|
||
@JsonProperty("endpoint") | ||
@NotNull | ||
private String endpoint; | ||
|
||
@JsonProperty("group_claim") | ||
@NotNull | ||
private String groupClaim; | ||
|
||
@JsonProperty("uid") | ||
@NotNull | ||
private String uid; | ||
|
||
@JsonProperty("providers") | ||
@Builder.Default | ||
private List<Provider> providers = new ArrayList<>(); | ||
} |
Oops, something went wrong.