Cloud Repositorio defines its domain objects inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/markitobonito/cloud_repositorio/llms.txt
Use this file to discover all available pages before exploring further.
models.py. Each class has a to_dict() method that produces the structure stored in database.yaml and passed between API layers. All dict representations are plain Python types (strings, ints, lists, nested dicts) suitable for YAML serialization.
User
Represents an authenticated user with a quota of VMs and a list of owned slices.Unique username. Used as the key in
database.yaml under users.SHA-256 hex digest of the user’s password.
Maximum number of VMs the user may have running simultaneously. Default:
10.Current count of VMs allocated to this user. Incremented by
OrchestratorAPI.add_vm_to_slice() and decremented by delete_slice().List of
slice_id values owned by this user.can_create_vms(count) -> bool
Returns True if (used_vms + count) <= quota_vms, i.e. there is enough remaining quota to allocate count additional VMs.
Flavor
A static registry of VM size definitions. Not intended to be instantiated.Class-level dict keyed by flavor name. Each value has:
Flavor.get(flavor_name) -> dict | None
Returns the flavor spec dict for flavor_name, or None if the name is not registered.
Interface
Represents one network interface on a VM.Interface name, e.g.
"eth0", "eth1".OVS VLAN tag assigned to this interface.
None means the interface is not yet connected to any VLAN. Set to 400 for management/internet interfaces; set to a slice VLAN ID when a link is created.MAC address in
52:54:00:XX:XX:XX format, generated by DeploymentAPI.generate_unique_macs().Present only on
eth0 when internet_enabled=True. Structure:ID of the
Link this interface belongs to. None until OrchestratorAPI.create_link() is called.Link
Represents an L2 connection between two VM interfaces on a shared VLAN.Sequential identifier within a slice (1, 2, 3, …).
OVS VLAN tag allocated from the slice’s VLAN pool.
ID of the first VM.
Interface name on the first VM, e.g.
"eth1".ID of the second VM.
Interface name on the second VM, e.g.
"eth1".VM
Represents a virtual machine instance within a slice.Globally unique VM identifier, allocated by
Database.get_next_vm_id() (starts at 1000).Human-readable name. Also used as the QCOW2 image filename prefix.
Username of the slice owner.
IP of the worker node where the VM is hosted.
Absolute VNC port number (e.g.
5901). Connect with vncviewer {worker_ip}:{vnc_port - 5900}.Ordered list of interface objects. Index 0 is always
eth0.Path to the QCOW2 image on the worker, e.g.
"~/vm_images/vm1_img.qcow2". None before image creation.Lifecycle state. Transitions:
"pending" → "design" (after create_vm_with_qcow) → "running" (after deploy_slice).OS process ID of the QEMU process on the worker.
None until deployed.Network
Represents the network configuration for a VLAN. Created per-link VLAN but not heavily used in the current orchestration flow —VLANManager derives its configuration from link data directly.
OVS VLAN tag.
Subnet CIDR, e.g.
"192.168.101.0/24".Gateway IP address, e.g.
"192.168.101.1".Whether dnsmasq DHCP is active for this network. Default:
False.DHCP lease range string, e.g.
"192.168.101.10,192.168.101.250". None until DHCP is configured.Status of the network configuration. Currently always
"pending".Slice
The top-level container for a tenant’s VM topology.Unique identifier, allocated by
Database.get_next_vm_id() (the same counter as VM IDs).Username of the slice owner.
Descriptor for the topology design, e.g.
"custom". Default: "custom".First VLAN ID in the slice’s private pool. Computed as
100 + (slice_id % 100) * 20.Last VLAN ID in the pool. Always
vlan_pool_start + 19 (20 VLANs per slice).List of VLAN IDs already allocated within this slice.
VMs belonging to this slice.
L2 links defined between VM interfaces.
Network objects created alongside links.
Lifecycle state:
"design" or "running".get_next_vlan() -> int | None
Iterates vlan_pool_start…vlan_pool_end and returns the first VLAN ID not in vlan_pool_used, appending it to vlan_pool_used before returning. Returns None when all 20 VLANs are exhausted.
slice_id % 100 | vlan_pool_start | vlan_pool_end |
|---|---|---|
| 0 | 100 | 119 |
| 1 | 120 | 139 |
| 2 | 140 | 159 |
| 50 | 1100 | 1119 |
Serialized slice example
A completeto_dict() output for a slice with one VM and one link, as stored in database.yaml: