Parsing String

This is the place for queries that don't fit in any of the other categories.

Parsing String

Postby arunPython » Wed Dec 04, 2013 4:47 am


I need the parse the following string to get the IP Address and MAC Address from this string.

str="[VIF({'ovs_interfaceid': None, 'qbg_params': None, 'meta': {}, 'qbh_params': None, 'devname': u'tapf05cfdba-99', 'type': None, 'id': u'f05cfdba-991f-41ad-a247-bb0ea74ef99f', 'network': Network({'label': u'Vlan10', 'meta': {'tenant_id': u'7b60c129780841d7838cffa6b800b304', 'injected': False}, 'bridge': None, 'id': u'91e97ca2-d2ec-42e3-830f-3e30cd374c95', 'subnets': [Subnet({'version': 4, 'gateway': IP({'version': 4, 'meta': {}, 'type': 'gateway', 'address': u''}), 'meta': {'dhcp_server': u''}, 'dns': [], 'ips': [FixedIP({'version': 4, 'meta': {}, 'type': 'fixed', 'floating_ips': [], 'address': u''})], 'routes': [], 'cidr': u''})]}), 'address': u'44:44:44:58:c2:e7'})]"

Any help can be really appreciable.

Arun V
Last edited by micseydel on Wed Dec 04, 2013 5:12 am, edited 1 time in total.
Reason: First post lock.
Posts: 1
Joined: Wed Dec 04, 2013 4:41 am

Re: Parsing String

Postby micseydel » Wed Dec 04, 2013 5:14 am

Hello, and welcome to the forum. Read this post about what you need to include in your own posts: viewtopic.php?f=10&t=145
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot] and 5 guests