Here is the list of early comments which I got on the confluence page (Thanks to Jon and Al for providing their comments) -
In interface 4, be sure to add that calling pbs.event().reject() will not stop the server periodic hook from executing in the next frequency cycle.
In interface 5, you don’t need to create interface “create_node”, “create_reservation”, “scheduling”. You can just make use of existing: pbs.server().vnode(<new_vnode_name>), pbs.server().resv(<new_reservation>), and something like pbs.scheduling_cyle(). Note that we current have something like pbs.scheduler_restart_cycle().
Or you can actually do something like pbs.server().set_scheduling(True|False)
Same with interface 8, just make use of existing pbs.server().vnode() for defining a new node. Node here is just the natural vnode.
So the interface could look like:
vn = pbs.server().vnode(<new_vnode_name>) ← return a new vnode object to hang off of local pbs server.
Now populate the vnode object with values:
Same with reservation:
rv = pbs.server().resv() ← returns an reservation object to hang off the local pbs server.
Populate the reservation object:
Thanks for all your comments AL!
I’ve made changes to Interface 4 and changed the interface scheduling to set_scheduling.
I added new create_vnode, create_reservation interfaces specifically because pbs.server().vnode() can also be used to search for an existing vnode and if the vnode is not existing it can throw an exception/error. But if we use it to create a vnode as well then it will never throw an error thinking that it’s been called for a new vnode.
What do you think?
I agree with your assessment and would not want to lose the capability of throwing an error if the object (vnode in this case) does not exist. However, I would propose that we don’t use create_* for each object that we want to add to the server. Instead, I would think that if we added two new methods called pbs.server().add() and pbs.server().remove(). These methods could add/remove a node, job, queue, reservation, custom resource, etc object to the server. This would allow us to present two simple methods to add and remove objects from the server. Thoughts?