<s> import sys <EOL> from oslo_config import cfg <EOL> from oslo_service import service <EOL> from neutron . agent . common import config <EOL> from neutron . agent . dhcp import config as dhcp_config <EOL> from neutron . agent . linux import interface <EOL> from neutron . agent . metadata import config as metadata_config <EOL> from neutron . common import config as common_config <EOL> from neutron . common import topics <EOL> from neutron import service as neutron_service <EOL> def register_options ( conf ) : <EOL> config . register_interface_driver_opts_helper ( conf ) <EOL> config . register_agent_state_opts_helper ( conf ) <EOL> config . register_availability_zone_opts_helper ( conf ) <EOL> conf . register_opts ( dhcp_config . DHCP_AGENT_OPTS ) <EOL> conf . register_opts ( dhcp_config . DHCP_OPTS ) <EOL> conf . register_opts ( dhcp_config . DNSMASQ_OPTS ) <EOL> conf . register_opts ( metadata_config . DRIVER_OPTS ) <EOL> conf . register_opts ( metadata_config . SHARED_OPTS ) <EOL> conf . register_opts ( interface . OPTS ) <EOL> def main ( ) : <EOL> register_options ( cfg . CONF ) <EOL> common_config . init ( sys . argv [ <NUM_LIT:1> : ] ) <EOL> config . setup_logging ( ) <EOL> server = neutron_service . Service . create ( <EOL> binary = '<STR_LIT>' , <EOL> topic = topics . DHCP_AGENT , <EOL> report_interval = cfg . CONF . AGENT . report_interval , <EOL> manager = '<STR_LIT>' ) <EOL> service . launch ( cfg . CONF , server ) . wait ( ) </s>
