Filter functionality

Added filter passing for compute client, used default configs/filter.yaml
I think that we can extend this action for filtering volumes, images and
other resources

On Thu, Dec 18, 2014 at 2:22 PM, Dmitry <notifications@github.com> wrote:

> In cloudferrylib/os/actions/get_filter.py
> <https://github.com/MirantisWorkloadMobility/CloudFerry/pull/65#discussion-diff-22035772>
> :
>
> > +
> > +from cloudferrylib.base.action import action
> > +from cloudferrylib.utils import utils as utl
> > +
> > +
> > +class GetFilter(action.Action):
> > +
> > +    def run(self, **kwargs):
> > +        search_opts = None
> > +        if utl.get_filter_config(utl.FILTER_PATH):
> > +            filter_config = utl.get_filter_config(utl.FILTER_PATH)
> > +            if utl.INSTANCES_TYPE in filter_config:
> > +                search_opts = filter_config[utl.INSTANCES_TYPE]
> > +        return {
> > +            'search_opts': search_opts
> > +        }
>
> Стоило создавать отдельный экшн? ты мог бы дописать GetInfoInstances чтобы
> он читал серч оптс из конфига
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/MirantisWorkloadMobility/CloudFerry/pull/65/files#r22035772>
> .
>



-- 
Anton Samoylov,
DevOps Engineer, Mirantis, Inc.
asamoylov@mirantis.com