Skip to content

Commit

Permalink
Merge pull request #23 from oracle/release_20170911
Browse files Browse the repository at this point in the history
Releasing version 1.2.15
  • Loading branch information
mricken authored Sep 11, 2017
2 parents e058ef3 + 1895fb6 commit e71daa6
Show file tree
Hide file tree
Showing 184 changed files with 5,176 additions and 339 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added
- N/A

## 1.2.15 - 2017-09-11

### Changed
- Maven packages renamed from "oracle-bmc-*" to "oci-*"" (group id renamed from "com.oracle.bmc.sdk" to "com.oracle.oci.sdk")
- Default configuration file location changed from "~/.oraclebmc/config" to "~/.oci/config"; old location deprecated (see "Deprecated" below)

### Added
- Support for instance console connections
- Support for Load Balancer health status API
- Support for compartment renaming
- Support for CustomerSecretKeys management

### Deprecated
- The previous default configuration file location, "~/.oraclebmc/config", has been deprecated: please use "~/.oci/config" instead. The old location still works, if file at new location does not exist.

## 1.2.13 - 2017-08-10
### Fixed
- Duplicable stream support (https://github.com/oracle/bmcs-java-sdk/issues/11)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to the Oracle Bare Metal Cloud Services Java SDK
# Contributing to the Oracle Cloud Infrastructure Java SDK

*Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.*
*Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.*

Pull requests can be made under
[The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Oracle Bare Metal Cloud Services Java SDK
# Oracle Cloud Infrastructure Java SDK
[![Build Status](https://travis-ci.org/oracle/bmcs-java-sdk.svg?branch=master)](https://travis-ci.org/oracle/bmcs-java-sdk)

## About

bmcs-java-sdk provides a Java SDK for managing your Oracle Bare Metal Cloud Services resources.
oci-java-sdk provides a Java SDK for managing your Oracle Cloud Infrastructure resources.

The project is open source and maintained by Oracle Corp. The home page for the project is [here](https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm).

Expand Down Expand Up @@ -31,9 +31,9 @@ See [CHANGELOG](/CHANGELOG.md).

## Contributing

bmcs-java-sdk is an open source project. See [CONTRIBUTING](/CONTRIBUTING.md) for details.
oci-java-sdk is an open source project. See [CONTRIBUTING](/CONTRIBUTING.md) for details.

Oracle gratefully acknowledges the contributions to bmcs-java-sdk that have been made by the community.
Oracle gratefully acknowledges the contributions to oci-java-sdk that have been made by the community.

## Known Issues

Expand Down
18 changes: 9 additions & 9 deletions bmc-audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.15</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>oracle-bmc-java-sdk-audit</artifactId>
<name>Oracle Bare Metal Cloud Services SDK - Audit</name>
<description>This project contains the SDK used for Oracle Bare Metal Cloud Audit Service</description>
<artifactId>oci-java-sdk-audit</artifactId>
<name>Oracle Cloud Infrastructure SDK - Audit</name>
<description>This project contains the SDK used for Oracle Cloud Infrastructure Audit Service</description>
<url>https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm</url>

<dependencies>
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-common</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>1.2.15</version>
</dependency>
</dependencies>

Expand Down
48 changes: 24 additions & 24 deletions bmc-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,59 @@
<!-- http://howtodoinjava.com/maven/maven-bom-bill-of-materials-dependency/ -->

<parent>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.15</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>oracle-bmc-java-sdk-bom</artifactId>
<artifactId>oci-java-sdk-bom</artifactId>
<packaging>pom</packaging>
<name>Oracle Bare Metal Cloud Services SDK - BOM</name>
<description>This project contains the BOM defining the SDK used for Oracle Bare Metal Cloud Services</description>
<name>Oracle Cloud Infrastructure SDK - BOM</name>
<description>This project contains the BOM defining the SDK used for Oracle Cloud Infrastructure</description>
<url>https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm</url>

<dependencyManagement>
<dependencies>
<!-- Common packages -->

<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-common</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>1.2.15</version>
<optional>false</optional>
</dependency>

<!-- Service modules, alpha sorted -->

<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-audit</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-audit</artifactId>
<version>1.2.15</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-core</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-core</artifactId>
<version>1.2.15</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-identity</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-identity</artifactId>
<version>1.2.15</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-loadbalancer</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-loadbalancer</artifactId>
<version>1.2.15</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-objectstorage</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-objectstorage</artifactId>
<version>1.2.15</version>
<optional>false</optional>
</dependency>
</dependencies>
Expand Down
12 changes: 6 additions & 6 deletions bmc-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk</artifactId>
<version>1.2.13</version>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.15</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>oracle-bmc-java-sdk-common</artifactId>
<name>Oracle Bare Metal Cloud Services SDK - Common</name>
<description>This project contains the common runtime components of the SDK used for Oracle Bare Metal Cloud Services</description>
<artifactId>oci-java-sdk-common</artifactId>
<name>Oracle Cloud Infrastructure SDK - Common</name>
<description>This project contains the common runtime components of the SDK used for Oracle Cloud Infrastructure</description>
<url>https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/javasdk.htm</url>

<properties>
Expand Down
36 changes: 32 additions & 4 deletions bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,24 @@
import lombok.RequiredArgsConstructor;

/**
* Simple implementation to read BMC configuration files.
* Simple implementation to read OCI configuration files.
* <p>
* Note, config files <b>MUST</b> contain a "DEFAULT" profile, else validation
* will fail. Additional profiles are optional.
*/
@lombok.extern.slf4j.Slf4j
public final class ConfigFileReader {
/**
* Default location of the config file.
*/
public static final String DEFAULT_FILE_PATH = "~/.oraclebmc/config";
public static final String DEFAULT_FILE_PATH = "~/.oci/config";

/**
* The fallback default location of the config file. If and only if the {@link #DEFAULT_FILE_PATH} does not exist,
* this fallback default location will be used.
*/
public static final String FALLBACK_DEFAULT_FILE_PATH = "~/.oraclebmc/config";

private static final String DEFAULT_PROFILE_NAME = "DEFAULT";

/**
Expand All @@ -56,7 +64,27 @@ public static ConfigFile parseDefault() throws IOException {
* if the file could not be read.
*/
public static ConfigFile parseDefault(@Nullable String profile) throws IOException {
return parse(DEFAULT_FILE_PATH, profile);
File effectiveFile = null;

File defaultFile = new File(expandUserHome(DEFAULT_FILE_PATH));
File fallbackDefaultFile = new File(expandUserHome(FALLBACK_DEFAULT_FILE_PATH));

if (defaultFile.exists() && defaultFile.isFile()) {
effectiveFile = defaultFile;
} else if (fallbackDefaultFile.exists() && fallbackDefaultFile.isFile()) {
effectiveFile = fallbackDefaultFile;
}

if (effectiveFile != null) {
LOG.debug("Loading config file from: {}", effectiveFile);
return parse(effectiveFile.getAbsolutePath(), profile);
} else {
throw new IOException(
String.format(
"Can't load the default config from '%s' or '%s' because it does not exist or it is not a file.",
defaultFile.getAbsolutePath(),
fallbackDefaultFile.getAbsolutePath()));
}
}

/**
Expand Down Expand Up @@ -149,7 +177,7 @@ public static ConfigFile parse(
private ConfigFileReader() {}

/**
* ConfigFile represents a simple lookup mechanism for a BMC config file.
* ConfigFile represents a simple lookup mechanism for a OCI config file.
*/
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
public static final class ConfigFile {
Expand Down
2 changes: 1 addition & 1 deletion bmc-common/src/main/java/com/oracle/bmc/OCID.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.regex.Pattern;

/**
* Oracle Bare Metal Cloud Services unique ID.
* Oracle Cloud Infrastructure unique ID.
* <p>
* See <a href="https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Concepts/concepts.htm#ocid">documentation</a>.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.io.InputStream;

/**
* Base interface used provide required information to sign requests to Oracle Bare Metal Services.
* Base interface used provide required information to sign requests to Oracle Cloud Infrastructure.
* <p>
* Implementations may choose to provide hints about the cacheability of the keyId and privateKey using
* {@link AuthCachingPolicy} (optional).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* Implementation of {@link AuthenticationDetailsProvider} that uses a standard
* BMC configuration file as an input.
* OCI configuration file as an input.
*/
@ToString
public class ConfigFileAuthenticationDetailsProvider implements AuthenticationDetailsProvider {
Expand All @@ -39,7 +39,7 @@ public ConfigFileAuthenticationDetailsProvider(String profile) throws IOExceptio
* Creates a new instance.
*
* @param configurationFilePath
* path to the BMC configuration file
* path to the OCI configuration file
* @param profile
* profile to load, optional
* @throws IOException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void setAllowRestrictedHeadersProperty(String previousValue) {
+ " was explicitly "
+ "set to "
+ previousValue
+ "; the Oracle BMC SDK needs to set this property to true. Failing...");
+ "; the OCI SDK needs to set this property to true. Failing...");
}
System.setProperty(SUN_NET_HTTP_ALLOW_RESTRICTED_HEADERS, "true");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
import lombok.NoArgsConstructor;

/**
* Class that exposes a way to create a {@link RequestSigner} for use with BMC.
* Class that exposes a way to create a {@link RequestSigner} for use with OCI.
* The returned signers implement signing strategies outlined by <a href=
* "https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm">the
* signing guidelines</a>.
* <p>
* This is only exposed so clients can write REST calls directly against BMCS
* This is only exposed so clients can write REST calls directly against OCI
* without using the SDK provided clients, but this class may change without
* notice -- users are encouraged to use the SDK provided clients.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import lombok.RequiredArgsConstructor;

/**
* Enum for the various signing strategies used by BMC.
* Enum for the various signing strategies used by OCI.
*/
@InternalSdk
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ public PEMFileRSAPrivateKeySupplier(
throw new IllegalArgumentException(
"Private key must be in PEM format, was: " + object.getClass());
} else {
throw new IllegalArgumentException(
"Private key must be in PEM format");
throw new IllegalArgumentException("Private key must be in PEM format");
}

this.key = (RSAPrivateKey) converter.getPrivateKey(keyInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static JreVersion parse() {
// http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html
String[] versionParts = versionString.split("\\.");
int featureVersion = Integer.parseInt(versionParts[1]);
// BMC requires TLS1.2, which is only supported on Java7+.
// OCI requires TLS1.2, which is only supported on Java7+.
if (featureVersion < 7) {
version = JreVersion.Unsupported;
} else if (featureVersion == 7) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Waiters {
new MaxTimeTerminationStrategy(secondsToMillis(1200));

/**
* The default BMC polling waiter that will be used. Configured using
* The default OCI polling waiter that will be used. Configured using
* {@link #DEFAULT_POLLING_TERMINATION_STRATEGY} and
* {@link #DEFAULT_POLLING_DELAY_STRATEGY}.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@
import java.io.FileNotFoundException;
import java.io.IOException;

import org.junit.Ignore;
import org.junit.Test;

import com.oracle.bmc.ConfigFileReader.ConfigFile;

public class ConfigFileReaderTest {

@Test
@Ignore
public void defaultConfigFile() throws IOException {
ConfigFileReader.parseDefault();
}

@Test(expected = FileNotFoundException.class)
public void noConfigFile() throws IOException {
ConfigFileReader.parse("src/test/resources/does_not_exist");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.http.signing.internal;

import org.junit.Test;
Expand All @@ -14,7 +17,7 @@
* Tests for {@link PEMFileRSAPrivateKeySupplierTest}.
*/
public class PEMFileRSAPrivateKeySupplierTest {
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void ctor_invalidFile() throws IOException {
InputStream notAPem = new ByteArrayInputStream(new byte[0]);
// not a valid key file
Expand Down
Loading

0 comments on commit e71daa6

Please sign in to comment.