Skip to content
Permalink
Browse files
JCLOUDS-1255 - initial commit of Dimension Data CloudControl Apache j…
…clouds implementation.
  • Loading branch information
trevorflanagan authored and nacx committed Mar 22, 2017
1 parent 2fe3e0c commit 8054a5949b7eccccdd95d089b3b0d489e5866a2c
Show file tree
Hide file tree
Showing 52 changed files with 3,448 additions and 0 deletions.
@@ -0,0 +1,11 @@
dimensiondata is a jclouds api modelled on DimensionData CloudControl API.


# How to use it

- use a MCP2.0 datacenter (NA9, NA12, etc)

# Known Limitations

- it supports only MCP2.0 datacenters
- it currently supports only public images.
@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.jclouds.labs</groupId>
<artifactId>jclouds-labs</artifactId>
<version>2.1.0-SNAPSHOT</version>
</parent>

<!-- TODO: when out of labs, switch to org.jclouds.provider -->
<artifactId>dimensiondata-cloudcontrol</artifactId>
<description>jclouds components to access an implementation of Dimension Data CloudControl</description>
<packaging>bundle</packaging>

<properties>
<test.dimensiondata-cloudcontrol.api-version>2.1</test.dimensiondata-cloudcontrol.api-version>
<test.dimensiondata-cloudcontrol.endpoint>FIXME</test.dimensiondata-cloudcontrol.endpoint>
<test.dimensiondata-cloudcontrol.identity>FIXME</test.dimensiondata-cloudcontrol.identity>
<test.dimensiondata-cloudcontrol.credential>FIXME</test.dimensiondata-cloudcontrol.credential>
<jclouds.osgi.export>org.jclouds.dimensiondata*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import>
org.jclouds.compute.internal;version="${project.version}",
org.jclouds.rest.internal;version="${project.version}",
org.jclouds*;version="${project.version}",
*
</jclouds.osgi.import>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.jclouds</groupId>
<artifactId>jclouds-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.jclouds</groupId>
<artifactId>jclouds-core</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.jclouds.driver</groupId>
<artifactId>jclouds-slf4j</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.jclouds.driver</groupId>
<artifactId>jclouds-sshj</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
<exclusions>
<!-- Already provided by jclouds-sshj -->
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>live</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>integration</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<threadCount>1</threadCount>
<systemPropertyVariables>
<test.dimensiondata-cloudcontrol.api-version>
${test.dimensiondata-cloudcontrol.api-version}
</test.dimensiondata-cloudcontrol.api-version>
<test.dimensiondata-cloudcontrol.endpoint>
${test.dimensiondata-cloudcontrol.endpoint}
</test.dimensiondata-cloudcontrol.endpoint>
<test.dimensiondata-cloudcontrol.identity>
${test.dimensiondata-cloudcontrol.identity}
</test.dimensiondata-cloudcontrol.identity>
<test.dimensiondata-cloudcontrol.credential>
${test.dimensiondata-cloudcontrol.credential}
</test.dimensiondata-cloudcontrol.credential>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,99 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 org.jclouds.dimensiondata.cloudcontrol.domain;

import com.google.auto.value.AutoValue;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.json.SerializedNames;

@AutoValue
public abstract class Account {
public abstract String userName();

@Nullable
public abstract String password();

public abstract String fullName();

public abstract String firstName();

public abstract String lastName();

public abstract String emailAddress();

@Nullable
public abstract String department();

@Nullable
public abstract String customDefined1();

@Nullable
public abstract String customDefined2();

public abstract String orgId();

@Nullable
public abstract Roles roles();

Account() {
}

public static Builder builder() {
return new AutoValue_Account.Builder();
}

@SerializedNames({ "userName", "password", "fullName", "firstName", "lastName", "emailAddress", "department",
"customDefined1", "customDefined2", "orgId", "roles" })
public static Account create(String userName, String password, String fullName, String firstName, String lastName,
String emailAddress, String department, String customDefined1, String customDefined2, String orgId,
Roles roles) {
return builder().userName(userName).password(password).fullName(fullName).firstName(firstName).lastName(lastName)
.emailAddress(emailAddress).department(department).customDefined1(customDefined1)
.customDefined2(customDefined2).orgId(orgId).roles(roles).build();
}

public abstract Builder toBuilder();

@AutoValue.Builder
public abstract static class Builder {

public abstract Builder userName(String userName);

public abstract Builder password(String password);

public abstract Builder fullName(String fullName);

public abstract Builder firstName(String firstName);

public abstract Builder lastName(String lastName);

public abstract Builder emailAddress(String emailAddress);

public abstract Builder department(String department);

public abstract Builder customDefined1(String customDefined1);

public abstract Builder customDefined2(String customDefined2);

public abstract Builder orgId(String orgId);

public abstract Builder roles(Roles roles);

public abstract Account build();
}

}
@@ -0,0 +1,51 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 org.jclouds.dimensiondata.cloudcontrol.domain;

import com.google.auto.value.AutoValue;
import org.jclouds.json.SerializedNames;

@AutoValue
public abstract class AdditionalInformationType {

public abstract String value();

public abstract String name();

AdditionalInformationType() {
}

@SerializedNames({ "value", "name" })
public static AdditionalInformationType create(String value, String name) {
return builder().value(value).name(name).build();
}

public abstract Builder toBuilder();

@AutoValue.Builder
public abstract static class Builder {
public abstract Builder value(String value);

public abstract Builder name(String name);

public abstract AdditionalInformationType build();
}

public static Builder builder() {
return new AutoValue_AdditionalInformationType.Builder();
}
}
@@ -0,0 +1,68 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 org.jclouds.dimensiondata.cloudcontrol.domain;

import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.json.SerializedNames;

import java.util.List;

@AutoValue
public abstract class Backup {

Backup() {
}

public abstract String type();

public abstract String maintenanceStatus();

@Nullable
public abstract List<Property> properties();

@SerializedNames({ "type", "maintenanceStatus", "property" })
public static Backup create(String type, String maintenanceStatus, List<Property> properties) {
return builder().type(type).maintenanceStatus(maintenanceStatus).properties(properties).build();
}

public abstract Builder toBuilder();

@AutoValue.Builder
public abstract static class Builder {

public abstract Builder type(String type);

public abstract Builder maintenanceStatus(String maintenanceStatus);

public abstract Builder properties(List<Property> properties);

abstract Backup autoBuild();

abstract List<Property> properties();

public Backup build() {
properties(properties() != null ? ImmutableList.copyOf(properties()) : null);
return autoBuild();
}
}

public static Builder builder() {
return new AutoValue_Backup.Builder();
}
}

0 comments on commit 8054a59

Please sign in to comment.