puppetlabs/razor-server — pull request #99 by ChrisPortman (2013-11-18 01:07:10+00:00)
Title: Add a delete-policy command

Adding a command to delete policies.
razor delete-policy --name

Database:
- Added a 'bound' field to the nodes table. This will be the authoritative indicator as to whether or not a node is bound. Nodes can be bound without a policy (although they still need a policy to apply at some point to become bound)

- Created migrate script 004 which adds this field. The field defaults to false, but to ensure consistency, the migrate script will set it to true for any node that currently has a policy.

Behaviour:
- Deleting a policy will:
> Disassociate any tags from the policy
> Disassociate any nodes from the policy
> Destroy the policy.

- Booting a node:
> If the node is bound and has a policy, the installer from the policy will dictate the boot action.
> If the node is bound but has no policy (it has been deleted), the noop installer will be applied, forcing a local boot.
> If the node is not bound (bound = false) boot the micro kernel and wait for a policy.

Views:
- nodes:
> Now shows the IP and hostname in the nodes list.

- nodes :
> Shows the value of bound (True | False) if the policy is not set, shows a message for policy stating that the policy has been deleted of changed such that no longer matches (future).

Note: This is to replace Pull request #95 that had a heap of issues... Hopefully this one is better :)

Thanks,
Chris