Пример #1
0
 def __init__(self, zhcp, name, vlan):
     self._utils = utils.zvmUtils()
     self._utils.add_vswitch(zhcp,
                             name,
                             getattr(CONF.get(name), "rdev_list"),
                             vid=vlan)
     self.zhcp = zhcp
Пример #2
0
 def setUp(self):
     super(TestZVMUtils, self).setUp()
     self.addCleanup(cfg.CONF.reset)
     cfg.CONF.set_override('zvm_xcat_username', self._FAKE_XCAT_USER,
                             group='AGENT')
     cfg.CONF.set_override('zvm_xcat_password', self._FAKE_XCAT_PW,
                             group='AGENT')
     with mock.patch(
         'neutron.plugins.zvm.common.utils.zvmUtils._get_xcat_node_name',
             mock.Mock(return_value=self._FAKE_XCAT_NODENAME)):
         self._utils = utils.zvmUtils()
Пример #3
0
 def setUp(self):
     super(TestZVMUtils, self).setUp()
     self.addCleanup(cfg.CONF.reset)
     cfg.CONF.set_override('zvm_xcat_username',
                           self._FAKE_XCAT_USER,
                           group='AGENT')
     cfg.CONF.set_override('zvm_xcat_password',
                           self._FAKE_XCAT_PW,
                           group='AGENT')
     with mock.patch(
             'neutron.plugins.zvm.common.utils.zvmUtils._get_xcat_node_name',
             mock.Mock(return_value=self._FAKE_XCAT_NODENAME)):
         self._utils = utils.zvmUtils()
    def __init__(self):
        super(zvmNeutronAgent, self).__init__()
        self._utils = utils.zvmUtils()
        self._polling_interval = cfg.CONF.AGENT.polling_interval
        self._zhcp_node = cfg.CONF.AGENT.xcat_zhcp_nodename
        self._host = cfg.CONF.AGENT.zvm_host

        zvm_net = zvm_network.zvmNetwork()
        self.agent_state = {
            'binary': 'neutron-zvm-agent',
            'host': self._host,
            'topic': q_const.L2_AGENT_TOPIC,
            'configurations': {'vswitch_mappings': zvm_net.get_network_maps()},
            'agent_type': q_const.AGENT_TYPE_ZVM,
            'start_flag': True}
        self._setup_server_rpc()
        self._zhcp_userid = self._utils.get_zhcp_userid(self._zhcp_node)
        self._restart_handler = self._handle_restart()
Пример #5
0
    def __init__(self):
        super(zvmNeutronAgent, self).__init__()
        self._requesthandler = utils.zVMConnectorRequestHandler()
        self._utils = utils.zvmUtils()
        self._polling_interval = CONF.AGENT.polling_interval
        self._host = self._requesthandler.call('host_get_info').get(
                                        'zvm_host') or CONF.host
        self._port_map = {}

        zvm_net = zvm_network.zvmNetwork()
        self.agent_state = {
            'binary': 'neutron-zvm-agent',
            'host': self._host,
            'topic': q_const.L2_AGENT_TOPIC,
            'configurations': {'vswitch_mappings': zvm_net.get_network_maps()},
            'agent_type': mech_zvm.AGENT_TYPE_ZVM,
            'start_flag': True}
        self._setup_server_rpc()
        self._restart_handler = self._handle_restart()
Пример #6
0
    def __init__(self):
        super(zvmNeutronAgent, self).__init__()
        self._requesthandler = utils.zVMConnectorRequestHandler()
        self._utils = utils.zvmUtils()
        self._polling_interval = CONF.AGENT.polling_interval
        self._host = self._requesthandler.call('host_get_info').get(
            'zvm_host') or CONF.host
        self._port_map = {}

        zvm_net = zvm_network.zvmNetwork()
        self.agent_state = {
            'binary': 'neutron-zvm-agent',
            'host': self._host,
            'topic': q_const.L2_AGENT_TOPIC,
            'configurations': {
                'vswitch_mappings': zvm_net.get_network_maps()
            },
            'agent_type': mech_zvm.AGENT_TYPE_ZVM,
            'start_flag': True
        }
        self._setup_server_rpc()
        self._restart_handler = self._handle_restart()
Пример #7
0
 def __init__(self):
     self._utils = utils.zvmUtils()
     self._zhcp = CONF.AGENT.xcat_zhcp_nodename
     self._vsws = []
     self._maps = {}
     self._creat_networks()
Пример #8
0
 def __init__(self, zhcp, name, vlan):
     self._utils = utils.zvmUtils()
     self._utils.add_vswitch(zhcp, name,
             eval("CONF." + name + ".rdev_list"), vid=vlan)
     self.zhcp = zhcp