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
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:
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 forThis would then function in a similar way to hunter with prompts
The outcome would be that the
ports.em1.mac
for the network adapteronboard
for the serverc6420a-server1
Changes to Metalware
network
asset to a network inconfig/domain.yaml
(e.g. network assetprivate
linked toconfig.network.pri
)Changes to Repo
dhcp/default
to identify the MAC address from the asset instead of the hunter cacheconfig/domain.yaml
to identify the network interface from the node asset