Azure / Azure/azure-cli

`cached_put` doesn't work with ARM Extension resources

Open
#18,337 25 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

**Describe the bug**
My `begin_create_or_update` command is defined as below:
```
def begin_create_or_update(
self,
resource_group_name, # type: str
cluster_rp, # type: Union[str, "_models.Enum0"]
cluster_resource_name, # type: Union[str, "_models.Enum1"]
cluster_name, # type: str
flux_configuration_name, # type: str
flux_configuration, # type: "_models.FluxConfiguration"
**kwargs # type: Any
):
```
Having this number of arguments for extension resources does not seem to be supported as running:
```cached_put(cmd, client.begin_create_or_update, flux_configuration, resource_group_name, name, cluster_rp, cluster_type, cluster_name)```
fails with
```
expected 2 args, got 5: ('joinnis-test', 'my-config', 'Microsoft.Kubernetes', 'connectedClusters', 'my-cluster')
```

**To Reproduce**
Use `cached_put` as described above

**Expected behavior**
`cached_put` and `cached_get` should support resources that have more than the resource_group and resource_name as required parameters for their operations calls

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.