Fix functional test of RemoteCommandExecutor

This patch fixes three problems to solve test_cmd_executor funciotnal
test failure.

* make the metadata server accessible from VMs
* connect the compute1 node to the controller node via net_mgmt
* wait while after VM start until sshd start

Change-Id: Id5b72b7eae4ecf6b8038f06b84567324edaa98a8
Closes-bug: #1897643
Related-bug: #1886213
This commit is contained in:
Itsuro Oda 2020-09-29 10:39:24 +09:00
parent 54b4400495
commit b4d49961b9
2 changed files with 11 additions and 0 deletions

View File

@ -76,6 +76,11 @@
Q_SERVICE_PLUGIN_CLASSES: router,neutron.services.metering.metering_plugin.MeteringPlugin,networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin,neutron.services.qos.qos_plugin.QoSPlugin,qos
Q_ML2_PLUGIN_EXT_DRIVERS: port_security,qos
L2_AGENT_EXTENSIONS: qos
devstack_local_conf:
post-config:
$NEUTRON_DHCP_CONF:
DEFAULT:
enable_isolated_metadata: True
test_matrix_configs: [neutron]
zuul_work_dir: src/opendev.org/openstack/tacker
host-vars:
@ -149,6 +154,7 @@
devstack_localrc:
CELLSV2_SETUP: singleconductor
PHYSICAL_NETWORK: mgmtphysnet0
OVS_BRIDGE_MAPPINGS: public:br-ex,mgmtphysnet0:br-infra
DATABASE_TYPE: mysql
devstack_services:
q-agt: true

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import time
import yaml
from oslo_config import cfg
@ -50,6 +51,10 @@ class TestRemoteCommandExecutor(base.BaseTackerTest):
def _test_cmd_executor(self, vnfd_file, vnf_name):
vnf_id, mgmt_ip = self._test_create_vnf(vnfd_file, vnf_name)
# Wait for VM initialization. It takes time after VM started until
# sshd starts. It is a bit ad-hoc but adopted it for simplicity.
time.sleep(100)
# Login on VNF instance, and execute 'hostname' command to verify
# connection and command output.
usr = 'cirros'