RFR: Support yaml metadata for actions and rules

* Add: Yaml support for actions and rules meta. Both yaml and yml extensions
are supported.
* Add: yaml, yml and json meta for sample action in fixtures for testing.
That's a python syntax error, you need to pass in a string to the function
:P

IIRC, something like '{}}' should throw  a parse / parser error
On Nov 7, 2014 2:00 PM, "Lakshmi Kannan" <notifications@github.com> wrote:

> In st2common/st2common/content/loader.py:
>
> > +
> > +        :rtype: ``dict``
> > +        """
> > +        file_name, file_ext = os.path.splitext(file_path)
> > +
> > +        if file_ext not in ALLOWED_EXTS:
> > +            raise Exception('Unsupported meta type %s, file %s. Allowed: %s' %
> > +                            (file_ext, file_path, ALLOWED_EXTS))
> > +
> > +        return self._load(PARSERS[file_ext], file_path)
> > +
> > +    def _load(self, parser, file_path):
> > +        with open(file_path, 'r') as fd:
> > +            try:
> > +                return parser.load(fd)
> > +            except ValueError:
>
> I don't think so. I grepped through pyyaml code and didn't find
> ParseError.
> https://gist.github.com/lakshmi-kannan/2fc1eb64c696ee4f01c2
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/StackStorm/st2/pull/781/files#r19995812>.
>