Skip to content

Commit

Permalink
Merge branch 'Azure:main' into abiyer/add-arcgateway
Browse files Browse the repository at this point in the history
  • Loading branch information
9lash committed Jul 10, 2024
2 parents b4e04db + 9f52a00 commit 137e395
Show file tree
Hide file tree
Showing 157 changed files with 11,005 additions and 5,968 deletions.
11 changes: 11 additions & 0 deletions src/aks-preview/azext_aks_preview/managed_cluster_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2968,6 +2968,17 @@ def set_up_network_profile(self, mc: ManagedCluster) -> ManagedCluster:
mc = super().set_up_network_profile(mc)
network_profile = mc.network_profile

# network_plugin is typically defaulted to kubenet. AKS-RP is moving
# away from specifying this default in the API and making it based
# on the k8s version being used. The CLI should not be responsible
# for setting default values and should pass properties as empty
# unless specified by the user.
if (
network_profile.network_plugin is not None and
self.context.raw_param.get("network_plugin") is None
):
network_profile.network_plugin = None

# set up pod_cidrs, service_cidrs and ip_families
(
pod_cidrs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6117,6 +6117,7 @@ def test_aks_create_with_pod_identity_enabled(
# create
create_cmd = (
"aks create --resource-group={resource_group} --name={name} --location={location} "
"--network-plugin kubenet "
"--enable-managed-identity "
"--enable-pod-identity --enable-pod-identity-with-kubenet "
"--ssh-key-value={ssh_key_value} "
Expand Down Expand Up @@ -6417,6 +6418,7 @@ def test_aks_pod_identity_usage(self, resource_group, resource_group_location):
# create
create_cmd = (
"aks create --resource-group={resource_group} --name={name} --location={location} "
"--network-plugin kubenet "
"--enable-managed-identity "
"--enable-pod-identity --enable-pod-identity-with-kubenet "
"--ssh-key-value={ssh_key_value} "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4168,7 +4168,7 @@ def test_set_up_agentpool_profile(self):
ground_truth_mc_1.agent_pool_profiles = [ground_truth_agentpool_profile_1]
self.assertEqual(dec_mc_1, ground_truth_mc_1)

def test_set_up_network_profile(self):
def test_set_up_network_profile_preview(self):
# custom value
dec_1 = AKSPreviewManagedClusterCreateDecorator(
self.cmd,
Expand Down Expand Up @@ -4214,6 +4214,7 @@ def test_set_up_network_profile(self):
network_profile_1.ip_families = ["IPv4", "IPv6"]
network_profile_1.pod_cidrs = ["10.246.0.0/16", "2001:abcd::/64"]
network_profile_1.service_cidrs = ["10.0.0.0/16", "2001:ffff::/108"]
network_profile_1.network_plugin = None

load_balancer_profile_1 = self.models.load_balancer_models.ManagedClusterLoadBalancerProfile(
managed_outbound_i_ps=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileManagedOutboundIPs(
Expand All @@ -4227,6 +4228,36 @@ def test_set_up_network_profile(self):
)
self.assertEqual(dec_mc_1, ground_truth_mc_1)

# custom value
dec_2 = AKSPreviewManagedClusterCreateDecorator(
self.cmd,
self.client,
{
"network_plugin": "azure",
},
CUSTOM_MGMT_AKS_PREVIEW,
)
mc_2 = self.models.ManagedCluster(location="test_location")
dec_2.context.attach_mc(mc_2)
dec_mc_2 = dec_2.set_up_network_profile(mc_2)

network_profile_2 = self.models.ContainerServiceNetworkProfile()
# TODO: remove this temp fix once aks-preview's dependency on core azure-cli is updated to 2.26.0
for attr_name, attr_value in vars(network_profile_2).items():
if (
not attr_name.startswith("_")
and attr_name not in ["additional_properties", "outbound_type"]
and attr_value is not None
):
setattr(network_profile_2, attr_name, None)
network_profile_2.network_plugin = "azure"
network_profile_2.load_balancer_sku = CONST_LOAD_BALANCER_SKU_STANDARD

ground_truth_mc_2 = self.models.ManagedCluster(
location="test_location", network_profile=network_profile_2
)
self.assertEqual(dec_mc_2, ground_truth_mc_2)

def test_set_up_api_server_access_profile(self):
dec_1 = AKSPreviewManagedClusterCreateDecorator(
self.cmd,
Expand Down Expand Up @@ -5359,6 +5390,7 @@ def test_construct_mc_profile_preview(self):
)
network_profile_1 = self.models.ContainerServiceNetworkProfile(
load_balancer_sku="standard",
network_plugin=None,
)
identity_1 = self.models.ManagedClusterIdentity(type="SystemAssigned")
storage_profile_1 = self.models.ManagedClusterStorageProfile(
Expand Down
87 changes: 87 additions & 0 deletions src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -65088,6 +65088,48 @@
"version": "0.1.4"
},
"sha256Digest": "cb59ab44eb12b51ecc62f8a5b6302d166be5d6388cf8ff21bc49f2829128d031"
},
{
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/redisenterprise-1.0.0-py3-none-any.whl",
"filename": "redisenterprise-1.0.0-py3-none-any.whl",
"metadata": {
"azext.minCliCoreVersion": "2.45.0",
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: MIT License"
],
"extensions": {
"python.details": {
"contacts": [
{
"email": "[email protected]",
"name": "Microsoft Corporation",
"role": "author"
}
],
"document_names": {
"description": "DESCRIPTION.rst"
},
"project_urls": {
"Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/redisenterprise"
}
}
},
"generator": "bdist_wheel (0.30.0)",
"license": "MIT",
"metadata_version": "2.0",
"name": "redisenterprise",
"summary": "Microsoft Azure Command-Line Tools RedisEnterprise Extension.",
"version": "1.0.0"
},
"sha256Digest": "e43737fefbb1205970254f369b0f0c33fbfd5b82d64eb2025228eb3a07bed3e7"
}
],
"reservation": [
Expand Down Expand Up @@ -82535,6 +82577,51 @@
"version": "1.0.6"
},
"sha256Digest": "c3fe396c4c769095f68fe765505e40ff4671b192e1a6daee584749044a906ca7"
},
{
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/vm_repair-1.0.7-py2.py3-none-any.whl",
"filename": "vm_repair-1.0.7-py2.py3-none-any.whl",
"metadata": {
"azext.isPreview": false,
"azext.minCliCoreVersion": "2.0.67",
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"License :: OSI Approved :: MIT License"
],
"extensions": {
"python.details": {
"contacts": [
{
"email": "[email protected]",
"name": "Microsoft Corporation",
"role": "author"
}
],
"document_names": {
"description": "DESCRIPTION.rst"
},
"project_urls": {
"Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/vm-repair"
}
}
},
"generator": "bdist_wheel (0.30.0)",
"license": "MIT",
"metadata_version": "2.0",
"name": "vm-repair",
"summary": "Auto repair commands to fix VMs.",
"version": "1.0.7"
},
"sha256Digest": "989b15053fe19f1dbb37fd4a31720e2a1ca622ecadaaa4b5c568c44e44c20fa6"
}
],
"vmware": [
Expand Down
3 changes: 3 additions & 0 deletions src/redisenterprise/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Release History
===============
1.0.0
+++++++++
- Added support for new enterprise SKU E1

0.1.4
+++++++++
Expand Down
4 changes: 2 additions & 2 deletions src/redisenterprise/azext_redisenterprise/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def load_arguments(self, _):
c.argument('tags', tags_type)
c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
validator=get_default_location_from_resource_group)
c.argument('sku', arg_type=get_enum_type(['Enterprise_E5', 'Enterprise_E10', 'Enterprise_E20', 'Enterprise_E50',
c.argument('sku', arg_type=get_enum_type(['Enterprise_E1', 'Enterprise_E5', 'Enterprise_E10', 'Enterprise_E20', 'Enterprise_E50',
'Enterprise_E100', 'Enterprise_E200', 'Enterprise_E400', 'EnterpriseFlash_F300', 'EnterpriseFlash_F700',
'EnterpriseFlash_F1500']), help='The type of RedisEnterprise cluster '
'to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)')
Expand Down Expand Up @@ -102,7 +102,7 @@ def load_arguments(self, _):
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', options_list=['--cluster-name', '--name', '-n'], type=str, help='The name of the '
'RedisEnterprise cluster.', id_part='name')
c.argument('sku', arg_type=get_enum_type(['Enterprise_E5', 'Enterprise_E10', 'Enterprise_E20', 'Enterprise_E50',
c.argument('sku', arg_type=get_enum_type(['Enterprise_E1', 'Enterprise_E5', 'Enterprise_E10', 'Enterprise_E20', 'Enterprise_E50',
'Enterprise_E100', 'Enterprise_E200', 'Enterprise_E400', 'EnterpriseFlash_F300', 'EnterpriseFlash_F700',
'EnterpriseFlash_F1500']), help='The type of RedisEnterprise cluster '
'to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
arg_group="Sku",
help="The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)",
required=True,
enum={"EnterpriseFlash_F1500": "EnterpriseFlash_F1500", "EnterpriseFlash_F300": "EnterpriseFlash_F300", "EnterpriseFlash_F700": "EnterpriseFlash_F700", "Enterprise_E10": "Enterprise_E10", "Enterprise_E100": "Enterprise_E100", "Enterprise_E20": "Enterprise_E20", "Enterprise_E200": "Enterprise_E200", "Enterprise_E400": "Enterprise_E400", "Enterprise_E5": "Enterprise_E5","Enterprise_E50": "Enterprise_E50"},
enum={"EnterpriseFlash_F1500": "EnterpriseFlash_F1500", "EnterpriseFlash_F300": "EnterpriseFlash_F300", "EnterpriseFlash_F700": "EnterpriseFlash_F700", "Enterprise_E1": "Enterprise_E1", "Enterprise_E10": "Enterprise_E10", "Enterprise_E100": "Enterprise_E100", "Enterprise_E20": "Enterprise_E20", "Enterprise_E200": "Enterprise_E200", "Enterprise_E400": "Enterprise_E400", "Enterprise_E5": "Enterprise_E5","Enterprise_E50": "Enterprise_E50"},
)
return cls._args_schema

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--sku"],
arg_group="Sku",
help="The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)",
enum={"EnterpriseFlash_F1500": "EnterpriseFlash_F1500", "EnterpriseFlash_F300": "EnterpriseFlash_F300", "EnterpriseFlash_F700": "EnterpriseFlash_F700", "Enterprise_E10": "Enterprise_E10", "Enterprise_E100": "Enterprise_E100", "Enterprise_E20": "Enterprise_E20", "Enterprise_E200": "Enterprise_E200", "Enterprise_E400": "Enterprise_E400", "Enterprise_E5": "Enterprise_E5", "Enterprise_E50": "Enterprise_E50"},
enum={"EnterpriseFlash_F1500": "EnterpriseFlash_F1500", "EnterpriseFlash_F300": "EnterpriseFlash_F300", "EnterpriseFlash_F700": "EnterpriseFlash_F700", "Enterprise_E1": "Enterprise_E1", "Enterprise_E10": "Enterprise_E10", "Enterprise_E100": "Enterprise_E100", "Enterprise_E20": "Enterprise_E20", "Enterprise_E200": "Enterprise_E200", "Enterprise_E400": "Enterprise_E400", "Enterprise_E5": "Enterprise_E5", "Enterprise_E50": "Enterprise_E50"},
)
return cls._args_schema

Expand Down
Loading

0 comments on commit 137e395

Please sign in to comment.