azure-cli: `cached_put` doesn't work with ARM Extension resources

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

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 25 (13 by maintainers)

Most upvoted comments

@zhoxing-ms Just emailed you the error logging with --debug

Could you send me the debug log (add parameter --debug after executed command) by email for this error: https://github.com/Azure/azure-cli/issues/18337#issuecomment-873248210

(ResourceNotFound) The fluxConfiguration was not found. Name: 'myconfig'.