<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: yang module for interfaces in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/yang-module-for-interfaces/m-p/4744332#M901</link>
    <description>&lt;P&gt;you can use python if that work for you ?&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2022 04:21:18 GMT</pubDate>
    <dc:creator>balaji.bandi</dc:creator>
    <dc:date>2022-12-23T04:21:18Z</dc:date>
    <item>
      <title>yang module for interfaces</title>
      <link>https://community.cisco.com/t5/controllers/yang-module-for-interfaces/m-p/4744254#M900</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm new to network programmability. I am wondering is there a module that can provide the information same as "show ip interface brief" meaning interface names and ip addresses. The module I have been referencing to provides unwanted detail:&lt;/P&gt;&lt;P&gt;Cisco-IOS-XE-interfaces-oper:interfaces&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Qamber&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 21:56:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/yang-module-for-interfaces/m-p/4744254#M900</guid>
      <dc:creator>sqambera</dc:creator>
      <dc:date>2022-12-22T21:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: yang module for interfaces</title>
      <link>https://community.cisco.com/t5/controllers/yang-module-for-interfaces/m-p/4744332#M901</link>
      <description>&lt;P&gt;you can use python if that work for you ?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 04:21:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/yang-module-for-interfaces/m-p/4744332#M901</guid>
      <dc:creator>balaji.bandi</dc:creator>
      <dc:date>2022-12-23T04:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: yang module for interfaces</title>
      <link>https://community.cisco.com/t5/controllers/yang-module-for-interfaces/m-p/4744416#M902</link>
      <description>&lt;P&gt;Try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# import requests, jason and sys
import requests
import json
import sys

#device details    
HOST = 'ios-xe-mgmt-latest.cisco.com'
PORT = 443
USER = 'developer'
PASS = 'C1sco12345'

# disable urlib3 warning
requests.packages.urllib3.disable_warnings()

#main function using restconf to show the status of device interface and print results in json
def main():
    # create a main function using restconf
    url = "https://{}:{}@{}:{}/restconf/data/ietf-interfaces:interfaces".format(USER, PASS, HOST, PORT)
    headers = {'Content-Type': 'application/yang-data+json'}
    response = requests.get(url, headers=headers, verify=False)
    print(response.status_code)
    # print the results in json format
    print(json.dumps(response.json(), indent=4))


# Call the function main() and exit giving the system the return code that is the result of main()
if __name__ == '__main__':
    sys.exit(main())&lt;/LI-CODE&gt;&lt;P&gt;Will print the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;❯ {
∙     "ietf-interfaces:interfaces": {
∙         "interface": [
∙             {
∙                 "name": "GigabitEthernet1",
∙                 "description": "MANAGEMENT INTERFACE - DON'T TOUCH ME",
∙                 "type": "iana-if-type:ethernetCsmacd",
∙                 "enabled": true,
∙                 "ietf-ip:ipv4": {
∙                     "address": [
∙                         {
∙                             "ip": "10.10.20.48",
∙                             "netmask": "255.255.255.0"
∙                         }
∙                     ]
∙                 }
[snip]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 07:48:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/yang-module-for-interfaces/m-p/4744416#M902</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2022-12-23T07:48:55Z</dc:date>
    </item>
  </channel>
</rss>

