Skip to content

[Asset Tool] Hunt Mac Addresses for Assets #423

@ColonelPanics

Description

@ColonelPanics

This issue is not a modification to hunter but instead to implement a hunter-style tool which can be used to update asset details with MAC addresses.

The Idea

Ideally a command that can run like hunter (given a starting point which auto-increments as more data comes in). A preliminary idea of the data we'd like to put into the command is below:

metal asset tool hunter --servers 'c6420*'  --network_adapter 'onboard' --interface 'em1'

Where:

  • --servers is a regex match of server assets to iterate through
  • --network_adapter is the network adapter within the servers to use
  • --interface is the the interface name within the network_adapter asset to modify the MAC address for

This would then function in a similar way to hunter with prompts

Waiting for new nodes to appear on the network, please network boot them now...
(Ctrl-C to terminate)
Detected a machine on the network (52:54:00:78:02:01). Please enter the destination attribute:  |[c6420a-server1.network_adapters.onboard.ports.em1.mac]|

Detected a machine on the network (52:54:00:78:02:02). Please enter the destination attribute:  |[c6420a-server2.network_adapters.onboard.ports.em1.mac]|

The outcome would be that the ports.em1.mac for the network adapter onboard for the server c6420a-server1

Changes to Metalware

  • Metal asset hunter tool
  • Ability to link network asset to a network in config/domain.yaml (e.g. network asset private linked to config.network.pri)

Changes to Repo

  • Change dhcp/default to identify the MAC address from the asset instead of the hunter cache
  • Change to config/domain.yaml to identify the network interface from the node asset

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions