Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR containerregistry/resource-manager] [ACR] Add Helm actions to webhook #767

Merged
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
57 changes: 47 additions & 10 deletions packages/@azure/arm-containerregistry/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,40 @@ export interface StorageAccountProperties {
/**
* @interface
* An interface representing VirtualNetworkRule.
* The virtual network rule for a container registry.
* Virtual network rule.
*
*/
export interface VirtualNetworkRule {
/**
* @member {string} id Resource ID of a subnet, for example:
* @member {Action} [action] The action of virtual network rule. Possible
* values include: 'Allow'. Default value: 'Allow' .
*/
action?: Action;
/**
* @member {string} virtualNetworkResourceId Resource ID of a subnet, for
* example:
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*/
id: string;
virtualNetworkResourceId: string;
}

/**
* @interface
* An interface representing IPRule.
* IP rule with specific IP or IP range in CIDR format.
*
*/
export interface IPRule {
/**
* @member {Action} [action] The action of IP ACL rule. Possible values
* include: 'Allow'. Default value: 'Allow' .
*/
action?: Action;
/**
* @member {string} iPAddressOrRange Specifies the IP or IP range in CIDR
* format. Only IPV4 address is allowed.
*/
iPAddressOrRange: string;
}

/**
Expand All @@ -328,6 +353,10 @@ export interface NetworkRuleSet {
* rules.
*/
virtualNetworkRules?: VirtualNetworkRule[];
/**
* @member {IPRule[]} [ipRules] The IP ACL rules.
*/
ipRules?: IPRule[];
}

/**
Expand Down Expand Up @@ -1495,7 +1524,7 @@ export interface SourceProperties {
*/
sourceControlType: SourceControlType;
/**
* @member {string} repositoryUrl The full URL to the source code respository
* @member {string} repositoryUrl The full URL to the source code repository
*/
repositoryUrl: string;
/**
Expand Down Expand Up @@ -1732,7 +1761,7 @@ export interface SourceUpdateParameters {
sourceControlType?: SourceControlType;
/**
* @member {string} [repositoryUrl] The full URL to the source code
* respository
* repository
*/
repositoryUrl?: string;
/**
Expand Down Expand Up @@ -1942,7 +1971,7 @@ export interface DockerBuildRequest {
agentConfiguration?: AgentProperties;
/**
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
Expand Down Expand Up @@ -2018,7 +2047,7 @@ export interface FileTaskRunRequest {
agentConfiguration?: AgentProperties;
/**
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
Expand Down Expand Up @@ -2100,7 +2129,7 @@ export interface EncodedTaskRunRequest {
agentConfiguration?: AgentProperties;
/**
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
Expand Down Expand Up @@ -2556,6 +2585,14 @@ export type ProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeede
*/
export type DefaultAction = 'Allow' | 'Deny';

/**
* Defines values for Action.
* Possible values include: 'Allow'
* @readonly
* @enum {string}
*/
export type Action = 'Allow';

/**
* Defines values for PasswordName.
* Possible values include: 'password', 'password2'
Expand Down Expand Up @@ -2598,11 +2635,11 @@ export type WebhookStatus = 'enabled' | 'disabled';

/**
* Defines values for WebhookAction.
* Possible values include: 'push', 'delete', 'quarantine'
* Possible values include: 'push', 'delete', 'quarantine', 'chart_push', 'chart_delete'
* @readonly
* @enum {string}
*/
export type WebhookAction = 'push' | 'delete' | 'quarantine';
export type WebhookAction = 'push' | 'delete' | 'quarantine' | 'chart_push' | 'chart_delete';

/**
* Defines values for RunStatus.
Expand Down
45 changes: 44 additions & 1 deletion packages/@azure/arm-containerregistry/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,14 @@ export const VirtualNetworkRule: msRest.CompositeMapper = {
name: "Composite",
className: "VirtualNetworkRule",
modelProperties: {
id: {
action: {
serializedName: "action",
defaultValue: 'Allow',
type: {
name: "String"
}
},
virtualNetworkResourceId: {
required: true,
serializedName: "id",
type: {
Expand All @@ -406,6 +413,30 @@ export const VirtualNetworkRule: msRest.CompositeMapper = {
}
};

export const IPRule: msRest.CompositeMapper = {
serializedName: "IPRule",
type: {
name: "Composite",
className: "IPRule",
modelProperties: {
action: {
serializedName: "action",
defaultValue: 'Allow',
type: {
name: "String"
}
},
iPAddressOrRange: {
required: true,
serializedName: "value",
type: {
name: "String"
}
}
}
}
};

export const NetworkRuleSet: msRest.CompositeMapper = {
serializedName: "NetworkRuleSet",
type: {
Expand All @@ -431,6 +462,18 @@ export const NetworkRuleSet: msRest.CompositeMapper = {
}
}
}
},
ipRules: {
serializedName: "ipRules",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "IPRule"
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export {
StorageAccountProperties,
NetworkRuleSet,
VirtualNetworkRule,
IPRule,
RegistryUpdateParameters,
RegistryListResult,
RegistryListCredentialsResult,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export {
StorageAccountProperties,
NetworkRuleSet,
VirtualNetworkRule,
IPRule,
Webhook,
Task,
PlatformProperties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export {
StorageAccountProperties,
NetworkRuleSet,
VirtualNetworkRule,
IPRule,
Replication,
Webhook
} from "../models/mappers";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export {
StorageAccountProperties,
NetworkRuleSet,
VirtualNetworkRule,
IPRule,
Replication,
Webhook,
ProxyResource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export {
StorageAccountProperties,
NetworkRuleSet,
VirtualNetworkRule,
IPRule,
Replication,
Task,
PlatformProperties,
Expand Down