f5osa.tenant.create

f5osa.tenant.create#

Creates a tenant.

Usage:

f5osa.tenant.create [options...] <declaration file>

Options:

Option

Description

-d <variables file>

Define a custom variable file.

-k

Keeps the temporary files.

-sVAR=VALUE

Define a custom variable.

-t

Process the declaration file with mustache.

-v

Output the parsed declaration, do not post it.

Reference: https://clouddocs.f5.com/training/community/rseries-training/html/rseries_deploying_a_tenant.html#creating-a-tenant-via-api
Example tenant template: restsh/modules/f5osa/templates/tenant.json

Example template file:

{ 
    "tenant": [ 
        { 
            "name": "{{VAR_NAME}}", 
            "config": { 
                "type": "BIG-IP", 
                "image": "{{VAR_IMAGE}}", 
                "nodes": [ 
                    1 
                ], 
                "mgmt-ip": "{{VAR_IP_ADDRESS}}", 
                "prefix-length": {{VAR_IP_MASK_LENGTH}}, 
                "gateway": "{{VAR_IP_GATEWAY}}", 
                "vlans": [ 
                    {{#VAR_VLANS}} 
                        {{MO_COMMA_IF_NOT_FIRST}} 
                        {{.}} 
                    {{/VAR_VLANS}} 
                ], 
                "cryptos": "enabled", 
                "vcpu-cores-per-node": {{VAR_CPUS}}, 
                "memory": "{{VAR_MEM_MB}}", 
                "storage": { 
                    "size": {{VAR_DISK_GB}} 
                }, 
                "running-state": "configured", 
                "appliance-mode": { 
                    "enabled": false 
                } 
            } 
        } 
    ] 
} 

Example variable file:

VAR_NAME= 
VAR_IMAGE= 
VAR_IP_ADDRESS= 
VAR_IP_MASK_LENGTH= 
VAR_IP_GATEWAY= 
VAR_VLANS=() 
VAR_CPUS=4 
VAR_MEM_MB=12288 
VAR_DISK_GB=100