This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

[Python] OrionSDK get all subnets Displayname by its Description

Hello, recently i managed to use the OrionSDK API to get available IP from subnets. Now i want to use the API to so i can list all the available subnets and get the Display name by its Description, however this is not an easy task. Are there anyone who can assist me in this, in python if possible.

Thanks in advance

Parents
  • This might be a starting point for you:

    from __future__ import print_function
    from orionsdk import SwisClient
    import requests

    requests.packages.urllib3.disable_warnings()

    npm_server = 'localhost'
    username = 'admin'
    password = 'solar123'
            
    swis = SwisClient(npm_server, username, password)
            
    results = swis.query('SELECT TOP 5 Address, CIDR, FriendlyName, VLAN FROM IPAM.Subnet')
    print(results)

    See also this discussion:

    Using custom SWQL to search for subnets

Reply
  • This might be a starting point for you:

    from __future__ import print_function
    from orionsdk import SwisClient
    import requests

    requests.packages.urllib3.disable_warnings()

    npm_server = 'localhost'
    username = 'admin'
    password = 'solar123'
            
    swis = SwisClient(npm_server, username, password)
            
    results = swis.query('SELECT TOP 5 Address, CIDR, FriendlyName, VLAN FROM IPAM.Subnet')
    print(results)

    See also this discussion:

    Using custom SWQL to search for subnets

Children
No Data