fix getmetrics resource parsing
This commit is contained in:
parent
ac6acf237e
commit
df69f26234
|
@ -115,15 +115,15 @@ sub check_options {
|
|||
}
|
||||
|
||||
$self->{az_resource} = $self->{option_results}->{resource};
|
||||
|
||||
if ($self->{az_resource} =~ /^\/subscriptions\/.*\/resourceGroups\/.*\/providers\/Microsoft\..*\/.*\/.*$/) {
|
||||
$self->{az_resource_group} = '';
|
||||
$self->{az_resource_type} = '';
|
||||
$self->{az_resource_namespace} = '';
|
||||
} else {
|
||||
$self->{az_resource_group} = $self->{option_results}->{resource_group};
|
||||
$self->{az_resource_type} = $self->{option_results}->{resource_type};
|
||||
$self->{az_resource_namespace} = $self->{option_results}->{resource_namespace};
|
||||
|
||||
if ($self->{az_resource} =~ /^\/subscriptions\/.*\/resourceGroups\/(.*)\/providers\/(.*)\/(.*)\/(.*)$/) {
|
||||
$self->{az_resource_group} = $1;
|
||||
$self->{az_resource_namespace} = $2;
|
||||
$self->{az_resource_type} = $3;
|
||||
$self->{az_resource} = $4;
|
||||
}
|
||||
|
||||
$self->{az_metrics} = [];
|
||||
|
|
Loading…
Reference in New Issue