the-rocci-project/rOCCI-core

View on GitHub
examples/rendering/model.json

Summary

Maintainability
Test Coverage
{
  "actions": [
    {
      "attributes": {
        "method": {
          "default": "cold",
          "description": "Restart method",
          "mutable": true,
          "pattern": "(?-mix:^(graceful|warm|cold)$)",
          "required": false,
          "type": "string"
        }
      },
      "scheme": "http://schemas.ogf.org/occi/infrastructure/compute/action#",
      "term": "restart",
      "title": "Restart compute via the specified method"
    },
    {
      "attributes": {
        "method": {
          "default": "deffered",
          "description": "Save method",
          "mutable": true,
          "pattern": "(?-mix:^(hot|deffered)$)",
          "required": false,
          "type": "string"
        },
        "name": {
          "description": "Name of the copy",
          "mutable": true,
          "pattern": "(?-mix:^[[:alnum:]]+$)",
          "required": false,
          "type": "string"
        }
      },
      "scheme": "http://schemas.ogf.org/occi/infrastructure/compute/action#",
      "term": "save",
      "title": "Makes an independent copy of the compute instance"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/compute/action#",
      "term": "start",
      "title": "Change compute status to active"
    },
    {
      "attributes": {
        "method": {
          "default": "poweroff",
          "description": "Stop method",
          "mutable": true,
          "pattern": "(?-mix:^(graceful|acpioff|poweroff)$)",
          "required": false,
          "type": "string"
        }
      },
      "scheme": "http://schemas.ogf.org/occi/infrastructure/compute/action#",
      "term": "stop",
      "title": "Change compute status to inactive"
    },
    {
      "attributes": {
        "method": {
          "default": "suspend",
          "description": "Suspend method",
          "mutable": true,
          "pattern": "(?-mix:^(hibernate|suspend)$)",
          "required": false,
          "type": "string"
        }
      },
      "scheme": "http://schemas.ogf.org/occi/infrastructure/compute/action#",
      "term": "suspend",
      "title": "Change compute status to suspended"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/network/action#",
      "term": "down",
      "title": "Change network status to inactive"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/network/action#",
      "term": "up",
      "title": "Change network status to active"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/networkinterface/action#",
      "term": "down",
      "title": "Change networkinterface status to inactive"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/networkinterface/action#",
      "term": "up",
      "title": "Change networkinterface status to active"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/storage/action#",
      "term": "backup",
      "title": "Make a backup of the storage instance"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/storage/action#",
      "term": "offline",
      "title": "Change storage status to offline"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/storage/action#",
      "term": "online",
      "title": "Change storage status to online"
    },
    {
      "attributes": {
        "size": {
          "description": "Amount of storage in GBs.",
          "mutable": true,
          "required": true,
          "type": "number"
        }
      },
      "scheme": "http://schemas.ogf.org/occi/infrastructure/storage/action#",
      "term": "resize",
      "title": "Change the resize of the storage instance"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/storage/action#",
      "term": "snapshot",
      "title": "Make a snapshot of the storage instance"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/storagelink/action#",
      "term": "offline",
      "title": "Change storagelink status to inactive"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/storagelink/action#",
      "term": "online",
      "title": "Change storagelink status to active"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/ipreservation/action#",
      "term": "down",
      "title": "Change ipreservation status to inactive"
    },
    {
      "scheme": "http://schemas.ogf.org/occi/infrastructure/ipreservation/action#",
      "term": "up",
      "title": "Change ipreservation status to active"
    }
  ],
  "kinds": [
    {
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        }
      },
      "location": "/entity/",
      "scheme": "http://schemas.ogf.org/occi/core#",
      "term": "entity",
      "title": "OCCI Core Entity"
    },
    {
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.source": {
          "description": "Source resource sub-type instance of this link sub-type instance.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.core.target": {
          "description": "Target resource sub-type instance of this link sub-type instance.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        }
      },
      "location": "/link/",
      "parent": "http://schemas.ogf.org/occi/core#entity",
      "scheme": "http://schemas.ogf.org/occi/core#",
      "term": "link",
      "title": "OCCI Core Link"
    },
    {
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.summary": {
          "description": "Brief textual description of this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^.*$)",
          "required": false,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        }
      },
      "location": "/resource/",
      "parent": "http://schemas.ogf.org/occi/core#entity",
      "scheme": "http://schemas.ogf.org/occi/core#",
      "term": "resource",
      "title": "OCCI Core Resource"
    },
    {
      "actions": [
        "http://schemas.ogf.org/occi/infrastructure/compute/action#start",
        "http://schemas.ogf.org/occi/infrastructure/compute/action#stop",
        "http://schemas.ogf.org/occi/infrastructure/compute/action#restart",
        "http://schemas.ogf.org/occi/infrastructure/compute/action#suspend",
        "http://schemas.ogf.org/occi/infrastructure/compute/action#save"
      ],
      "attributes": {
        "occi.compute.architecture": {
          "default": "x64",
          "description": "Compute platform architecture.",
          "mutable": true,
          "pattern": "(?-mix:^(x86|x64)$)",
          "required": false,
          "type": "string"
        },
        "occi.compute.cores": {
          "description": "Number of compute processor cores.",
          "mutable": true,
          "required": false,
          "type": "number"
        },
        "occi.compute.hostname": {
          "description": "Compute FQDN.",
          "mutable": true,
          "required": false,
          "type": "string"
        },
        "occi.compute.memory": {
          "description": "Amount of compute memory in GBs.",
          "mutable": true,
          "required": false,
          "type": "number"
        },
        "occi.compute.speed": {
          "description": "Relative speed of the compute instance.",
          "mutable": true,
          "required": false,
          "type": "number"
        },
        "occi.compute.state": {
          "default": "inactive",
          "description": "Compute instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(active|inactive|error|waiting|suspended)$)",
          "required": true,
          "type": "string"
        },
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.summary": {
          "description": "Brief textual description of this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^.*$)",
          "required": false,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        }
      },
      "location": "/compute/",
      "parent": "http://schemas.ogf.org/occi/core#resource",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "compute",
      "title": "OCCI Infrastructure Compute"
    },
    {
      "actions": [
        "http://schemas.ogf.org/occi/infrastructure/network/action#up",
        "http://schemas.ogf.org/occi/infrastructure/network/action#down"
      ],
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.summary": {
          "description": "Brief textual description of this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^.*$)",
          "required": false,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        },
        "occi.network.label": {
          "description": "Label of the network instance.",
          "mutable": true,
          "required": false,
          "type": "string"
        },
        "occi.network.state": {
          "default": "inactive",
          "description": "Network instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(active|inactive|error)$)",
          "required": true,
          "type": "string"
        },
        "occi.network.vlan": {
          "description": "VLAN identifier or a tag.",
          "mutable": true,
          "required": false,
          "type": "number"
        }
      },
      "location": "/network/",
      "parent": "http://schemas.ogf.org/occi/core#resource",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "network",
      "title": "OCCI Infrastructure Network"
    },
    {
      "actions": [
        "http://schemas.ogf.org/occi/infrastructure/networkinterface/action#up",
        "http://schemas.ogf.org/occi/infrastructure/networkinterface/action#down"
      ],
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.source": {
          "description": "Source resource sub-type instance of this link sub-type instance.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.core.target": {
          "description": "Target resource sub-type instance of this link sub-type instance.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        },
        "occi.networkinterface.interface": {
          "description": "Network interface name.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]+$)",
          "required": false,
          "type": "string"
        },
        "occi.networkinterface.mac": {
          "description": "Network interface MAC address.",
          "mutable": false,
          "pattern": "(?-mix:^([0-9a-fA-F]{2}[:-]){5}([0-9a-fA-F]{2})$)",
          "required": false,
          "type": "string"
        },
        "occi.networkinterface.state": {
          "default": "inactive",
          "description": "Networkinterface instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(active|inactive|error)$)",
          "required": true,
          "type": "string"
        }
      },
      "location": "/networkinterface/",
      "parent": "http://schemas.ogf.org/occi/core#link",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "networkinterface",
      "title": "OCCI Infrastructure NetworkInterface"
    },
    {
      "actions": [
        "http://schemas.ogf.org/occi/infrastructure/storage/action#online",
        "http://schemas.ogf.org/occi/infrastructure/storage/action#offline",
        "http://schemas.ogf.org/occi/infrastructure/storage/action#backup",
        "http://schemas.ogf.org/occi/infrastructure/storage/action#snapshot",
        "http://schemas.ogf.org/occi/infrastructure/storage/action#resize"
      ],
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.summary": {
          "description": "Brief textual description of this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^.*$)",
          "required": false,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        },
        "occi.storage.size": {
          "description": "Amount of storage in GBs.",
          "mutable": true,
          "required": false,
          "type": "number"
        },
        "occi.storage.state": {
          "default": "offline",
          "description": "Storage instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(online|offline|backup|snapshot|resize|degraded)$)",
          "required": true,
          "type": "string"
        }
      },
      "location": "/storage/",
      "parent": "http://schemas.ogf.org/occi/core#resource",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "storage",
      "title": "OCCI Infrastructure Storage"
    },
    {
      "actions": [
        "http://schemas.ogf.org/occi/infrastructure/storagelink/action#online",
        "http://schemas.ogf.org/occi/infrastructure/storagelink/action#offline"
      ],
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.source": {
          "description": "Source resource sub-type instance of this link sub-type instance.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.core.target": {
          "description": "Target resource sub-type instance of this link sub-type instance.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        },
        "occi.storagelink.deviceid": {
          "description": "Block device ID.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]+$)",
          "required": false,
          "type": "string"
        },
        "occi.storagelink.mountpoint": {
          "description": "Block device mount point.",
          "mutable": false,
          "required": false,
          "type": "string"
        },
        "occi.storagelink.state": {
          "default": "inactive",
          "description": "Storagelink instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(active|inactive|error|waiting)$)",
          "required": true,
          "type": "string"
        }
      },
      "location": "/storagelink/",
      "parent": "http://schemas.ogf.org/occi/core#link",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "storagelink",
      "title": "OCCI Infrastructure StorageLink"
    },
    {
      "actions": [
        "http://schemas.ogf.org/occi/infrastructure/ipreservation/action#up",
        "http://schemas.ogf.org/occi/infrastructure/ipreservation/action#down"
      ],
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.summary": {
          "description": "Brief textual description of this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^.*$)",
          "required": false,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        },
        "occi.ipreservation.address": {
          "description": "IP address (v4 or v6) assigned to this reservation.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.ipreservation.state": {
          "default": "inactive",
          "description": "IPReservation instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(active|inactive|error)$)",
          "required": true,
          "type": "string"
        },
        "occi.ipreservation.used": {
          "default": false,
          "description": "Status of the IPReservation instance.",
          "mutable": false,
          "required": true,
          "type": "boolean"
        },
        "occi.network.label": {
          "description": "Label of the network instance.",
          "mutable": true,
          "required": false,
          "type": "string"
        },
        "occi.network.state": {
          "default": "inactive",
          "description": "Network instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(active|inactive|error)$)",
          "required": true,
          "type": "string"
        },
        "occi.network.vlan": {
          "description": "VLAN identifier or a tag.",
          "mutable": true,
          "required": false,
          "type": "number"
        }
      },
      "location": "/ipreservation/",
      "parent": "http://schemas.ogf.org/occi/infrastructure#network",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "ipreservation",
      "title": "OCCI Infrastructure IP Reservation"
    },
    {
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.summary": {
          "description": "Brief textual description of this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^.*$)",
          "required": false,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        },
        "occi.securitygroup.rules": {
          "description": "Status of the IPReservation instance.",
          "mutable": true,
          "required": true,
          "type": "array"
        },
        "occi.securitygroup.state": {
          "default": "inactive",
          "description": "SecurityGroup instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(active|inactive|error)$)",
          "required": true,
          "type": "string"
        }
      },
      "location": "/securitygroup/",
      "parent": "http://schemas.ogf.org/occi/core#resource",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "securitygroup",
      "title": "OCCI Infrastructure Security Group"
    },
    {
      "attributes": {
        "occi.core.id": {
          "description": "Identifier assigned to this entity sub-type instance.",
          "mutable": false,
          "pattern": "(?-mix:^[[:alnum:]]([[:alnum:]]|-|_)*$)",
          "required": true,
          "type": "string"
        },
        "occi.core.source": {
          "description": "Source resource sub-type instance of this link sub-type instance.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.core.target": {
          "description": "Target resource sub-type instance of this link sub-type instance.",
          "mutable": true,
          "required": true,
          "type": "string"
        },
        "occi.core.title": {
          "description": "Title assigned to this entity sub-type instance.",
          "mutable": true,
          "pattern": "(?-mix:^[[:word:]]([[:blank:]]|[[:word:]]|\\-)*$)",
          "required": false,
          "type": "string"
        },
        "occi.securitygrouplink.state": {
          "default": "inactive",
          "description": "SecurityGroupLink instance state.",
          "mutable": false,
          "pattern": "(?-mix:^(active|inactive|error)$)",
          "required": true,
          "type": "string"
        }
      },
      "location": "/securitygrouplink/",
      "parent": "http://schemas.ogf.org/occi/core#link",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "securitygrouplink",
      "title": "OCCI Infrastructure Security Group link"
    }
  ],
  "mixins": [
    {
      "applies": [
        "http://schemas.ogf.org/occi/infrastructure#network"
      ],
      "attributes": {
        "occi.network.address": {
          "description": "IP address (v4 or v6) assigned to this instance.",
          "mutable": true,
          "required": false,
          "type": "string"
        },
        "occi.network.allocation": {
          "default": "static",
          "description": "Network address allocation mechanism.",
          "mutable": true,
          "pattern": "(?-mix:^(dynamic|static)$)",
          "required": false,
          "type": "string"
        },
        "occi.network.gateway": {
          "description": "IP address (v4 or v6) of the pre-configured gateway.",
          "mutable": true,
          "required": false,
          "type": "string"
        }
      },
      "location": "/mixin/ipnetwork/",
      "scheme": "http://schemas.ogf.org/occi/infrastructure/network#",
      "term": "ipnetwork",
      "title": "OCCI IP Network mixin"
    },
    {
      "applies": [
        "http://schemas.ogf.org/occi/infrastructure#networkinterface"
      ],
      "attributes": {
        "occi.networkinterface.address": {
          "description": "IP address (v4 or v6) assigned to this instance.",
          "mutable": true,
          "required": false,
          "type": "string"
        },
        "occi.networkinterface.allocation": {
          "default": "static",
          "description": "Network address allocation mechanism.",
          "mutable": true,
          "pattern": "(?-mix:^(dynamic|static)$)",
          "required": false,
          "type": "string"
        },
        "occi.networkinterface.gateway": {
          "description": "IP address (v4 or v6) of the pre-configured gateway.",
          "mutable": true,
          "required": false,
          "type": "string"
        }
      },
      "location": "/mixin/ipnetworkinterface/",
      "scheme": "http://schemas.ogf.org/occi/infrastructure/networkinterface#",
      "term": "ipnetworkinterface",
      "title": "OCCI IP NetworkInterface mixin"
    },
    {
      "location": "/mixin/os_tpl/",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "os_tpl",
      "title": "OS or Appliance template (parent mixin)"
    },
    {
      "location": "/mixin/resource_tpl/",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "resource_tpl",
      "title": "Resource template providing flavor/sizing information (parent mixin)"
    },
    {
      "location": "/mixin/availability_zone/",
      "scheme": "http://schemas.ogf.org/occi/infrastructure#",
      "term": "availability_zone",
      "title": "OCCI Availability Zone mixin"
    }
  ]
}