diff --git a/sandbox-apis/nova/src/main/java/org/jclouds/openstack/nova/NovaPropertiesBuilder.java b/sandbox-apis/nova/src/main/java/org/jclouds/openstack/nova/NovaPropertiesBuilder.java new file mode 100644 index 0000000000..051a8b532b --- /dev/null +++ b/sandbox-apis/nova/src/main/java/org/jclouds/openstack/nova/NovaPropertiesBuilder.java @@ -0,0 +1,45 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * 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 org.jclouds.openstack.nova; + +import org.jclouds.PropertiesBuilder; + +import java.util.Properties; + +/** + * Builds properties used in Openstack Nova Clients + * + * @author Dmitri Babaev + */ +public class NovaPropertiesBuilder extends PropertiesBuilder { + @Override + protected Properties defaultProperties() { + Properties properties = super.defaultProperties(); + return properties; + } + + public NovaPropertiesBuilder(Properties properties) { + super(properties); + } + + public NovaPropertiesBuilder() { + super(); + } +} diff --git a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/_NovaClient.java b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/_NovaClient.java new file mode 100644 index 0000000000..e438d2f906 --- /dev/null +++ b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/_NovaClient.java @@ -0,0 +1,24 @@ +package org.jclouds.openstack.nova; + +import org.jclouds.compute.ComputeServiceContextFactory; +import org.jclouds.compute.ComputeServiceContext; +import org.jclouds.ssh.jsch.config.JschSshClientModule; + +import java.util.Collections; +import java.util.Properties; + +import static org.jclouds.Constants.PROPERTY_ENDPOINT; + +public class _NovaClient { + static public void main(String[] args) { + String identity = "admin"; + String credential = ""; + String endpoint = ""; + + ComputeServiceContextFactory contextFactory = new ComputeServiceContextFactory(); + + Properties overrides = new Properties(); + overrides.setProperty(PROPERTY_ENDPOINT, endpoint); + ComputeServiceContext context = contextFactory.createContext("nova", identity, credential, Collections.singleton(new JschSshClientModule()), overrides); + } +}