Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added
- N/A

## 1.2.38 - 2018-05-17

### Fixed
- Allow deserializing multiple query params
- Updated `GetInstancePublicIpExample` to now account for public IPs that may be associated with secondary private IP addresses

### Added
- Support for launching a database system from a backup in the Database service
- Support for backup or clone of multiple volumes at once using volume groups in the Block Storage service
- Support for the ability to optionally specify a compartment filter when listing exports in the File Storage service
- Support for tagging virtual cloud network resources in the Networking service
- Support for specifying the `PARAVIRTUALIZED` remote volume type when creating a virtual image or launching a new instance in the Compute service

## 1.2.37 - 2018-05-03

### Fixed
Expand All @@ -22,6 +35,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added
- Support for returning names for events in the Audit service
- Support for multiple hostnames per listener in the Load Balancing service
- Support waiting on multiple target states in `Waiter`

## 1.2.35 - 2018-04-19

Expand All @@ -32,7 +46,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added
- Support for tagging DbSystem and Database resources in the Database Service
- Support for filtering by `dbSystemId` in `listDbVersions` operation in Database Service
- Support waiting on multiple target states in `Waiter`

## 1.2.34 - 2018-04-05

Expand Down
4 changes: 2 additions & 2 deletions bmc-audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
</dependency>
</dependencies>

Expand Down
22 changes: 11 additions & 11 deletions bmc-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>oci-java-sdk-bom</artifactId>
Expand All @@ -19,62 +19,62 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<!-- Service modules, alpha sorted -->
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-audit</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-core</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-database</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-dns</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-email</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-filestorage</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-identity</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-loadbalancer</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-objectstorage</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<optional>false</optional>
<type>pom</type>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion bmc-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.auth.exception;

/**
* Failed to fetch Instance Principal cert from the Instance Metadata Service.
*/
public class InstancePrincipalUnavailableException extends IllegalArgumentException {
public InstancePrincipalUnavailableException(String message, Exception cause) {
super(message, cause);
}

public InstancePrincipalUnavailableException(String message) {
super(message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.security.interfaces.RSAPublicKey;
import java.security.spec.RSAPublicKeySpec;

import com.oracle.bmc.auth.exception.InstancePrincipalUnavailableException;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.StringUtils;
import org.bouncycastle.asn1.x500.AttributeTypeAndValue;
Expand Down Expand Up @@ -223,9 +224,11 @@ public static String getTenantIdFromCertificate(X509Certificate certificate) {
}
}
} catch (CertificateEncodingException ex) {
throw new IllegalArgumentException("The certificate is not valid one.", ex);
throw new InstancePrincipalUnavailableException(
"The certificate is not valid one.", ex);
}

throw new IllegalArgumentException("The certificate does not contain tenant id.");
throw new InstancePrincipalUnavailableException(
"The certificate does not contain tenant id.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ public static <T> WrappedWebTarget encodeCollectionFormatQueryParam(
queryParamName,
attemptEncodeQueryParam(StringUtils.join(valuesToUse, '\t')));
} else if (collectionFormatType == CollectionFormatType.Multi) {
final List<Object> encodedValuesToUse = new ArrayList<>();
for (Object v : valuesToUse) {
encodedValuesToUse.add(attemptEncodeQueryParam(v));
final Object[] encodedValuesToUse = new Object[valuesToUse.size()];
for (int i = 0; i < valuesToUse.size(); i++) {
encodedValuesToUse[i] = attemptEncodeQueryParam(valuesToUse.get(i));
}
target = target.queryParam(queryParamName, encodedValuesToUse);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,7 @@ public void encodeCollectionFormatQueryParam_singleElementList() {
WrappedWebTarget result =
HttpUtils.encodeCollectionFormatQueryParam(wrapped, "unitTest", values, cft);

if (cft == CollectionFormatType.Multi) {
final List<Object> expected = new ArrayList<>();
expected.add("single");
verify(target).queryParam("unitTest", expected);
} else {
verify(target).queryParam("unitTest", "single");
}
verify(target).queryParam("unitTest", "single");
}
}

Expand All @@ -260,10 +254,7 @@ public void encodeCollectionFormatQueryParam_multipleElementList() {
} else if (cft == CollectionFormatType.TabSeparated) {
verify(target).queryParam("unitTest", "number1%09number2");
} else if (cft == CollectionFormatType.Multi) {
final List<Object> expected = new ArrayList<>();
expected.add("number1");
expected.add("number2");
verify(target).queryParam("unitTest", expected);
verify(target).queryParam("unitTest", "number1", "number2");
} else {
fail("Unrecognized CollectionFormatType: " + cft.toString());
}
Expand Down Expand Up @@ -292,10 +283,7 @@ public void encodeCollectionFormatQueryParam_enumListMembers() {
} else if (cft == CollectionFormatType.TabSeparated) {
verify(target).queryParam("unitTest", "PROVISIONING%09STOPPING");
} else if (cft == CollectionFormatType.Multi) {
final List<Object> expected = new ArrayList<>();
expected.add("PROVISIONING");
expected.add("STOPPING");
verify(target).queryParam("unitTest", expected);
verify(target).queryParam("unitTest", "PROVISIONING", "STOPPING");
} else {
fail("Unrecognized CollectionFormatType: " + cft.toString());
}
Expand Down Expand Up @@ -324,9 +312,7 @@ public void encodeCollectionFormatQueryParam_nullMembersIgnored() {
} else if (cft == CollectionFormatType.TabSeparated) {
verify(target).queryParam("unitTest", "RUNNING");
} else if (cft == CollectionFormatType.Multi) {
final List<Object> expected = new ArrayList<>();
expected.add("RUNNING");
verify(target).queryParam("unitTest", expected);
verify(target).queryParam("unitTest", "RUNNING");
} else {
fail("Unrecognized CollectionFormatType: " + cft.toString());
}
Expand Down
4 changes: 2 additions & 2 deletions bmc-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>1.2.37</version>
<version>1.2.38</version>
</dependency>
</dependencies>

Expand Down
92 changes: 92 additions & 0 deletions bmc-core/src/main/java/com/oracle/bmc/core/Blockstorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,28 @@ public interface Blockstorage extends AutoCloseable {
CreateVolumeBackupPolicyAssignmentResponse createVolumeBackupPolicyAssignment(
CreateVolumeBackupPolicyAssignmentRequest request);

/**
* Creates a new volume group in the specified compartment. A volume group can have at most 20 block volumes.
* A volume group is a collection of volumes and may be created from a list of volumes, cloning an existing
* volume group or by restoring a volume group backup.
* You may optionally specify a *display name* for the volume group, which is simply a friendly name or
* description. It does not have to be unique, and you can change it. Avoid entering confidential information.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
CreateVolumeGroupResponse createVolumeGroup(CreateVolumeGroupRequest request);

/**
* Creates a new group backup of the specified volume group.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
CreateVolumeGroupBackupResponse createVolumeGroupBackup(CreateVolumeGroupBackupRequest request);

/**
* Deletes the specified boot volume. The volume cannot have an active connection to an instance.
* To disconnect the boot volume from a connected instance, see
Expand Down Expand Up @@ -125,6 +147,23 @@ CreateVolumeBackupPolicyAssignmentResponse createVolumeBackupPolicyAssignment(
DeleteVolumeBackupPolicyAssignmentResponse deleteVolumeBackupPolicyAssignment(
DeleteVolumeBackupPolicyAssignmentRequest request);

/**
* Deletes the specified volume group. This will NOT delete data volumes.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
DeleteVolumeGroupResponse deleteVolumeGroup(DeleteVolumeGroupRequest request);

/**
* Deletes a volume group backup. This will NOT delete backups within the volume group backup.
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
DeleteVolumeGroupBackupResponse deleteVolumeGroupBackup(DeleteVolumeGroupBackupRequest request);

/**
* Gets information for the specified boot volume.
* @param request The request object containing the details to send
Expand Down Expand Up @@ -178,6 +217,22 @@ GetVolumeBackupPolicyAssetAssignmentResponse getVolumeBackupPolicyAssetAssignmen
GetVolumeBackupPolicyAssignmentResponse getVolumeBackupPolicyAssignment(
GetVolumeBackupPolicyAssignmentRequest request);

/**
* Gets information for the specified volume group.
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
GetVolumeGroupResponse getVolumeGroup(GetVolumeGroupRequest request);

/**
* Gets information for the specified volume group backup.
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
GetVolumeGroupBackupResponse getVolumeGroupBackup(GetVolumeGroupBackupRequest request);

/**
* Lists the boot volumes in the specified compartment and Availability Domain.
*
Expand Down Expand Up @@ -205,6 +260,24 @@ ListVolumeBackupPoliciesResponse listVolumeBackupPolicies(
*/
ListVolumeBackupsResponse listVolumeBackups(ListVolumeBackupsRequest request);

/**
* Lists the backups for volume groups in the specified compartment. You can filter the results by volume group.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
ListVolumeGroupBackupsResponse listVolumeGroupBackups(ListVolumeGroupBackupsRequest request);

/**
* Lists the volume groups in the specified compartment and Availability Domain.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
ListVolumeGroupsResponse listVolumeGroups(ListVolumeGroupsRequest request);

/**
* Lists the volumes in the specified compartment and Availability Domain.
*
Expand Down Expand Up @@ -242,6 +315,25 @@ ListVolumeBackupPoliciesResponse listVolumeBackupPolicies(
*/
UpdateVolumeBackupResponse updateVolumeBackup(UpdateVolumeBackupRequest request);

/**
* Updates the set of volumes in a volume group along with (optionally) it's display name. This call can be used
* to add or remove volumes in a volume group. The entire list of volume ids must be specified.
* Avoid entering confidential information.
*
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
UpdateVolumeGroupResponse updateVolumeGroup(UpdateVolumeGroupRequest request);

/**
* Updates the display name for the specified volume group backup.
* @param request The request object containing the details to send
* @return A response object containing details about the completed operation
* @throws BmcException when an error occurs.
*/
UpdateVolumeGroupBackupResponse updateVolumeGroupBackup(UpdateVolumeGroupBackupRequest request);

/**
* Gets the pre-configured waiters available for resources for this service.
*
Expand Down
Loading