qds-sdk-py icon indicating copy to clipboard operation
qds-sdk-py copied to clipboard

Missing functionality in Scheduler class

Open rbarham opened this issue 9 years ago • 1 comments

I've noticed there are some missing features in some of the classes. For example, the qds_sdk.scheduler.Scheduler class doesn't have an edit/update or create method. I was able to pretty easily add this functionality to a class that extended "qds_sdk.scheduler.Scheduler".

class MyScheduler(Scheduler):
    def create(self):
        conn = Qubole.agent()
        return conn.post(Scheduler.rest_entity_path, self.attributes)

    def edit(self, args):
        conn = Qubole.agent()
        return conn.put(self.element_path(self.id), args)

It would be useful if this functionality exists in the SDK by default.

rbarham avatar Dec 11 '15 00:12 rbarham

Hey @rbarham,

Please feel free to send a PR. Otherwise we also get someone to look into it. cc - @vrajat

rohitagarwal003 avatar Dec 12 '15 00:12 rohitagarwal003