Skip to content

Commit 2c5ff40

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR] containerregistry/resource-manager (Azure#4052)
* [AutoPR containerregistry/resource-manager] [ACR] Add IP rules (Azure#4049) * Generated from c18a435d9031fb6130127831b39bbdb15c2b626e Remove chart actions * Generated from 7dae521fce44544031c25d3fcde7938dce5109c8 Add x-ms-client-name * Generated from a29e5ac2c16d843355e84adcd2b9c5f60dd4cbed (Azure#4066) update ACR webhook with Helm actions * 2.6.0 * Fix date
1 parent 1717e8c commit 2c5ff40

40 files changed

+422
-57
lines changed

azure-mgmt-containerregistry/HISTORY.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
Release History
44
===============
55

6+
2.6.0 (2019-01-02)
7+
++++++++++++++++++
8+
9+
**Features**
10+
11+
- Add IP rules
12+
13+
**Bugfixes**
14+
15+
- Rename incorrect "id" to "virtual_network_resource_id"
16+
617
2.5.0 (2018-12-10)
718
++++++++++++++++++
819

azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .status_py3 import Status
2424
from .storage_account_properties_py3 import StorageAccountProperties
2525
from .virtual_network_rule_py3 import VirtualNetworkRule
26+
from .ip_rule_py3 import IPRule
2627
from .network_rule_set_py3 import NetworkRuleSet
2728
from .registry_py3 import Registry
2829
from .registry_update_parameters_py3 import RegistryUpdateParameters
@@ -64,6 +65,7 @@
6465
from .status import Status
6566
from .storage_account_properties import StorageAccountProperties
6667
from .virtual_network_rule import VirtualNetworkRule
68+
from .ip_rule import IPRule
6769
from .network_rule_set import NetworkRuleSet
6870
from .registry import Registry
6971
from .registry_update_parameters import RegistryUpdateParameters
@@ -102,6 +104,7 @@
102104
SkuTier,
103105
ProvisioningState,
104106
DefaultAction,
107+
Action,
105108
PasswordName,
106109
RegistryUsageUnit,
107110
PolicyStatus,
@@ -124,6 +127,7 @@
124127
'Status',
125128
'StorageAccountProperties',
126129
'VirtualNetworkRule',
130+
'IPRule',
127131
'NetworkRuleSet',
128132
'Registry',
129133
'RegistryUpdateParameters',
@@ -161,6 +165,7 @@
161165
'SkuTier',
162166
'ProvisioningState',
163167
'DefaultAction',
168+
'Action',
164169
'PasswordName',
165170
'RegistryUsageUnit',
166171
'PolicyStatus',

azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/container_registry_management_client_enums.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ class DefaultAction(str, Enum):
5050
deny = "Deny"
5151

5252

53+
class Action(str, Enum):
54+
55+
allow = "Allow"
56+
57+
5358
class PasswordName(str, Enum):
5459

5560
password = "password"
@@ -84,3 +89,5 @@ class WebhookAction(str, Enum):
8489
push = "push"
8590
delete = "delete"
8691
quarantine = "quarantine"
92+
chart_push = "chart_push"
93+
chart_delete = "chart_delete"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class IPRule(Model):
16+
"""IP rule with specific IP or IP range in CIDR format.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param action: The action of IP ACL rule. Possible values include:
21+
'Allow'. Default value: "Allow" .
22+
:type action: str or
23+
~azure.mgmt.containerregistry.v2017_10_01.models.Action
24+
:param ip_address_or_range: Required. Specifies the IP or IP range in CIDR
25+
format. Only IPV4 address is allowed.
26+
:type ip_address_or_range: str
27+
"""
28+
29+
_validation = {
30+
'ip_address_or_range': {'required': True},
31+
}
32+
33+
_attribute_map = {
34+
'action': {'key': 'action', 'type': 'str'},
35+
'ip_address_or_range': {'key': 'value', 'type': 'str'},
36+
}
37+
38+
def __init__(self, **kwargs):
39+
super(IPRule, self).__init__(**kwargs)
40+
self.action = kwargs.get('action', "Allow")
41+
self.ip_address_or_range = kwargs.get('ip_address_or_range', None)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class IPRule(Model):
16+
"""IP rule with specific IP or IP range in CIDR format.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param action: The action of IP ACL rule. Possible values include:
21+
'Allow'. Default value: "Allow" .
22+
:type action: str or
23+
~azure.mgmt.containerregistry.v2017_10_01.models.Action
24+
:param ip_address_or_range: Required. Specifies the IP or IP range in CIDR
25+
format. Only IPV4 address is allowed.
26+
:type ip_address_or_range: str
27+
"""
28+
29+
_validation = {
30+
'ip_address_or_range': {'required': True},
31+
}
32+
33+
_attribute_map = {
34+
'action': {'key': 'action', 'type': 'str'},
35+
'ip_address_or_range': {'key': 'value', 'type': 'str'},
36+
}
37+
38+
def __init__(self, *, ip_address_or_range: str, action="Allow", **kwargs) -> None:
39+
super(IPRule, self).__init__(**kwargs)
40+
self.action = action
41+
self.ip_address_or_range = ip_address_or_range

azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/network_rule_set.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class NetworkRuleSet(Model):
2525
:param virtual_network_rules: The virtual network rules.
2626
:type virtual_network_rules:
2727
list[~azure.mgmt.containerregistry.v2017_10_01.models.VirtualNetworkRule]
28+
:param ip_rules: The IP ACL rules.
29+
:type ip_rules:
30+
list[~azure.mgmt.containerregistry.v2017_10_01.models.IPRule]
2831
"""
2932

3033
_validation = {
@@ -34,9 +37,11 @@ class NetworkRuleSet(Model):
3437
_attribute_map = {
3538
'default_action': {'key': 'defaultAction', 'type': 'str'},
3639
'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
40+
'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'},
3741
}
3842

3943
def __init__(self, **kwargs):
4044
super(NetworkRuleSet, self).__init__(**kwargs)
4145
self.default_action = kwargs.get('default_action', "Allow")
4246
self.virtual_network_rules = kwargs.get('virtual_network_rules', None)
47+
self.ip_rules = kwargs.get('ip_rules', None)

azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/network_rule_set_py3.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class NetworkRuleSet(Model):
2525
:param virtual_network_rules: The virtual network rules.
2626
:type virtual_network_rules:
2727
list[~azure.mgmt.containerregistry.v2017_10_01.models.VirtualNetworkRule]
28+
:param ip_rules: The IP ACL rules.
29+
:type ip_rules:
30+
list[~azure.mgmt.containerregistry.v2017_10_01.models.IPRule]
2831
"""
2932

3033
_validation = {
@@ -34,9 +37,11 @@ class NetworkRuleSet(Model):
3437
_attribute_map = {
3538
'default_action': {'key': 'defaultAction', 'type': 'str'},
3639
'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
40+
'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'},
3741
}
3842

39-
def __init__(self, *, default_action="Allow", virtual_network_rules=None, **kwargs) -> None:
43+
def __init__(self, *, default_action="Allow", virtual_network_rules=None, ip_rules=None, **kwargs) -> None:
4044
super(NetworkRuleSet, self).__init__(**kwargs)
4145
self.default_action = default_action
4246
self.virtual_network_rules = virtual_network_rules
47+
self.ip_rules = ip_rules

azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/virtual_network_rule.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,30 @@
1313

1414

1515
class VirtualNetworkRule(Model):
16-
"""The virtual network rule for a container registry.
16+
"""Virtual network rule.
1717
1818
All required parameters must be populated in order to send to Azure.
1919
20-
:param id: Required. Resource ID of a subnet, for example:
20+
:param action: The action of virtual network rule. Possible values
21+
include: 'Allow'. Default value: "Allow" .
22+
:type action: str or
23+
~azure.mgmt.containerregistry.v2017_10_01.models.Action
24+
:param virtual_network_resource_id: Required. Resource ID of a subnet, for
25+
example:
2126
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
22-
:type id: str
27+
:type virtual_network_resource_id: str
2328
"""
2429

2530
_validation = {
26-
'id': {'required': True},
31+
'virtual_network_resource_id': {'required': True},
2732
}
2833

2934
_attribute_map = {
30-
'id': {'key': 'id', 'type': 'str'},
35+
'action': {'key': 'action', 'type': 'str'},
36+
'virtual_network_resource_id': {'key': 'id', 'type': 'str'},
3137
}
3238

3339
def __init__(self, **kwargs):
3440
super(VirtualNetworkRule, self).__init__(**kwargs)
35-
self.id = kwargs.get('id', None)
41+
self.action = kwargs.get('action', "Allow")
42+
self.virtual_network_resource_id = kwargs.get('virtual_network_resource_id', None)

azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/virtual_network_rule_py3.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,30 @@
1313

1414

1515
class VirtualNetworkRule(Model):
16-
"""The virtual network rule for a container registry.
16+
"""Virtual network rule.
1717
1818
All required parameters must be populated in order to send to Azure.
1919
20-
:param id: Required. Resource ID of a subnet, for example:
20+
:param action: The action of virtual network rule. Possible values
21+
include: 'Allow'. Default value: "Allow" .
22+
:type action: str or
23+
~azure.mgmt.containerregistry.v2017_10_01.models.Action
24+
:param virtual_network_resource_id: Required. Resource ID of a subnet, for
25+
example:
2126
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
22-
:type id: str
27+
:type virtual_network_resource_id: str
2328
"""
2429

2530
_validation = {
26-
'id': {'required': True},
31+
'virtual_network_resource_id': {'required': True},
2732
}
2833

2934
_attribute_map = {
30-
'id': {'key': 'id', 'type': 'str'},
35+
'action': {'key': 'action', 'type': 'str'},
36+
'virtual_network_resource_id': {'key': 'id', 'type': 'str'},
3137
}
3238

33-
def __init__(self, *, id: str, **kwargs) -> None:
39+
def __init__(self, *, virtual_network_resource_id: str, action="Allow", **kwargs) -> None:
3440
super(VirtualNetworkRule, self).__init__(**kwargs)
35-
self.id = id
41+
self.action = action
42+
self.virtual_network_resource_id = virtual_network_resource_id

azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .status_py3 import Status
2424
from .storage_account_properties_py3 import StorageAccountProperties
2525
from .virtual_network_rule_py3 import VirtualNetworkRule
26+
from .ip_rule_py3 import IPRule
2627
from .network_rule_set_py3 import NetworkRuleSet
2728
from .registry_py3 import Registry
2829
from .registry_update_parameters_py3 import RegistryUpdateParameters
@@ -91,6 +92,7 @@
9192
from .status import Status
9293
from .storage_account_properties import StorageAccountProperties
9394
from .virtual_network_rule import VirtualNetworkRule
95+
from .ip_rule import IPRule
9496
from .network_rule_set import NetworkRuleSet
9597
from .registry import Registry
9698
from .registry_update_parameters import RegistryUpdateParameters
@@ -160,6 +162,7 @@
160162
SkuTier,
161163
ProvisioningState,
162164
DefaultAction,
165+
Action,
163166
PasswordName,
164167
RegistryUsageUnit,
165168
PolicyStatus,
@@ -190,6 +193,7 @@
190193
'Status',
191194
'StorageAccountProperties',
192195
'VirtualNetworkRule',
196+
'IPRule',
193197
'NetworkRuleSet',
194198
'Registry',
195199
'RegistryUpdateParameters',
@@ -258,6 +262,7 @@
258262
'SkuTier',
259263
'ProvisioningState',
260264
'DefaultAction',
265+
'Action',
261266
'PasswordName',
262267
'RegistryUsageUnit',
263268
'PolicyStatus',

0 commit comments

Comments
 (0)