Skip to content

Commit

Permalink
CMS Openstack: Basic Openstack cloud scenario
Browse files Browse the repository at this point in the history
Very basic Openstack test scenario that brings up three compute nodes and
provisions one Project with internal network and external connectivity.

Signed-off-by: Martin Kalcok <[email protected]>
  • Loading branch information
mkalcok committed Sep 26, 2023
1 parent 53339f9 commit 086cdb0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ovn-tester/cms/openstack/tests/base_openstack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import logging

from ovn_ext_cmd import ExtCmd
from ovn_context import Context
from ovn_workload import ChassisNode

from cms.openstack import OpenStackCloud

log = logging.getLogger(__name__)


class BaseOpenstack(ExtCmd):
def __init__(self, config, central_node, worker_nodes, global_cfg):
super().__init__(config, central_node, worker_nodes)

def run(self, ovn: OpenStackCloud, global_cfg):
# create ovn topology
worker_count = len(ovn.worker_nodes)
with Context(ovn, "base_cluster_bringup", worker_count) as ctx:
for i in ctx:
worker_node: ChassisNode = ovn.worker_nodes[i]
log.info(
f"Provisioning {worker_node.__class__.__name__} "
f"({i+1}/{worker_count})"
)
worker_node.provision(ovn)

_ = ovn.new_project(gw_nodes=ovn.worker_nodes)
11 changes: 11 additions & 0 deletions test-scenarios/openstack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
global:
log_cmds: false
cms_name: openstack

cluster:
clustered_db: true
log_txns_db: true
n_workers: 3

base_openstack:
foo: bar

0 comments on commit 086cdb0

Please sign in to comment.