GET'>
PUT'>
POST'>
DELETE'>
'>
'>
]>
The Extra DHCP Options Extension (extra-dhcp-opt)The Neutron DHCP options extension allows adding DHCP options that are associated to a
Neutron Port. They are tagged such that they can be associated from the hosts file to
designate a specific network interface and port. The DHCP tag scheme used to associate
options to the host files is the port_id (UUID - in the form of 8-4-4-4-12 for a total of 36
characters), these associate options to a Neutron Port and its network. The Dynamic Host
Configuration Protocol (DHCP) provides a framework for passing configuration information to
hosts on a TCP/IP network. Configuration parameters and other information are carried in
tagged data items that are stored in the 'options' field of the DHCP message.You can specify a DHCP options when defining or updating a Port by specifying the
extra_dhcp_opts tag and providing its options as name value pairs e.g.
opt_name='bootfile-name', opt_value='pxelinux.0'.ConceptsThe extra-dhcp-opt extension is an attribute extension which adds the following set of
attributes to the port resource: extra-dhcp-opt:opt_name - Specified
the DHCP option that this is defined as mapped to this port resource.
Examples are bootfile-name,
server-ip-address, tftp-server,
etc.. extra-dhcp-opt:opt_value - Identifies
the value associated with the opt_name. These are handled in opt_name,
opt_value pairs only. value_opt can be any text string depending upon the
name.The actual semantics of extra-dhcp-opt attributes depend on the name of the dhcp
option being used that defines the vendor extension to DHCP. For example reference RFC:
http://tools.ietf.org/html/rfc2132, contains specific detail on BOOTP Vendor Extensions.Port API operations with extra-dhcp-opt port extensionThis section discusses operations for setting and retrieving the extra-dhcp-opt port
extension attributes for port objects.List Ports
Verb
URI
Description
&GET;
/ports
Returns a list of ports with their attributes.
Normal Response Code: 200 OKError Response Codes: 401 UnauthorizedThis operation returns, all the ports defined in Neutron that this user has
access to.List Ports with extra_dhcp_opts: JSON ResponseShow Port
Verb
URI
Description
&GET;
/ports/port_id
Returns details about a specific port, including extra-dhcp-opt
attributes.
Normal Response Code: 200 OKError Response Code: 401 Unauthorized, 404 Not FoundThis operation returns, for the port specified in the request URI, its port
attributes, including the extra_dhcp_opts attributes.Show port with extra-dhcp-opt attributes: JSON ResponseCreate Port
Verb
URI
Description
&POST;
/ports
Create a new port and explicitly specify attributes with the
extra-dhcp-opt extension attributes.
Normal Response Code: 200 OKError Response Code: 401 Unauthorized.This operation returns, for the port specified in the request URI, its port
attributes, including the extra_dhcp_opts attributes.Create port with extra-dhcp-opt attributes: JSON RequestCreate port with extra-dhcp-opt attributes: JSON ResponseUpdate Port
Verb
URI
Description
&PUT;
/ports/port_id
Updates a port's attributes, including extra_dhcp_opts extension
attributes.
Normal Response Code: 200 OKError Response Code: 401 Unauthorized.This operation allow for the updating of attributes for the port specified in the
request URI, its port attributes, including the extra_dhcp_opts attributes.Update port with extra-dhcp-opt attributes: JSON RequestUpdate port with extra-dhcp-opt attributes: JSON Response