Meanwhile, we still don’t create service instance (or called Tenant) yet, In M-CORD 5.0, VM will be created by vepc-service automatically, we will not explain vepc-service here, if you’re interested, you can find source code in GitHub - epc-service.

Here is a TOSCA snippet code continued previous code, it created a VM (Service Instance) named vmme1, this code will be extracted by XOS TOSCA Container, and xos-tosca send model information to xos-core via [GRPC](https://en.wikipedia.org/wiki/GRPC).

In xos-db, we have several models about OpenStack VM, services will share these models.

openstack-synchronizer observe on Network, Port, Instance, Image models, and when these models have new data come in, openstack-synchronizer will get notified.

openstack-synchronizer create Network, VM by calling Ansible script.

Synchronizer

In synchronizer, we have 2 types code: SyncStep and ModelPolicy.

We can say SyncStep will going to do something about service, e.g. Provisioning new VM on OpenStack, Install apache on target machine, create user, … etc.

And ModelPolicy is much different from SyncStep, it is responsible for maintaining models, for example, create a new VM in Instance model, modify Instance model information, delete VM from model … etc, will be done by ModelPolicy.