How to use the pypuppetdb.QueryBuilder.LessEqualOperator function in pypuppetdb

To help you get started, we’ve selected a few pypuppetdb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github voxpupuli / pypuppetdb / tests / test_querybuilder.py View on Github external
def test_less_equal_operator(self):
        assert str(LessEqualOperator("kernelmajversion", 4))\
            == '["<=", "kernelmajversion", 4]'
        assert str(LessEqualOperator("end_time", "2016-05-11T23:53:29.962Z"))\
            == '["<=", "end_time", "2016-05-11T23:53:29.962Z"]'
        assert str(LessEqualOperator(['parameter', 'version'], 4.0))\
            == '["<=", ["parameter", "version"], 4.0]'
        assert str(LessEqualOperator("report_timestamp",
                                     datetime.datetime(2016, 6, 11)))\
            == '["<=", "report_timestamp", "2016-06-11 00:00:00"]'
github voxpupuli / pypuppetdb / tests / test_querybuilder.py View on Github external
def test_less_equal_operator(self):
        assert str(LessEqualOperator("kernelmajversion", 4))\
            == '["<=", "kernelmajversion", 4]'
        assert str(LessEqualOperator("end_time", "2016-05-11T23:53:29.962Z"))\
            == '["<=", "end_time", "2016-05-11T23:53:29.962Z"]'
        assert str(LessEqualOperator(['parameter', 'version'], 4.0))\
            == '["<=", ["parameter", "version"], 4.0]'
        assert str(LessEqualOperator("report_timestamp",
                                     datetime.datetime(2016, 6, 11)))\
            == '["<=", "report_timestamp", "2016-06-11 00:00:00"]'
github voxpupuli / pypuppetdb / tests / test_querybuilder.py View on Github external
def test_less_equal_operator(self):
        assert str(LessEqualOperator("kernelmajversion", 4))\
            == '["<=", "kernelmajversion", 4]'
        assert str(LessEqualOperator("end_time", "2016-05-11T23:53:29.962Z"))\
            == '["<=", "end_time", "2016-05-11T23:53:29.962Z"]'
        assert str(LessEqualOperator(['parameter', 'version'], 4.0))\
            == '["<=", ["parameter", "version"], 4.0]'
        assert str(LessEqualOperator("report_timestamp",
                                     datetime.datetime(2016, 6, 11)))\
            == '["<=", "report_timestamp", "2016-06-11 00:00:00"]'
github voxpupuli / pypuppetdb / tests / test_querybuilder.py View on Github external
def test_less_equal_operator(self):
        assert str(LessEqualOperator("kernelmajversion", 4))\
            == '["<=", "kernelmajversion", 4]'
        assert str(LessEqualOperator("end_time", "2016-05-11T23:53:29.962Z"))\
            == '["<=", "end_time", "2016-05-11T23:53:29.962Z"]'
        assert str(LessEqualOperator(['parameter', 'version'], 4.0))\
            == '["<=", ["parameter", "version"], 4.0]'
        assert str(LessEqualOperator("report_timestamp",
                                     datetime.datetime(2016, 6, 11)))\
            == '["<=", "report_timestamp", "2016-06-11 00:00:00"]'
github voxpupuli / pypuppetdb / pypuppetdb / QueryBuilder.py View on Github external
def __init__(self, field, value):
        super(LessEqualOperator, self).__init__("<=", field, value)