Skip to content

Instantly share code, notes, and snippets.

@apanda
Created July 26, 2015 08:29
Show Gist options
  • Save apanda/73d8651b6bfd65a8d3ba to your computer and use it in GitHub Desktop.
Save apanda/73d8651b6bfd65a8d3ba to your computer and use it in GitHub Desktop.
In [35]: class NF(yaml.YAMLObject):
yaml_tag=u'tag:yaml.org,2002:nf'
def __init__(self):
pass
....:
In [36]: class Softnic(yaml.YAMLObject):
yaml_tag=u'tag:yaml.org,2002:softnic'
def __init__(self):
pass
....:
In [37]: x = yaml.load(a)
In [38]: x['requests'][0].argument
Out[38]: {'cores': [0]}
In [39]: x['requests'][1].argument
Out[39]: {'arguments': ['-e'], 'cores': [1], 'name': 'firewall', 'nfid': 1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment