-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RestPy:Fastest way to get ipv4 object associated with a specific Ip? #55
Comments
Hi Varghese,
Others can chime in here. But I don’t think we have anything like that today. We are considering some ideas, but haven’t figured out how to make this work as yet.
The issue is in most cases the “address” is a multi-value pattern, and not a simple address. It could be a range of values. The pattern used to create the list of addresses doesn’t have to be contiguous, and can even be random. So there is no single “object” with that specific address. This is how IxNetwork is able to scale greatly. There may be an object associated with the address, but finding it is not as easy as “find()”. The find may be a very slow process as it would have to explode the pattern of addresses to the complete list represented by the pattern, and then search, which could take a very long time to execute, as there could be thousands or more of addresses.
What is the use case for finding an object with a specific address?
Thanks,
Wes
Wesley Hand
m: 818-312-6752
From: varghese muthalaly <notifications@github.com>
Sent: Tuesday, April 23, 2019 7:49 PM
To: OpenIxia/IxNetwork <IxNetwork@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [OpenIxia/IxNetwork] RestPy:Fastest way to get ipv4 object associated with a specific Ip? (#55)
[EXTERNAL]
Hi Folks,
Is there a short and fast way to get the ipv4 object associated with an ipv4 or ipv6 address if we have the address?
I am looking to see if you have something below.
IxNetwork.Topology.DeviceGroup.Ethernet.Ipv4.find(Value = '2.2.2.2')
Note: there could be an iterator so it could be a list of ips also and not a single value.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOpenIxia%2FIxNetwork%2Fissues%2F55&data=02%7C01%7C%7C18842d25f3f245f6a19608d6c8464d25%7C63545f2732324d74a44dcdd457063402%7C1%7C0%7C636916601610046512&sdata=y1LaGHc9LABV1Toz9QiB3VTKMQDSZ9Fz5pE8asO2rN4%3D&reserved=0>, or mute the thread<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGJXMDGIHYP2AUX7ASX7JTDPR6N73ANCNFSM4HH7HTMQ&data=02%7C01%7C%7C18842d25f3f245f6a19608d6c8464d25%7C63545f2732324d74a44dcdd457063402%7C1%7C0%7C636916601610046512&sdata=9nQxSLa7%2FPTp9RremM9PEMX%2FcoYb6Afea6L68GhOlsA%3D&reserved=0>.
|
Hi Wes, Secondly,
|
Hi Vargese,
This may be possible for the example given, as this use case is using the list pattern where each address is explicitly called out.
However, there are other patterns where the list is implied.
The solution would need to be built around a general case that supports all available patterns.
We are working on possible solutions for the general case. Will let you know if we come up with something.
Thanks for your inputs.
Thanks,
Wes
Sent via the Samsung Galaxy S8+, please excuse typos.
…-------- Original message --------
From: varghese muthalaly <notifications@github.com>
Date: 4/24/19 5:09 PM (GMT-05:00)
To: OpenIxia/IxNetwork <IxNetwork@noreply.github.com>
Cc: Wesley Hand <wesley.hand@keysight.com>, Comment <comment@noreply.github.com>
Subject: Re: [OpenIxia/IxNetwork] RestPy:Fastest way to get ipv4 object associated with a specific Ip? (#55)
[EXTERNAL]
Hi Wes,
The use case in my scenario is that I within our test scripts for certain triggers, we would need to find the object(s) associated with an ip(s) to start or stop that specific device or send an arp/ns etc. Thsi is basically mimicking what we have available and perform routinely on the IxNetwork GUI client.
Secondly,
You do have the Values under the iterator(multivalue Object) assigned to a specific attribute under the Address reference Object right? So should'nt there be a way to get this implemented then?
ipObject.href
u'/api/v1/sessions/11/ixnetwork/topology/5/deviceGroup/2/ethernet/1/ipv4/1'
ipObject.Address.Values
[u'56.28.0.12', u'56.28.0.13', u'56.28.0.14', u'56.28.0.15', u'56.28.0.16', u'56.28.0.17', u'56.28.0.18', u'56.28.0.19', u'56.28.0.20', u'56.28.0.21']
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOpenIxia%2FIxNetwork%2Fissues%2F55%23issuecomment-486427210&data=02%7C01%7C%7C79af6bd5147f45697a2008d6c8f91849%7C63545f2732324d74a44dcdd457063402%7C1%7C0%7C636917369515210993&sdata=Abr8c5uRUzDnWV8AiIkI%2BoL4EPrs9gNYOSg4FZzqCyA%3D&reserved=0>, or mute the thread<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGJXMDE3ASXO4NZYR3FLLWLPSDD7LANCNFSM4HH7HTMQ&data=02%7C01%7C%7C79af6bd5147f45697a2008d6c8f91849%7C63545f2732324d74a44dcdd457063402%7C1%7C0%7C636917369515220993&sdata=J0f7mDjnlPwwKuCIgkfinOb%2Bc2%2F4jJgCEKm8EsSta4Y%3D&reserved=0>.
|
We currently do not support this methodology for finding instances as parent instances are required at this time. |
Thanks Wes,Andy. Secondly. Is there any other way we can get this object? Seems like without having a reference parent object stored in some data structure that is maintained throughout the script life cycle, we can't query individual objects? |
You can get this object by specifying the find for all parent objects. ipv4 = Topology.find(Name='A'),DeviceGroup.find(Name='B').Ethernet.find(Name='C').Ipv4.find(Name='D') |
Hi Andy, |
Hi Folks,
Is there a short and fast way to get the ipv4 object associated with an ipv4 or ipv6 address if we have the address?
I am looking to see if you have something below.
IxNetwork.Topology.DeviceGroup.Ethernet.Ipv4.find(Value = '2.2.2.2')
Note: there could be an iterator so it could be a list of ips also and not a single value.
The text was updated successfully, but these errors were encountered: