NeutronAgent

class playback.neutron_agent.NeutronAgent(user='ubuntu', hosts=None, key_filename=None, password=None, parallel=True, *args, **kwargs)

Bases: playback.common.Common

Deploy neutron agent

Parameters:
  • user(str) – the user for remote server to login
  • hosts(list) – this is a second param
  • key_filename(str) – the ssh private key to used, default None
  • password(str) – the password for remote server
  • parallel(bool) – paralleler execute on remote server, default True
Returns:

None

Examples:
# create neutron agent instances
agent1 = NeutronAgent(
    user='ubuntu',
    hosts=['compute1']
)
agent2 = NeutronAgent(
    user='ubuntu',
    hosts=['compute2']
)
agent3 = NeutronAgent(
    user='ubuntu',
    hosts=['compute3']
)
agent4 = NeutronAgent(
    user='ubuntu',
    hosts=['compute4']
)

# install neutron agent
agent1.install(
    rabbit_hosts='controller1,controller2',
    rabbit_user='openstack',
    rabbit_pass='changeme',
    auth_uri='http://192.168.1.1:5000',
    auth_url='http://192.168.1.1:35357',
    neutron_pass='changeme',
    public_interface='eth1',
    local_ip='192.168.1.11',
    memcached_servers='controller1:11211,controller2:11211',
)
agent2.install(
    rabbit_hosts='controller1,controller2',
    rabbit_user='openstack',
    rabbit_pass='changeme',
    auth_uri='http://192.168.1.1:5000',
    auth_url='http://192.168.1.1:35357',
    neutron_pass='changeme',
    public_interface='eth1',
    local_ip='192.168.1.12',
    memcached_servers='controller1:11211,controller2:11211',
)
agent3.install(
    rabbit_hosts='controller1,controller2',
    rabbit_user='openstack',
    rabbit_pass='changeme',
    auth_uri='http://192.168.1.1:5000',
    auth_url='http://192.168.1.1:35357',
    neutron_pass='changeme',
    public_interface='eth1',
    local_ip='192.168.1.13',
    memcached_servers='controller1:11211,controller2:11211',
)
agent4.install(
    rabbit_hosts='controller1,controller2',
    rabbit_user='openstack',
    rabbit_pass='changeme',
    auth_uri='http://192.168.1.1:5000',
    auth_url='http://192.168.1.1:35357',
    neutron_pass='changeme',
    public_interface='eth1',
    local_ip='192.168.1.14',
    memcached_servers='controller1:11211,controller2:11211',
)
install(*args, **kwargs)

Install neutron agent

Parameters:
  • rabbit_hosts – RabbitMQ HA cluster host:port pairs. (list value) e.g. CONTROLLER1,CONTROLLER2
  • rabbit_user – The RabbitMQ userid. (string value) e.g. openstack
  • rabbit_pass – The RabbitMQ password. (string value)
  • auth_uri – Complete public Identity API endpoint. (string value) e.g. http://CONTROLLER_VIP:5000
  • auth_url – keystone admin endpoint e.g. http://CONTROLLER_VIP:35357
  • neutron_pass – the password of neutron user
  • public_interface – public interface e.g. eth1
  • local_ip – underlying physical network interface that handles overlay networks(uses the management interface IP)
  • memcached_servers – Optionally specify a list of memcached server(s) to use for caching. (list value) e.g. CONTROLLER1:11211,CONTROLLER2:11211
Returns:

None