Skip to content

Commit

Permalink
[Storage] Rename IPRange to SasIPRange (#5551)
Browse files Browse the repository at this point in the history
* Rename IPRange to SasIPRange

* update changelog
  • Loading branch information
HarshaNalluru authored Oct 15, 2019
1 parent 9c649d9 commit 23c7ca4
Show file tree
Hide file tree
Showing 24 changed files with 93 additions and 67 deletions.
6 changes: 5 additions & 1 deletion sdk/storage/storage-blob/BreakingChanges.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Breaking Changes

### 2019.10 12.0.0-preview.5

- `IPRange` is renamed to `SasIPRange`.

### 2019.10 Version 12.0.0-preview.4

- Replace string array with boolean flags to specify dataset to include when list containers or blobs.
Expand All @@ -13,7 +17,7 @@
After this change:
```js
blobServiceClient.listContainers({
includeMetadata : true
includeMetadata: true
});
```
- For listing blobs
Expand Down
4 changes: 4 additions & 0 deletions sdk/storage/storage-blob/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2019.10 12.0.0-preview.5

- [Breaking] `IPRange` is renamed to `SasIPRange`.

## 2019.10 12.0.0-preview.4

- [Breaking] Replace string array with boolean flags to specify dataset to include when listing containers or blobs.
Expand Down
6 changes: 3 additions & 3 deletions sdk/storage/storage-blob/src/AccountSASSignatureValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AccountSASPermissions } from "./AccountSASPermissions";
import { AccountSASResourceTypes } from "./AccountSASResourceTypes";
import { AccountSASServices } from "./AccountSASServices";
import { SharedKeyCredential } from "./credentials/SharedKeyCredential";
import { IPRange, ipRangeToString } from "./IPRange";
import { SasIPRange, ipRangeToString } from "./SasIPRange";
import { SASProtocol, SASQueryParameters } from "./SASQueryParameters";
import { SERVICE_VERSION } from "./utils/constants";
import { truncatedISO8061Date } from "./utils/utils.common";
Expand Down Expand Up @@ -73,10 +73,10 @@ export interface AccountSASSignatureValues {
/**
* Optional. IP range allowed.
*
* @type {IPRange}
* @type {SasIPRange}
* @memberof AccountSASSignatureValues
*/
ipRange?: IPRange;
ipRange?: SasIPRange;

/**
* The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to
Expand Down
6 changes: 3 additions & 3 deletions sdk/storage/storage-blob/src/BlobSASSignatureValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { BlobSASPermissions } from "./BlobSASPermissions";
import { ContainerSASPermissions } from "./ContainerSASPermissions";
import { SharedKeyCredential } from "./credentials/SharedKeyCredential";
import { IPRange, ipRangeToString } from "./IPRange";
import { SasIPRange, ipRangeToString } from "./SasIPRange";
import { SASProtocol } from "./SASQueryParameters";
import { SASQueryParameters } from "./SASQueryParameters";
import { UserDelegationKeyCredential } from "./credentials/UserDelegationKeyCredential";
Expand Down Expand Up @@ -67,10 +67,10 @@ export interface BlobSASSignatureValues {
/**
* Optional. IP ranges allowed in this SAS.
*
* @type {IPRange}
* @type {SasIPRange}
* @memberof BlobSASSignatureValues
*/
ipRange?: IPRange;
ipRange?: SasIPRange;

/**
* The name of the container the SAS user may access.
Expand Down
14 changes: 7 additions & 7 deletions sdk/storage/storage-blob/src/SASQueryParameters.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { IPRange, ipRangeToString } from "./IPRange";
import { SasIPRange, ipRangeToString } from "./SasIPRange";
import { truncatedISO8061Date } from "./utils/utils.common";
import { UserDelegationKey } from "./BlobServiceClient";

Expand Down Expand Up @@ -166,10 +166,10 @@ export class SASQueryParameters {
* Inner value of getter ipRange.
*
* @private
* @type {IPRange}
* @type {SasIPRange}
* @memberof SASQueryParameters
*/
private readonly ipRangeInner?: IPRange;
private readonly ipRangeInner?: SasIPRange;

/**
* The Azure Active Directory object ID in GUID format.
Expand Down Expand Up @@ -235,10 +235,10 @@ export class SASQueryParameters {
* Optional. IP range allowed for this SAS.
*
* @readonly
* @type {(IPRange | undefined)}
* @type {(SasIPRange | undefined)}
* @memberof SASQueryParameters
*/
public get ipRange(): IPRange | undefined {
public get ipRange(): SasIPRange | undefined {
if (this.ipRangeInner) {
return {
end: this.ipRangeInner.end,
Expand All @@ -259,7 +259,7 @@ export class SASQueryParameters {
* @param {SASProtocol} [protocol] Representing the allowed HTTP protocol(s)
* @param {Date} [startTime] Representing the start time for this SAS token
* @param {Date} [expiryTime] Representing the expiry time for this SAS token
* @param {IPRange} [ipRange] Representing the range of valid IP addresses for this SAS token
* @param {SasIPRange} [ipRange] Representing the range of valid IP addresses for this SAS token
* @param {string} [identifier] Representing the signed identifier (only for Service SAS)
* @param {string} [resource] Representing the storage container or blob (only for Service SAS)
* @param {string} [cacheControl] Representing the cache-control header (only for Blob/File Service SAS)
Expand All @@ -279,7 +279,7 @@ export class SASQueryParameters {
protocol?: SASProtocol,
startTime?: Date,
expiryTime?: Date,
ipRange?: IPRange,
ipRange?: SasIPRange,
identifier?: string,
resource?: string,
cacheControl?: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@
* Allowed IP range for a SAS.
*
* @export
* @interface IPRange
* @interface SasIPRange
*/
export interface IPRange {
export interface SasIPRange {
/**
* Starting IP address in the IP range.
* If end IP doesn't provide, start IP will the only IP allowed.
*
* @type {string}
* @memberof IPRange
* @memberof SasIPRange
*/
start: string;
/**
* Optional. IP address that ends the IP range.
* If not provided, start IP will the only IP allowed.
*
* @type {string}
* @memberof IPRange
* @memberof SasIPRange
*/
end?: string;
}

/**
* Generate IPRange format string. For example:
* Generate SasIPRange format string. For example:
*
* "8.8.8.8" or "1.1.1.1-255.255.255.255"
*
* @export
* @param {IPRange} ipRange
* @param {SasIPRange} ipRange
* @returns {string}
*/
export function ipRangeToString(ipRange: IPRange): string {
export function ipRangeToString(ipRange: SasIPRange): string {
return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;
}
2 changes: 1 addition & 1 deletion sdk/storage/storage-blob/src/index.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export * from "./BatchResponse";
export * from "./BrowserPolicyFactory";
export * from "./credentials/AnonymousCredential";
export * from "./credentials/Credential";
export { IPRange } from "./IPRange";
export { SasIPRange } from "./SasIPRange";
export { Range } from "./Range";
export * from "./LeaseClient";
export { BlockBlobTier, PremiumPageBlobTier } from "./models";
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-blob/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export * from "./ContainerSASPermissions";
export * from "./credentials/AnonymousCredential";
export * from "./credentials/Credential";
export * from "./credentials/SharedKeyCredential";
export { IPRange } from "./IPRange";
export { SasIPRange } from "./SasIPRange";
export { Range } from "./Range";
export * from "./LeaseClient";
export { BlockBlobTier, PremiumPageBlobTier } from "./models";
Expand Down
5 changes: 5 additions & 0 deletions sdk/storage/storage-file/BreakingChanges.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Breaking Changes

### 2019.10 12.0.0-preview.5

- `IPRange` is renamed to `SasIPRange`.

### 2019.10 12.0.0-preview.4

- `Models.StorageServiceProperties` is renamed into `Models.FileServiceProperties`
Expand All @@ -17,6 +21,7 @@
includeSnapshots: true
});
```

### 2019.08 Version 12.0.0-preview.2

- Aborter class is no longer exposed from the package. Use the package [@azure/abort-controller](https://www.npmjs.com/package/@azure/abort-controller) to pass an abort signal to any of the async operations.
Expand Down
4 changes: 4 additions & 0 deletions sdk/storage/storage-file/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2019.10 12.0.0-preview.5

- [Breaking] `IPRange` is renamed to `SasIPRange`.

## 2019.10 12.0.0-preview.4

- Library tries to load the proxy settings from the environment variables like HTTP_PROXY if the proxy settings are not provided when clients like `FileServiceClient` or `FileClient` are instantiated.
Expand Down
6 changes: 3 additions & 3 deletions sdk/storage/storage-file/src/AccountSASSignatureValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AccountSASPermissions } from "./AccountSASPermissions";
import { AccountSASResourceTypes } from "./AccountSASResourceTypes";
import { AccountSASServices } from "./AccountSASServices";
import { SharedKeyCredential } from "./credentials/SharedKeyCredential";
import { IPRange, ipRangeToString } from "./IPRange";
import { SasIPRange, ipRangeToString } from "./SasIPRange";
import { SASProtocol, SASQueryParameters } from "./SASQueryParameters";
import { SERVICE_VERSION } from "./utils/constants";
import { truncatedISO8061Date } from "./utils/utils.common";
Expand Down Expand Up @@ -73,10 +73,10 @@ export interface AccountSASSignatureValues {
/**
* Optional. IP range allowed.
*
* @type {IPRange}
* @type {SasIPRange}
* @memberof AccountSASSignatureValues
*/
ipRange?: IPRange;
ipRange?: SasIPRange;

/**
* The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to
Expand Down
6 changes: 3 additions & 3 deletions sdk/storage/storage-file/src/FileSASSignatureValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { SharedKeyCredential } from "./credentials/SharedKeyCredential";
import { FileSASPermissions } from "./FileSASPermissions";
import { IPRange, ipRangeToString } from "./IPRange";
import { SasIPRange, ipRangeToString } from "./SasIPRange";
import { SASProtocol, SASQueryParameters } from "./SASQueryParameters";
import { ShareSASPermissions } from "./ShareSASPermissions";
import { SERVICE_VERSION } from "./utils/constants";
Expand Down Expand Up @@ -65,10 +65,10 @@ export interface FileSASSignatureValues {
/**
* Optional. IP ranges allowed in this SAS.
*
* @type {IPRange}
* @type {SasIPRange}
* @memberof FileSASSignatureValues
*/
ipRange?: IPRange;
ipRange?: SasIPRange;

/**
* The name of the share the SAS user may access.
Expand Down
14 changes: 7 additions & 7 deletions sdk/storage/storage-file/src/SASQueryParameters.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { IPRange, ipRangeToString } from "./IPRange";
import { SasIPRange, ipRangeToString } from "./SasIPRange";
import { truncatedISO8061Date } from "./utils/utils.common";

/**
Expand Down Expand Up @@ -165,19 +165,19 @@ export class SASQueryParameters {
* Inner value of getter ipRange.
*
* @private
* @type {IPRange}
* @type {SasIPRange}
* @memberof SASQueryParameters
*/
private readonly ipRangeInner?: IPRange;
private readonly ipRangeInner?: SasIPRange;

/**
* Optional. IP range allowed for this SAS.
*
* @readonly
* @type {(IPRange | undefined)}
* @type {(SasIPRange | undefined)}
* @memberof SASQueryParameters
*/
public get ipRange(): IPRange | undefined {
public get ipRange(): SasIPRange | undefined {
if (this.ipRangeInner) {
return {
end: this.ipRangeInner.end,
Expand All @@ -198,7 +198,7 @@ export class SASQueryParameters {
* @param {SASProtocol} [protocol] Representing the allowed HTTP protocol(s)
* @param {Date} [startTime] Representing the start time for this SAS token
* @param {Date} [expiryTime] Representing the expiry time for this SAS token
* @param {IPRange} [ipRange] Representing the range of valid IP addresses for this SAS token
* @param {SasIPRange} [ipRange] Representing the range of valid IP addresses for this SAS token
* @param {string} [identifier] Representing the signed identifier (only for Service SAS)
* @param {string} [resource] Representing the storage container or blob (only for Service SAS)
* @param {string} [cacheControl] Representing the cache-control header (only for Blob/File Service SAS)
Expand All @@ -217,7 +217,7 @@ export class SASQueryParameters {
protocol?: SASProtocol,
startTime?: Date,
expiryTime?: Date,
ipRange?: IPRange,
ipRange?: SasIPRange,
identifier?: string,
resource?: string,
cacheControl?: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@
* Allowed IP range for a SAS.
*
* @export
* @interface IPRange
* @interface SasIPRange
*/
export interface IPRange {
export interface SasIPRange {
/**
* Starting IP address in the IP range.
* If end IP doesn't provide, start IP will the only IP allowed.
*
* @type {string}
* @memberof IPRange
* @memberof SasIPRange
*/
start: string;
/**
* Optional. IP address that ends the IP range.
* If not provided, start IP will the only IP allowed.
*
* @type {string}
* @memberof IPRange
* @memberof SasIPRange
*/
end?: string;
}

/**
* Generate IPRange format string. For example:
* Generate SasIPRange format string. For example:
*
* "8.8.8.8" or "1.1.1.1-255.255.255.255"
*
* @export
* @param {IPRange} ipRange A range of IP addresses.
* @param {SasIPRange} ipRange A range of IP addresses.
* @returns {string} string representation of the IP range.
*/
export function ipRangeToString(ipRange: IPRange): string {
export function ipRangeToString(ipRange: SasIPRange): string {
return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;
}
2 changes: 1 addition & 1 deletion sdk/storage/storage-file/src/index.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export * from "./DirectoryClient";
export * from "./FileClient";
export * from "./credentials/AnonymousCredential";
export * from "./credentials/Credential";
export { IPRange } from "./IPRange";
export { SasIPRange } from "./SasIPRange";
export { Range } from "./Range";
export {
FilePermissionInheritType,
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-file/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export * from "./ShareClient";
export * from "./credentials/AnonymousCredential";
export * from "./credentials/Credential";
export * from "./credentials/SharedKeyCredential";
export { IPRange } from "./IPRange";
export { SasIPRange } from "./SasIPRange";
export { Range } from "./Range";
export {
FilePermissionInheritType,
Expand Down
5 changes: 5 additions & 0 deletions sdk/storage/storage-queue/BreakingChanges.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Breaking Changes

### 2019.10 12.0.0-preview.5

- `IPRange` is renamed to `SasIPRange`.

### 2019.10 Version 12.0.0-preview.3

- `RawTokenCredential` is dropped. TokenCredential implementations can be found in the [@azure/identity](https://www.npmjs.com/package/@azure/identity) library for authentication.
Expand All @@ -18,6 +22,7 @@
includeMetadata: true
});
```

### 2019.08 Version 12.0.0-preview.2

- Aborter class is no longer exposed from the package. Use the package [@azure/abort-controller](https://www.npmjs.com/package/@azure/abort-controller) to pass an abort signal to any of the async operations.
Expand Down
Loading

0 comments on commit 23c7ca4

Please sign in to comment.