mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Add 'firmwarenone' ip method
Add a seting to allow user to suppress all DHCP offer during PXE/HTTP activity. This enables configurations where users want to externally manage filename explicitly in their own dhcp configuration.
This commit is contained in:
parent
8de7402b56
commit
88b741e026
@ -473,8 +473,10 @@ node = {
|
||||
'description': 'Whether to use static or dhcp when configuring this '
|
||||
'interface for IPv4. "firmwaredhcp" means to defer to '
|
||||
'external DHCP server during firmware execution, but '
|
||||
'use static for OS',
|
||||
'validvalues': ('dhcp', 'static', 'firmwaredhcp', 'none')
|
||||
'use static for OS. "firmwarenone" means to suppress '
|
||||
'even the no-IP dhcp offers, to fully delegate to an external
|
||||
'dhcp/pxe configuration, even for confluent deployment.',
|
||||
'validvalues': ('dhcp', 'static', 'firmwaredhcp', 'firmwarenone', 'none')
|
||||
},
|
||||
'net.ipv4_gateway': {
|
||||
'description': 'The IPv4 gateway to use if applicable. As is the '
|
||||
@ -493,8 +495,10 @@ node = {
|
||||
'description': 'Whether to use static or dhcp when configuring this '
|
||||
'interface for IPv6. "firmwaredhcp" means to defer to '
|
||||
'external DHCP server during firmware execution, but '
|
||||
'use static for OS',
|
||||
'validvalues': ('dhcp', 'static', 'firmwaredhcp', 'none')
|
||||
'use static for OS. "firmwarenone" means to suppress '
|
||||
'even the no-IP dhcp offers, to fully delegate to an external
|
||||
'dhcp/pxe configuration, even for confluent deployment',
|
||||
'validvalues': ('dhcp', 'static', 'firmwaredhcp', 'firmwarenone', 'none')
|
||||
},
|
||||
'net.ipv6_gateway': {
|
||||
'description': 'The IPv6 gateway to use if applicable. As is the '
|
||||
|
@ -583,6 +583,8 @@ def reply_dhcp6(node, addr, cfg, packet, cfd, profile, sock):
|
||||
if not isinstance(bootfile, bytes):
|
||||
bootfile = bootfile.encode('utf8')
|
||||
ipass = []
|
||||
if ipv6method == 'firmwarenone:'
|
||||
return
|
||||
if ipv6method not in ('dhcp', 'firmwaredhcp') and ipv6addr:
|
||||
if not ipv6prefix:
|
||||
log.log({'info': 'Unable to determine prefix to serve to address {} for node {}'.format(ipv6addr, node)})
|
||||
@ -680,6 +682,8 @@ def reply_dhcp4(node, info, packet, cfg, reqview, httpboot, cfd, profile):
|
||||
log.log({'error': 'Skipping boot reply to {0} due to no viable IPv4 configuration on deployment system'.format(node)})
|
||||
return
|
||||
clipn = None
|
||||
if niccfg['ipv4_method'] == 'firmwarenone':
|
||||
return
|
||||
if niccfg['ipv4_address'] and niccfg['ipv4_method'] != 'firmwaredhcp':
|
||||
clipn = socket.inet_aton(niccfg['ipv4_address'])
|
||||
repview[16:20] = clipn
|
||||
|
Loading…
Reference in New Issue
Block a user