Skip to content

Commit 7eb7fff

Browse files
committed
updated to use PolicyContentFormat from SDK
1 parent d153e1b commit 7eb7fff

File tree

1 file changed

+2
-9
lines changed
  • src/azure-cli/azure/cli/command_modules/apim

1 file changed

+2
-9
lines changed

src/azure-cli/azure/cli/command_modules/apim/_params.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
resource_group_name_type,
1313
get_three_state_flag)
1414

15-
from azure.mgmt.apimanagement.models import (SkuType, VirtualNetworkType, Protocol, ApiType, ProductState)
15+
from azure.mgmt.apimanagement.models import (SkuType, VirtualNetworkType, Protocol, ApiType, ProductState, PolicyContentFormat)
1616
from azure.cli.command_modules.apim.actions import (TemplateParameter)
1717

1818

@@ -44,13 +44,6 @@ class ExportFormat(Enum):
4444
WsdlUrl = "WsdlUrl"
4545

4646

47-
class PolicyImportFormat(Enum):
48-
RawXml = "rawxml"
49-
RawXmlLink = "rawxml-link"
50-
Xml = "xml"
51-
XmlLink = "xml-link"
52-
53-
5447
def load_arguments(self, _):
5548

5649
# REUSABLE ARGUMENT DEFINITIONS
@@ -325,7 +318,7 @@ def load_arguments(self, _):
325318
c.argument('api_id', arg_type=api_id)
326319
c.argument('operation_id', help='Operation identifier within an API. Must be unique in the current API Management service instance.')
327320
c.argument('specification_path', help='Contents of the Policy as defined by the format.')
328-
c.argument('policy_format', arg_type=get_enum_type(PolicyImportFormat), help='Format of the policy content.')
321+
c.argument('policy_format', arg_type=get_enum_type(PolicyContentFormat), help='Format of the policy content.')
329322
c.argument('policy_id', help='Policy identifier within an API. Must be unique in the current API context.')
330323

331324
with self.argument_context('apim policy show') as c:

0 commit comments

Comments
 (0)