{"action":"created","issue":{"url":"https://api.github.com/repos/jedelman8/nxos-ansible/issues/18","labels_url":"https://api.github.com/repos/jedelman8/nxos-ansible/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/jedelman8/nxos-ansible/issues/18/comments","events_url":"https://api.github.com/repos/jedelman8/nxos-ansible/issues/18/events","html_url":"https://github.com/jedelman8/nxos-ansible/issues/18","id":101186708,"number":18,"title":"Issue with nxos_portchannel on Nexus 3K, ref issue #5","user":{"login":"RNanney","id":8551330,"avatar_url":"https://avatars.githubusercontent.com/u/8551330?v=3","gravatar_id":"","url":"https://api.github.com/users/RNanney","html_url":"https://github.com/RNanney","followers_url":"https://api.github.com/users/RNanney/followers","following_url":"https://api.github.com/users/RNanney/following{/other_user}","gists_url":"https://api.github.com/users/RNanney/gists{/gist_id}","starred_url":"https://api.github.com/users/RNanney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RNanney/subscriptions","organizations_url":"https://api.github.com/users/RNanney/orgs","repos_url":"https://api.github.com/users/RNanney/repos","events_url":"https://api.github.com/users/RNanney/events{/privacy}","received_events_url":"https://api.github.com/users/RNanney/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-15T16:00:03Z","updated_at":"2015-09-30T13:29:26Z","closed_at":null,"body":"Hello,\r\n\r\nI'm getting the following stack trace when trying to configure a port channel.\r\n\r\nhttp://pastebin.com/86gaXTYF\r\n\r\nI understand that the issues stems from the Nexus 3K not returning structured data, but it looks like you added code to account for that. However, the device.show() function is detecting the clierror and raising the exception before it gets back to feature_enabled function.\r\n\r\nI was able to play around with this and get a work around by adding the following code.\r\n\r\n        facts = get_facts(device)\r\n        platform = facts['platform']\r\n        n3k = platform[6] == '3'\r\n        if n3k:\r\n            data = device.show(command, text=True)\r\n            data_dict = xmltodict.parse(data[1])\r\n            table = data_dict['ins_api']['outputs']['output']\r\n            manual_list = table['body'].split('\\n')\r\n\r\nI think this is an ineffieient way of doing this because in my situation I will be sequencing through multiple interfaces which means facts will be gathered everytime.\r\n\r\nI wanted to get your thoughts on adding get_features_list() function to get_facts() and then modifying the nxos_portchannel module to accept a facts=true parameter to allow it to bypass the feature look up.  Then within the play I could do something like, \"when: lacp\" which would pull the value from the facts.\r\n\r\nThe main goal is to avoid doing this lookup everytime.\r\n\r\nPlease let me know your thoughts.\r\n\r\nKind regards,\r\nRobert"},"comment":{"url":"https://api.github.com/repos/jedelman8/nxos-ansible/issues/comments/144396571","html_url":"https://github.com/jedelman8/nxos-ansible/issues/18#issuecomment-144396571","issue_url":"https://api.github.com/repos/jedelman8/nxos-ansible/issues/18","id":144396571,"user":{"login":"jedelman8","id":6332586,"avatar_url":"https://avatars.githubusercontent.com/u/6332586?v=3","gravatar_id":"","url":"https://api.github.com/users/jedelman8","html_url":"https://github.com/jedelman8","followers_url":"https://api.github.com/users/jedelman8/followers","following_url":"https://api.github.com/users/jedelman8/following{/other_user}","gists_url":"https://api.github.com/users/jedelman8/gists{/gist_id}","starred_url":"https://api.github.com/users/jedelman8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedelman8/subscriptions","organizations_url":"https://api.github.com/users/jedelman8/orgs","repos_url":"https://api.github.com/users/jedelman8/repos","events_url":"https://api.github.com/users/jedelman8/events{/privacy}","received_events_url":"https://api.github.com/users/jedelman8/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T13:29:26Z","updated_at":"2015-09-30T13:29:26Z","body":"BTW, is your goal to not check to see if a feature is enabled and \"trust\" the user knows it is, to eliminate that API request?\r\n"}}