Esempio n. 1
0
def get_cron(context, **kwargs):
#    expect_keys = [
#        'project_id', 'id',
#    ]
#    utils.check_input_parameters(expect_keys, **kwargs)

    result = None
    id = kwargs['id']
    try:
        cron_ref = db.cron_get_by_id(context, id)
        result = cron_ref.to_dict()
    except Exception, exp:
        raise exception.GetCronFailed(msg=str(exp))
Esempio n. 2
0
 def test_table_create(self):
     self.truncate_all_tables()
     print "just a test"
     expect = db.cron_create(self.context, self.cron)
     actual = db.cron_get_by_id(self.context, expect.id)
     self.compare_records(expect, actual, skiped=['id'])