Data Model

Presentation Layer Structure

The Presentation Layer implemented using APL by this templates consists of three major components:

Type Description
`Section <s ection.html >`__ A specific section that contains various value fields. Serves as base for REST API attribute names
`Value Field <APL. html#Value_ Elements_0> `__ A particular value field that accepts user input
Text String The text description used by the GUI

To form the TCL variable names used in the Implementation Layer you combine the Section name and Value Field name with two underscores (“__”). For example, given a Section name of “mysection” and a Value Field name of “myfield” the corresponding TCL variable name would be “$mysection__myfield”.

APL Data Types

APL provides a set of field types that are used for data input to an iApp template. These fields types behave differently based on a GUI or API interaction with the system. This section details how the various field types used in this iApp template can be leveraged via a GUI or API based interaction.

Field Type Descripti on GUI/REST API Representation
`String < string.ht ml>`__ Used for arbitrary string input. Built-in validator s may be used but are only used by the GUI.

GUI:

|https://devcentral.f5.com/Portals/0/Images/w iki/iApp/AppSvcsiApp/iApps_string_example.png | REST API:

code json last highlight-default

{
  "variables":[
      {
              "name":"iapp__strictUp
dates”,
“value”:”enabled”

}, {

“name”:”iapp__appStats
“,
“value”:”enabled”

}

]

}

`Table <t able.html >`__ Used for input of table based data. Arbitrary input field types are specified as columns within the table. User input is accomplis hed by sending a set of rows that maps to the input fields specified as columns. Tables cannot be nested.

GUI:

|https://devcentral.f5.com/Portals/0/Images/w iki/iApp/AppSvcsiApp/iApps_table_example.png| REST API:

code json last highlight-default

{
  "tables":[
      {
              "columnNames":[ "Integ
er”, “String1”, “String2” ],
“rows”:[ { “row”:[ “0”, “abc”,
“xyz” ] },
{ “row”:[ “1”, “ABC”,
“XYZ” ] }
], “name”:”example__table
1”

}, {

“columnNames”:[ “Integ
er”, “String1”, “String2” ],
“rows”:[ { “row”:[ “0”, “abc”,
“xyz” ] },
{ “row”:[ “1”, “ABC”,
“XYZ” ] }
], “name”:”example__table
2”
}

]

}

List/Mul ti Choice _ Used for input of an ordered list of arbitrary strings. GUI represent ation is displayed and a fixed set of options, however, API represent ation allows for arbitrary input.

GUI:

|https://devcentral.f5.com/Portals/0/Images/w iki/iApp/AppSvcsiApp/iApps_multichoice_exampl e.png| REST API:

code json last highlight-default

{
        "lists": [
                {
                        "encrypted":
“no”,
“name”: “exa
mple__list1”,
“value”: [ “
value 1”, “value 2” ]
}

]

}

Template Specific Data Model/Syntax

The formats described in this section are implemented specifically by this template only. The items specified in this section extend APL data types to add additional functionality.

Indexes in APL Tables

Index columns are used by various APL Tables in this template to provide a consistent method to access and reference specific table rows in other parts of the presentation layer. This consistency is required because the order of rows cannot be guaranteed to remain consistent in an orchestration/automation toolchain. Throughout the Presentation Layer of the template the value of the Index field is used to provide a ‘hard’ link to a specific item within a table.

As an example, when creating LTM Pools and Monitors, we use the Pool__Pools and Monitor__Monitors tables. Each row in the Monitor__Monitors table creates a specific monitor on the system. To reference a particular Monitor to use for the Pool we use the Index of the row in the Monitor__Monitors table. To implement the following:

  • 2 LTM Pools
    • 1st pool uses a TCP & HTTP monitor
    • 2nd pool uses a TCP monitor
  • 2 LTM Monitors
    • HTTP
    • TCP

We would use the following tables (JSON format):

{
   "tables":[
                {
                "name":"monitor__Monitors",
                "columnNames": ["Index", "Name", "Type", "Options"],
                "rows" : [
                { "row": [ "0", "/Common/tcp", "none", "none" ] },
                { "row": [ "1", "/Common/http", "none", "none" ] }
                ]
        },
        {
                "name":"pool__Pools",
                "columnNames": [ "Index", "Name", "Description", "LbMethod", "Monitor", "AdvOptions" ],
                "rows" : [
                { "row": [ "0", "pool_0", "", "round-robin", "0,1", "none"] },
                { "row": [ "1", "pool_1", "", "round-robin", "0", "none"] },
                ]
        }
    ]
}

Advanced Options & Create String Syntax

The BIG-IP platform allows very fine-grained control of options for L4-7 protocol profiles (ex: TCP, UDP, HTTP, Compression, etc.) and options for Virtual Servers and Pools. To expose the ability to customize these options we use a syntax that can be expressed using the APL String field. The create syntax can be used with specific Profiles, while the option syntax is used with the Virtual Server and Pool objects. This syntax is defined as a string in the following format:

Create String

Desc ript ion

A custom TMOS profile will be created with the specified options. Options are validated at run-time with the underlying TMOS version. Use of this format allows exposure of fine-grained options without exposing each option as a field in the APL Presentation Layer. The following profiles support the this syntax:

  • Client/Server-side L4 Protocol (tcp, udp)
  • Server SSL
  • Client SSL
  • HTTP
  • OneConnect
  • Compression
  • Request Logging
  • Persistence (Default & Fallback)
Synt ax
create:type=<profile type>;<tmsh_option_name>=<tmsh_option

_value>[;<tmsh_option_name>=<tmsh_option_value>]

Exam ple
create:type=tcp;nagle=disabled;proxy-low-buffer=10000;defa

ults-from=/Common/tcp

Advanced Options String

Desc ript ion

The object will be created with the specified TMOS options. Options are validated at run-time with the underlying TMOS version. Use of this format allows exposure of fine-grained options without exposing each option as a field in the APL Presentation Layer. The following object types support the this syntax:

  • Virtual Servers
  • Pools
  • Auto-create Client-SSL Profiles
Synt ax
<tmsh_option_name>=<tmsh_option_value>[;<tmsh_option_name>

=<tmsh_option_value>]

Exam ple
slow-ramp-time=300;min-up-members=1

Additional Syntaxes

Various fields use specific syntaxes to expose functionality. If applicable, the format of these fields are documented in the specific entry for the field/table/column in question in the Presentation Layer Reference

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.