No true. We need snap too. Its a triple although the names implies otherwise.

From: Victor Lowther [mailto:notifications@github.com]
Sent: Monday, December 16, 2013 10:31 PM Central Standard Time
To: crowbar/barclamp-crowbar <barclamp-crowbar@noreply.github.com>
Cc: Hirschfeld, Rob
Subject: Re: [barclamp-crowbar] Allow users to set MAC address in DHCP database when node is created AND deal w/ issues created when we changed the attribute system [1/5] (#808)


In crowbar_framework/app/controllers/node_roles_controller.rb:

> @@ -30,9 +30,19 @@ def index
>    end
>
>    def show
> +    if params.key? :node_id
> +      node = Node.find_key params[:node_id]
> +      raise "could not find node #{params[:node_id]}" unless node
> +      role = Role.find_key params[:id]
> +      raise "could not find role #{params[:id]}" unless role
> +      snap = node.deployment.head
> +      @node_role = NodeRole.snap_node_role(snap, node, role).first


Department of redundancy department, please pick up the white courtesy phone.

A node ID and a role ID are sufficient to uniquely locate any noderole, you do not need the snapshot.

—
Reply to this email directly or view it on GitHub<https://github.com/crowbar/barclamp-crowbar/pull/808/files#r8392307>.