Hello community,
here is the log from the commit of package azure-cli-policyinsights for openSUSE:Factory checked in at 2019-10-31 18:16:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-policyinsights (Old)
and /work/SRC/openSUSE:Factory/.azure-cli-policyinsights.new.2990 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-policyinsights"
Thu Oct 31 18:16:51 2019 rev:3 rq:742708 version:0.1.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-policyinsights/azure-cli-policyinsights.changes 2019-06-05 11:44:29.527021001 +0200
+++ /work/SRC/openSUSE:Factory/.azure-cli-policyinsights.new.2990/azure-cli-policyinsights.changes 2019-10-31 18:16:55.390114109 +0100
@@ -1,0 +2,9 @@
+Thu Oct 24 12:11:22 UTC 2019 - John Paul Adrian Glaubitz
+
+- New upstream release
+ + Version 0.1.4
+ + For detailed information about changes see the
+ HISTORY.txt file provided with this package
+- Update Requires from setup.py
+
+-------------------------------------------------------------------
Old:
----
azure-cli-policyinsights-0.1.1.tar.gz
New:
----
azure-cli-policyinsights-0.1.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ azure-cli-policyinsights.spec ++++++
--- /var/tmp/diff_new_pack.FspHpm/_old 2019-10-31 18:16:56.878115650 +0100
+++ /var/tmp/diff_new_pack.FspHpm/_new 2019-10-31 18:16:56.902115675 +0100
@@ -17,7 +17,7 @@
Name: azure-cli-policyinsights
-Version: 0.1.1
+Version: 0.1.4
Release: 0
Summary: Microsoft Azure CLI 'policyinsights' Command Module
License: MIT
@@ -33,7 +33,7 @@
Requires: azure-cli-command-modules-nspkg
Requires: azure-cli-core
Requires: azure-cli-nspkg
-Requires: python3-azure-mgmt-policyinsights >= 0.2.0
+Requires: python3-azure-mgmt-policyinsights >= 0.3.1
Requires: python3-azure-nspkg >= 3.0.0
Conflicts: azure-cli < 2.0.0
++++++ azure-cli-policyinsights-0.1.1.tar.gz -> azure-cli-policyinsights-0.1.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/HISTORY.rst new/azure-cli-policyinsights-0.1.4/HISTORY.rst
--- old/azure-cli-policyinsights-0.1.1/HISTORY.rst 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/HISTORY.rst 2019-06-13 23:17:47.000000000 +0200
@@ -3,6 +3,18 @@
Release History
===============
+0.1.4
+++++++
+* Minor fixes
+
+0.1.3
+++++++++++++++++++
+* Add support for `--expand PolicyEvaluationDetails` to query policy evaluation details on the resource.
+
+0.1.2
+++++++++++++++++++
+* Minor fixes
+
0.1.1
++++++++++++++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/PKG-INFO new/azure-cli-policyinsights-0.1.4/PKG-INFO
--- old/azure-cli-policyinsights-0.1.1/PKG-INFO 2019-02-12 03:05:47.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/PKG-INFO 2019-06-13 23:17:58.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: azure-cli-policyinsights
-Version: 0.1.1
+Version: 0.1.4
Summary: Microsoft Azure Command-Line Tools Policy Insights Command Module
Home-page: https://github.com/Azure/azure-cli
Author: Microsoft Corporation
@@ -20,6 +20,18 @@
Release History
===============
+ 0.1.4
+ ++++++
+ * Minor fixes
+
+ 0.1.3
+ ++++++++++++++++++
+ * Add support for `--expand PolicyEvaluationDetails` to query policy evaluation details on the resource.
+
+ 0.1.2
+ ++++++++++++++++++
+ * Minor fixes
+
0.1.1
++++++++++++++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/__init__.py new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/__init__.py
--- old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/__init__.py 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/__init__.py 2019-06-13 23:17:47.000000000 +0200
@@ -13,6 +13,7 @@
def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
+ from azure.cli.core.profiles import ResourceType
from ._exception_handler import policy_insights_exception_handler
policyinsights_custom = CliCommandType(
@@ -21,7 +22,7 @@
super(PolicyInsightsCommandsLoader, self).__init__(
cli_ctx=cli_ctx,
- min_profile='2017-03-10-profile',
+ resource_type=ResourceType.MGMT_POLICYINSIGHTS,
custom_command_type=policyinsights_custom)
def load_command_table(self, args):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/_exception_handler.py new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/_exception_handler.py
--- old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/_exception_handler.py 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/_exception_handler.py 2019-06-13 23:17:47.000000000 +0200
@@ -12,8 +12,7 @@
if isinstance(ex, QueryFailureException):
message = '({}) {}'.format(ex.error.error.code, ex.error.error.message)
raise CLIError(message)
- else:
- import sys
- from six import reraise
+ import sys
+ from six import reraise
- reraise(*sys.exc_info())
+ reraise(*sys.exc_info())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/_help.py new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/_help.py
--- old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/_help.py 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/_help.py 2019-06-13 23:17:47.000000000 +0200
@@ -127,6 +127,9 @@
- name: Get latest policy states in current subscription aggregating results based on some properties specifying multiple groupings.
text: >
az policy state list --apply "groupby((policyAssignmentId, policySetDefinitionId, policyDefinitionReferenceId, policyDefinitionId, resourceId))/groupby((policyAssignmentId, policySetDefinitionId, policyDefinitionReferenceId, policyDefinitionId), aggregate($count as numNonCompliantResources))"
+ - name: Get latest policy states for a resource including policy evaluation details.
+ text: >
+ az policy state list --resource "myKeyVault" --namespace "Microsoft.KeyVault" --resource-type "vaults" -g "myresourcegroup" --expand PolicyEvaluationDetails
"""
helps['policy state summarize'] = """
type: command
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/_params.py new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/_params.py
--- old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/_params.py 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/_params.py 2019-06-13 23:17:47.000000000 +0200
@@ -9,7 +9,7 @@
get_policy_set_completion_list, get_policy_completion_list,
get_policy_assignment_completion_list, get_providers_completion_list, get_resource_types_completion_list)
-from ._validators import validate_resource
+from ._validators import (validate_resource, validate_expand)
from ._completers import get_policy_remediation_completion_list
@@ -110,9 +110,15 @@
options_list=['--all'],
action='store_true',
help='Within the specified time interval, get all policy states instead of the latest only.')
+ c.argument(
+ 'expand_clause',
+ validator=validate_expand,
+ options_list=['--expand'],
+ arg_group='Query Option',
+ help='Expand expression using OData notation.')
with self.argument_context('policy state summarize') as c:
- c.ignore('all_results', 'order_by_clause', 'select_clause', 'apply_clause')
+ c.ignore('all_results', 'order_by_clause', 'select_clause', 'apply_clause', 'expand_clause')
with self.argument_context('policy remediation') as c:
c.argument('remediation_name', options_list=['--name', '-n'],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/_validators.py new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/_validators.py
--- old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/_validators.py 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/_validators.py 2019-06-13 23:17:47.000000000 +0200
@@ -14,3 +14,15 @@
raise CLIError('--namespace is required if --resource is not a resource ID.')
if not namespace.resource_type:
raise CLIError('--resource-type is required if --resource is not a resource ID.')
+
+
+def validate_resource_required(cmd, namespace):
+ if not namespace.resource:
+ raise CLIError('--resource is required for the operation.')
+
+ validate_resource(cmd, namespace)
+
+
+def validate_expand(cmd, namespace):
+ if namespace.expand_clause is not None:
+ validate_resource_required(cmd, namespace)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/commands.py new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/commands.py
--- old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/commands.py 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/commands.py 2019-06-13 23:17:47.000000000 +0200
@@ -10,29 +10,31 @@
def load_command_table(self, _):
policy_events_sdk = CliCommandType(
- operations_tmpl='azure.mgmt.policyinsights.operations.policy_events_operations#PolicyEventsOperations.{}',
+ operations_tmpl='azure.mgmt.policyinsights.operations#PolicyEventsOperations.{}',
exception_handler=policy_insights_exception_handler
)
policy_states_sdk = CliCommandType(
- operations_tmpl='azure.mgmt.policyinsights.operations.policy_states_operations#PolicyStatesOperations.{}',
+ operations_tmpl='azure.mgmt.policyinsights.operations#PolicyStatesOperations.{}',
exception_handler=policy_insights_exception_handler
)
policy_remediations_sdk = CliCommandType(
- operations_tmpl='azure.mgmt.policyinsights.operations.remediations_operations#RemediationsOperations.{}',
+ operations_tmpl='azure.mgmt.policyinsights.operations#RemediationsOperations.{}',
exception_handler=policy_insights_exception_handler
)
- with self.command_group('policy event', policy_events_sdk, client_factory=policy_events_operations) as g:
+ with self.command_group('policy event', policy_events_sdk, client_factory=policy_events_operations,
+ is_preview=True) as g:
g.custom_command('list', 'list_policy_events')
- with self.command_group('policy state', policy_states_sdk, client_factory=policy_states_operations) as g:
+ with self.command_group('policy state', policy_states_sdk, client_factory=policy_states_operations,
+ is_preview=True) as g:
g.custom_command('list', 'list_policy_states')
g.custom_command('summarize', 'summarize_policy_states')
with self.command_group('policy remediation', policy_remediations_sdk,
- client_factory=policy_remediations_operations) as g:
+ client_factory=policy_remediations_operations, is_preview=True) as g:
g.custom_show_command('show', 'get_policy_remediation')
g.custom_command('list', 'list_policy_remediations')
g.custom_command('delete', 'delete_policy_remediation')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/custom.py new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/custom.py
--- old/azure-cli-policyinsights-0.1.1/azure/cli/command_modules/policyinsights/custom.py 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure/cli/command_modules/policyinsights/custom.py 2019-06-13 23:17:47.000000000 +0200
@@ -3,10 +3,12 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
-from knack.util import CLIError
from msrestazure.tools import is_valid_resource_id, resource_id
+
from azure.cli.core.commands.client_factory import get_subscription_id
+from knack.util import CLIError
+
def list_policy_events(
cmd,
@@ -113,7 +115,8 @@
select_clause=None,
top_value=None,
filter_clause=None,
- apply_clause=None):
+ apply_clause=None,
+ expand_clause=None):
from azure.mgmt.policyinsights.models import QueryOptions
@@ -124,7 +127,8 @@
from_property=from_value,
to=to_value,
filter=filter_clause,
- apply=apply_clause)
+ apply=apply_clause,
+ expand=expand_clause)
policy_states_resource = 'latest'
if all_results is True:
@@ -424,7 +428,7 @@
policy_assignment_ids = [p.id for p in policy_assignments if p.name.lower() == policy_assignment.lower()]
if not policy_assignment_ids:
raise CLIError("No policy assignment with the name '{}' found.".format(policy_assignment))
- elif len(policy_assignment_ids) > 1:
+ if len(policy_assignment_ids) > 1:
raise CLIError("Multiple policy assignment with the name '{}' found. "
"Specify the policy assignment ID.".format(policy_assignment))
policy_assignment = policy_assignment_ids[0]
@@ -506,7 +510,7 @@
if management_group:
return "/providers/Microsoft.Management/managementGroups/{}".format(management_group)
- elif resource:
+ if resource:
return _build_resource_id(subscription, resource, resource_group_name,
namespace, resource_type_parent, resource_type)
return resource_id(subscription=subscription, resource_group=resource_group_name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure_cli_policyinsights.egg-info/PKG-INFO new/azure-cli-policyinsights-0.1.4/azure_cli_policyinsights.egg-info/PKG-INFO
--- old/azure-cli-policyinsights-0.1.1/azure_cli_policyinsights.egg-info/PKG-INFO 2019-02-12 03:05:47.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure_cli_policyinsights.egg-info/PKG-INFO 2019-06-13 23:17:58.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: azure-cli-policyinsights
-Version: 0.1.1
+Version: 0.1.4
Summary: Microsoft Azure Command-Line Tools Policy Insights Command Module
Home-page: https://github.com/Azure/azure-cli
Author: Microsoft Corporation
@@ -20,6 +20,18 @@
Release History
===============
+ 0.1.4
+ ++++++
+ * Minor fixes
+
+ 0.1.3
+ ++++++++++++++++++
+ * Add support for `--expand PolicyEvaluationDetails` to query policy evaluation details on the resource.
+
+ 0.1.2
+ ++++++++++++++++++
+ * Minor fixes
+
0.1.1
++++++++++++++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/azure_cli_policyinsights.egg-info/requires.txt new/azure-cli-policyinsights-0.1.4/azure_cli_policyinsights.egg-info/requires.txt
--- old/azure-cli-policyinsights-0.1.1/azure_cli_policyinsights.egg-info/requires.txt 2019-02-12 03:05:47.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/azure_cli_policyinsights.egg-info/requires.txt 2019-06-13 23:17:58.000000000 +0200
@@ -1,2 +1,2 @@
-azure-mgmt-policyinsights==0.2.0
+azure-mgmt-policyinsights==0.3.1
azure-cli-core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-policyinsights-0.1.1/setup.py new/azure-cli-policyinsights-0.1.4/setup.py
--- old/azure-cli-policyinsights-0.1.1/setup.py 2019-02-12 03:05:13.000000000 +0100
+++ new/azure-cli-policyinsights-0.1.4/setup.py 2019-06-13 23:17:47.000000000 +0200
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.1"
+VERSION = "0.1.4"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
@@ -33,7 +33,7 @@
]
DEPENDENCIES = [
- 'azure-mgmt-policyinsights==0.2.0',
+ 'azure-mgmt-policyinsights==0.3.1',
'azure-cli-core',
]