amotolani / fmc_collections

Ansible Collections for Cisco FMC API
6 stars 4 forks source link

Unable to create Access policy rule #4

Closed mabdelm closed 3 years ago

mabdelm commented 3 years ago

Internal Error An internal error occurred while processing your request Please try again.

dadelowo367 commented 3 years ago

@mabdelm Could you share more details about the error you are getting. i.e

mabdelm commented 3 years ago

return response[\"deviceList\"]\nTypeError: 'NoneType' object is not subscriptable\n" Mohamed AbdelmageedIBM Global technology ServicesIBM Egypt Branch Mobile: @.     ----- Original message -----From: dadelowo367 @.>To: amotolani/fmc_collections @.>Cc: mabdelm @.>, Mention @.***>Subject: [EXTERNAL] Re: [amotolani/fmc_collections] Unable to create Access policy rule (#4)Date: Thu, Jun 17, 2021 3:14 PM  @mabdelm Could you share more details about the error you are getting. i.e log snippets FMC API version etc.. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd   @mabdelm Could you share more details about the error you are getting.i.e log snippets FMC API version etc.. —You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.  

dadelowo367 commented 3 years ago

@mabdelm This seems like an issue with deploying changes on the FMC.

mabdelm commented 3 years ago

Dear    it is version 6.6 and i am using any module it gives the same    ailed: [10.64.250.200] (item={'name': 'vlan99', 'vlan_start': 1005, 'vlan_end': 1006}) => {    "ansible_loop_var": "item",    "changed": false,    "item": {        "name": "vlan99",        "vlan_end": 1006,        "vlan_start": 1005    },    "module_stderr": "INFO:root:Requesting new tokens from https://10.64.250.200/api/fmc_platform/v1/auth/generatetoken.\nINFO:root:Building base to URLs.\nINFO:root:Populating vdbVersion, sruVersion, serverVersion, and geoVersion FMC instance variables.\nINFO:root:This FMC's version is 6.6.1 (build 91)\nINFO:root:GET success. Object with name: \"vlan99\" and id: \"000C295A-4F3E-0ed3-0000-004295070518\" fetched from FMC.\nINFO:root:Waiting 15 seconds to allow the FMC to update the list of deployable devices.\nINFO:root:Getting a list of deployable devices.\nINFO:root:Adding device {'version': '1624178111637', 'name': 'GPX-FTD-HA', 'device': {'id': '7637bea0-f66c-11de-8b22-cfa7ed01fe4a', 'type': 'NGFW_HA', 'name': 'GPX-FTD-HA', 'keepLocalEvents': False}, 'deviceMembers': [{'id': '7637bea0-f66c-11de-8b22-cfa7ed01fe4a', 'type': 'SENSOR', 'name': 'GPX-FTD-01', 'keepLocalEvents': False}, {'id': 'ef79332a-a69b-11eb-b78f-ae6c3f5211e1', 'type': 'SENSOR', 'name': 'GPX-FTD-02', 'keepLocalEvents': False}], 'domain': {'uuid': 'e276abec-e0f2-11e3-8169-6d9ed49b625f', 'name': 'Global', 'id': 'e276abec-e0f2-11e3-8169-6d9ed49b625f', 'type': 'Domain'}, 'policyStatusList': [{'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974490', 'type': 'PG.PLATFORM.PixDhcpdPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974497', 'type': 'PG.PLATFORM.PixPIMPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974504', 'type': 'PG.PLATFORM.F1IPv6StaticRouteTablePage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974511', 'type': 'PG.PLATFORM.PixDhcpRelayPage'}, 'versionTimeStamp': 1613924261126, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974518', 'type': 'PG.PLATFORM.PixMroutePage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974525', 'type': 'PG.PLATFORM.PixRipPix72Page'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'TED-FTD-Platform Settings', 'id': '000C295A-4F3E-0ed3-0000-004294967421', 'type': 'PG.PLATFORM.NgfwPFSettings'}, 'versionTimeStamp': 1621773487233, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974363', 'type': 'PG.PLATFORM.PixInterface'}, 'versionTimeStamp': 1619487247447, 'trafficInterrupting': False}, {'upToDate': False, 'policy': {'name': 'GPX-ACP', 'id': '000C295A-4F3E-0ed3-0000-004294974167', 'type': 'PG.FIREWALL.NGFWAccessControlPolicy'}, 'referredPolicyList': [{'upToDate': True, 'policy': {'name': 'Default Prefilter Policy', 'id': '4897c8f4-e211-4661-b0a4-25b0826cded9', 'type': 'PG.FIREWALL.PrefilterPolicy'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '3bb2962c-418a-11eb-93c5-edd368341f0e', 'type': 'NetworkDiscovery'}, 'versionTimeStamp': 1617786803, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'Balanced Security and Connectivity', 'id': 'abba00a0-cf29-425c-9d75-49699aadc898', 'type': 'IntrusionPolicy'}, 'versionTimeStamp': 1621416236, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'No Rules Active', 'id': 'abba416e-3127-11da-9f4c-d463d19aa744', 'type': 'IntrusionPolicy'}, 'versionTimeStamp': 1621416236, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'MIC DNS Policy', 'id': 'dc906e6e-69ed-11e4-82ce-87dc73eef419', 'type': 'DNSPolicy'}, 'versionTimeStamp': 1616424624, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'MIC-NGIPS-Policy', 'id': 'fcd42ace-5fd9-11eb-b729-d5e1e9c2809b', 'type': 'IntrusionPolicy'}, 'versionTimeStamp': 1624039292, 'trafficInterrupting': False}], 'versionTimeStamp': 1624178111637, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974411', 'type': 'PG.PLATFORM.NgfwInlineSetPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': '.Template.4294974341', 'id': '000C295A-4F3E-0ed3-0000-004294974418', 'type': 'PG.TEMPLATE.TemplatePolicy'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974427', 'type': 'PG.PLATFORM.AsaBGPPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974434', 'type': 'PG.PLATFORM.PixDDnsPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974441', 'type': 'PG.PLATFORM.PixStaticRouteTablePage'}, 'versionTimeStamp': 1613644876005, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974448', 'type': 'PG.PLATFORM.PixMBoundaryPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974455', 'type': 'PG.PLATFORM.AsaOSPFv3Page'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974462', 'type': 'PG.PLATFORM.PixIGMPPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974469', 'type': 'PG.PLATFORM.AutomaticApplicationBypassPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974476', 'type': 'PG.PLATFORM.PixOSPFPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974483', 'type': 'PG.PLATFORM.NgfwVirtualRouterPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'GPX-FTD-HA', 'id': 'a370bcd4-a6f8-11eb-8ff4-b6f05aebad0b', 'type': 'NGFWHA'}, 'versionTimeStamp': 1619355190, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': 'deviceConfigurationId', 'type': 'DeviceConfiguration'}, 'referredPolicyList': [{'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974490', 'type': 'PG.PLATFORM.PixDhcpdPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974511', 'type': 'PG.PLATFORM.PixDhcpRelayPage'}, 'versionTimeStamp': 1613924261126, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974363', 'type': 'PG.PLATFORM.PixInterface'}, 'versionTimeStamp': 1619487247447, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974411', 'type': 'PG.PLATFORM.NgfwInlineSetPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974434', 'type': 'PG.PLATFORM.PixDDnsPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294974469', 'type': 'PG.PLATFORM.AutomaticApplicationBypassPage'}, 'versionTimeStamp': 1610959621358, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'GPX-FTD-HA', 'id': 'a370bcd4-a6f8-11eb-8ff4-b6f05aebad0b', 'type': 'NGFWHA'}, 'versionTimeStamp': 1619355190, 'trafficInterrupting': False}], 'versionTimeStamp': 0, 'trafficInterrupting': False}], 'canBeDeployed': True, 'upToDate': False, 'trafficInterruption': 'NO', 'type': 'DeployableDevice'} to deployment queue.\nINFO:root:Updating version to 1624178111637\nINFO:root:Adding device {'version': '1624178111637', 'name': 'TED-FTD-HA', 'device': {'id': '99dcc054-fa99-11de-a093-8d25f2a0532d', 'type': 'NGFW_HA', 'name': 'TED-FTD-HA', 'keepLocalEvents': False}, 'deviceMembers': [{'id': 'dd3c63a2-f77b-11de-a100-c2ee61a6e59a', 'type': 'SENSOR', 'name': 'TED-FTD-02', 'keepLocalEvents': False}, {'id': '99dcc054-fa99-11de-a093-8d25f2a0532d', 'type': 'SENSOR', 'name': 'TED-FTD-01', 'keepLocalEvents': False}], 'domain': {'uuid': 'e276abec-e0f2-11e3-8169-6d9ed49b625f', 'name': 'Global', 'id': 'e276abec-e0f2-11e3-8169-6d9ed49b625f', 'type': 'Domain'}, 'policyStatusList': [{'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968189', 'type': 'PG.PLATFORM.PixInterface'}, 'versionTimeStamp': 1618917959775, 'trafficInterrupting': False}, {'upToDate': False, 'policy': {'name': 'TED-ACP', 'id': '000C295A-4F3E-0ed3-0000-004294967299', 'type': 'PG.FIREWALL.NGFWAccessControlPolicy'}, 'referredPolicyList': [{'upToDate': True, 'policy': {'name': 'Default Prefilter Policy', 'id': '4897c8f4-e211-4661-b0a4-25b0826cded9', 'type': 'PG.FIREWALL.PrefilterPolicy'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '3bb2962c-418a-11eb-93c5-edd368341f0e', 'type': 'NetworkDiscovery'}, 'versionTimeStamp': 1617786803, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'Balanced Security and Connectivity', 'id': 'abba00a0-cf29-425c-9d75-49699aadc898', 'type': 'IntrusionPolicy'}, 'versionTimeStamp': 1621416236, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'No Rules Active', 'id': 'abba416e-3127-11da-9f4c-d463d19aa744', 'type': 'IntrusionPolicy'}, 'versionTimeStamp': 1621416236, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'MIC DNS Policy', 'id': 'dc906e6e-69ed-11e4-82ce-87dc73eef419', 'type': 'DNSPolicy'}, 'versionTimeStamp': 1616424624, 'trafficInterrupting': False}, {'upToDate': False, 'policy': {'name': 'MIC-NGIPS-Policy', 'id': 'fcd42ace-5fd9-11eb-b729-d5e1e9c2809b', 'type': 'IntrusionPolicy'}, 'versionTimeStamp': 1624039292, 'trafficInterrupting': False}], 'versionTimeStamp': 1623958171473, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968450', 'type': 'PG.PLATFORM.NgfwInlineSetPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': '.Template.4294967533', 'id': '000C295A-4F3E-0ed3-0000-004294968458', 'type': 'PG.TEMPLATE.TemplatePolicy'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968468', 'type': 'PG.PLATFORM.AsaBGPPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968476', 'type': 'PG.PLATFORM.PixDDnsPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968484', 'type': 'PG.PLATFORM.PixStaticRouteTablePage'}, 'versionTimeStamp': 1610451660189, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968492', 'type': 'PG.PLATFORM.PixMBoundaryPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968500', 'type': 'PG.PLATFORM.AsaOSPFv3Page'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968508', 'type': 'PG.PLATFORM.PixIGMPPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968516', 'type': 'PG.PLATFORM.AutomaticApplicationBypassPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968524', 'type': 'PG.PLATFORM.PixOSPFPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968532', 'type': 'PG.PLATFORM.NgfwVirtualRouterPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968540', 'type': 'PG.PLATFORM.PixDhcpdPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968548', 'type': 'PG.PLATFORM.PixPIMPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968556', 'type': 'PG.PLATFORM.F1IPv6StaticRouteTablePage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968564', 'type': 'PG.PLATFORM.PixDhcpRelayPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968572', 'type': 'PG.PLATFORM.PixMroutePage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968580', 'type': 'PG.PLATFORM.PixRipPix72Page'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'TED-FTD-Platform Settings', 'id': '000C295A-4F3E-0ed3-0000-004294967421', 'type': 'PG.PLATFORM.NgfwPFSettings'}, 'versionTimeStamp': 1621773487233, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'TED-FTD-HA', 'id': '0c29b75a-4397-11eb-a9c3-87dfe2be02f8', 'type': 'NGFWHA'}, 'versionTimeStamp': 1608559871, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': 'deviceConfigurationId', 'type': 'DeviceConfiguration'}, 'referredPolicyList': [{'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968189', 'type': 'PG.PLATFORM.PixInterface'}, 'versionTimeStamp': 1618917959775, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968450', 'type': 'PG.PLATFORM.NgfwInlineSetPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968476', 'type': 'PG.PLATFORM.PixDDnsPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968516', 'type': 'PG.PLATFORM.AutomaticApplicationBypassPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968540', 'type': 'PG.PLATFORM.PixDhcpdPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'id': '000C295A-4F3E-0ed3-0000-004294968564', 'type': 'PG.PLATFORM.PixDhcpRelayPage'}, 'versionTimeStamp': 1608546098082, 'trafficInterrupting': False}, {'upToDate': True, 'policy': {'name': 'TED-FTD-HA', 'id': '0c29b75a-4397-11eb-a9c3-87dfe2be02f8', 'type': 'NGFWHA'}, 'versionTimeStamp': 1608559871, 'trafficInterrupting': False}], 'versionTimeStamp': 0, 'trafficInterrupting': False}], 'canBeDeployed': True, 'upToDate': False, 'trafficInterruption': 'NO', 'type': 'DeployableDevice'} to deployment queue.\nINFO:root:Deploying changes to devices.\nERROR:root:Error in POST operation --> 500 Server Error: 500 for url: https://10.64.250.200/api/fmc_config/v1/domain/e276abec-e0f2-11e3-8169-6d9ed49b625f/deployment/deploymentrequests\nERROR:root:json_response -->\t{'error': {'category': 'VALIDATION', 'messages': [{'description': 'Errors or warnings present in Device committed policies:'}, {'description': 'All protocols must be the same when specifying both source and destination ports.', 'code': 'BASIC_RULE', 'location': 'deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, '}, {'description': 'All protocols must be the same when specifying both source and destination ports.', 'code': 'BASIC_RULE', 'location': 'deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, '}, {'description': 'All protocols must be the same when specifying both source and destination ports.', 'code': 'BASIC_RULE', 'location': 'deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, '}, {'description': 'All protocols must be the same when specifying both source and destination ports.', 'code': 'BASIC_RULE', 'location': 'deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, '}, {'description': 'No viable dest service for source port protocol: port32.', 'code': 'BASIC_RULE', 'location': 'deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, '}, {'description': 'No viable dest service for source port protocol: port32.', 'code': 'BASIC_RULE', 'location': 'deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, '}, {'description': 'No viable dest service for source port protocol: port32.', 'code': 'BASIC_RULE', 'location': 'deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, '}, {'description': 'No viable dest service for source port protocol: port32.', 'code': 'BASIC_RULE', 'location': 'deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, '}], 'severity': 'ERROR'}}\nTraceback (most recent call last):\n  File \"/home/devops/.ansible/tmp/ansible-local-8634ivhqq2sj/ansible-tmp-1624178127.3998675-8719-73617560386646/AnsiballZ_vlan.py\", line 102, in \n    _ansiballz_main()\n  File \"/home/devops/.ansible/tmp/ansible-local-8634ivhqq2sj/ansible-tmp-1624178127.3998675-8719-73617560386646/AnsiballZ_vlan.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/devops/.ansible/tmp/ansible-local-8634ivhqq2sj/ansible-tmp-1624178127.3998675-8719-73617560386646/AnsiballZ_vlan.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.vlan', init_globals=None, run_name='main', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_vlan_payload_lpxszrzp/ansible_vlan_payload.zip/ansible/modules/vlan.py\", line 216, in \n  File \"/tmp/ansible_vlan_payload_lpxszrzp/ansible_vlan_payload.zip/ansible/modules/vlan.py\", line 209, in main\n  File \"/home/devops/.local/lib/python3.6/site-packages/fmcapi/fmc.py\", line 156, in exit\n    tmp.post()\n  File \"/home/devops/.local/lib/python3.6/site-packages/fmcapi/api_objects/deployment_services/deploymentrequests.py\", line 66, in post\n    return response[\"deviceList\"]\nTypeError: 'NoneType' object is not subscriptable\n",    "module_stdout": "",    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",    "rc": 1}  Mohamed AbdelmageedIBM Global technology ServicesIBM Egypt Branch Mobile: @.     ----- Original message -----From: dadelowo367 @.>To: amotolani/fmc_collections @.>Cc: mabdelm @.>, Mention @.***>Subject: [EXTERNAL] Re: [amotolani/fmc_collections] Unable to create Access policy rule (#4)Date: Sun, Jun 20, 2021 11:01 AM  @mabdelm This seems like an issue with deploying changes on the FMC. Can you confirm the version of the collection you are using. Also share the module you are using, when you get this error Also share you FMC Version — ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd   @mabdelm This seems like an issue with deploying changes on the FMC. Can you confirm the version of the collection you are using. Also share the module you are using, when you get this error Also share you FMC Version —You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.  

mabdelm commented 3 years ago

Dear    Can you guide me how to collect facts regarding the cpu and memory i can't fin a module that do so through the fmc  Mohamed AbdelmageedIBM Global technology ServicesIBM Egypt Branch Mobile: @.     ----- Original message -----From: dadelowo367 @.>To: amotolani/fmc_collections @.>Cc: mabdelm @.>, Mention @.***>Subject: [EXTERNAL] Re: [amotolani/fmc_collections] Unable to create Access policy rule (#4)Date: Thu, Jun 17, 2021 3:14 PM  @mabdelm Could you share more details about the error you are getting. i.e log snippets FMC API version etc.. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd   @mabdelm Could you share more details about the error you are getting.i.e log snippets FMC API version etc.. —You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.  

dadelowo367 commented 3 years ago

@mabdelm There are some errors on the FMC Policies that is causing deployment to your devices fail.

Try to fix this validation errors and redploy.

Note that if you set auto_deploy to true on any of the ansible modules then it will fail because it will attempt to deploy to your devices and these validation errors will be returned from the FMC.

Unfortunately the Cisco FMC returns error 500 in many of these validation scenarios when it should return 400 ( Bad request)

INFO":"root":"Deploying changes to devices.\nERROR":"root":"Error in POST operation --> 500 Server Error":"500 for url":"https"::"root":"json_response -->\t"{
   "error":{
      "category":"VALIDATION",
      "messages":[
         {
            "description":"Errors or warnings present in Device committed policies:"
         },
         {
            "description":"All protocols must be the same when specifying both source and destination ports.",
            "code":"BASIC_RULE",
            "location":"deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, "
         },
         {
            "description":"All protocols must be the same when specifying both source and destination ports.",
            "code":"BASIC_RULE",
            "location":"deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, "
         },
         {
            "description":"All protocols must be the same when specifying both source and destination ports.",
            "code":"BASIC_RULE",
            "location":"deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, "
         },
         {
            "description":"All protocols must be the same when specifying both source and destination ports.",
            "code":"BASIC_RULE",
            "location":"deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, "
         },
         {
            "description":"No viable dest service for source port protocol: port32.",
            "code":"BASIC_RULE",
            "location":"deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, "
         },
         {
            "description":"No viable dest service for source port protocol: port32.",
            "code":"BASIC_RULE",
            "location":"deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, "
         },
         {
            "description":"No viable dest service for source port protocol: port32.",
            "code":"BASIC_RULE",
            "location":"deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, "
         },
         {
            "description":"No viable dest service for source port protocol: port32.",
            "code":"BASIC_RULE",
            "location":"deviceUUIDs : 99dcc054-fa99-11de-a093-8d25f2a0532d, deviceNames : TED-FTD-HA, policyType : null, policyName : TED-ACP, policyUUID : 000C295A-4F3E-0ed3-0000-004294967299, "
         }
      ],
      "severity":"ERROR"
   }
dadelowo367 commented 3 years ago

@mabdelm Hope You were able to resolve the issue. I will close the issue now. Feel free to open another issue if you have any problem using the collection

mabdelm commented 3 years ago

Dear    Please find my repo github.com/mabdelm/fmc cause there is a script that should be renamed in order to work fine i think the create port object as well as deleting security zone was not working take my updated python script to delete security zone i tested it . Mohamed AbdelmageedIBM Global technology ServicesIBM Egypt Branch Mobile: @.     ----- Original message -----From: dadelowo367 @.>To: amotolani/fmc_collections @.>Cc: mabdelm @.>, Mention @.***>Subject: [EXTERNAL] Re: [amotolani/fmc_collections] Unable to create Access policy rule (#4)Date: Thu, Jun 24, 2021 3:57 PM  @mabdelm Hope You were able to resolve the issue. I will close the issue now. Feel free to open another issue if you have any problem using the collection — You are receiving this because you were mentioned. Reply to this email directly, ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd   @mabdelm Hope You were able to resolve the issue. I will close the issue now. Feel free to open another issue if you have any problem using the collection —You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.