~allenap/maas/rpc-command-exceptions

Viewing all changes in revision 2945.

  • Committer: MaaS Lander
  • Author(s): Graham Binns
  • Date: 2014-09-10 14:50:48 UTC
  • mfrom: (2924.4.13 create-node-to-use-RPC)
  • Revision ID: maas_lander-20140910145048-ht9j8rx22x51m32k
[r=blake-rouse][bug=][author=gmb] Convert the create_node utility to use the CreateNode RPC call.

Previously, CreateNode didn't raise any errors. Now it raises a NodeAlreadyExists error if a node with one of the MACs passed to CreateNode is already registered.

The create_node utility function has been converted from a REST API-calling function to an RPC-calling one; the overall logic remains the same.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: