Abiquo reporting schema and architecture reference
- 1 Abiquo reporting schema
- 2 How to create a report with JasperReports server
- 2.1 How JasperReports server is configured to use Abiquo RLS
- 2.1.1 Identifying the Abiquo user
- 2.1.2 Specifying report procedure parameters
- 2.1.2.1 Step 1 - Create a custom reports schema
- 2.1.2.2 Step 2 - Copy the report template stored procedure
- 2.1.2.3 Step 3 - Create a separate JasperReports server report folder
- 2.1.2.4 Step 4 - Create your report with iReport (or Eclipse)
- 2.1.2.5 Step 5 - Prepare RLS details within your report
- 2.1.2.6 Step 6 - Using RLS in the call your report stored procedure
- 2.1.2.7 Step 6 (optional) - JasperReports server input control support
- 2.1 How JasperReports server is configured to use Abiquo RLS
- 3 Reporting schema views summary
- 4 Reporting schema reference
- 4.1 Core RLS stored procedures
- 4.1.1 InitialiseRLS
- 4.1.2 CleanupRLS()
- 4.1.3 TruncateRLSTables
- 4.2 Core RLS views
- 4.2.1 RLS_ENTERPRISE_V1_0_VW
- 4.2.2 RLS_VDC_V1_0_VW
- 4.2.3 RLS_DATACENTER_V1_0_VW
- 4.2.4 RLS_ENTERPRISE_LIMITS_BY_DATACENTER_V1_0_VW
- 4.2.5 RLS_USER_V1_0_VW
- 4.2.6 RLS_VAPP_V1_0_VW
- 4.3 VM-centric RLS views
- 4.4 Network-centric RLS views
- 4.5 Storage-centric RLS views
- 4.6 Repository-centric RLS views
- 4.7 Pricing-centric RLS Views
- 4.8 Event Centric RLS views
- 4.1 Core RLS stored procedures
Abiquo reporting schema
The Abiquo reporting schema is the database interface for standard Abiquo reports and third-party database access to the Abiquo DBMS. This section describes:
How reporting integrates with kinton and kinton_accounting
The security benefits of using separate schemas for reporting
How the Abiquo Jaspersoft JasperReports uses reporting
How the customers can use reporting to develop their own custom reports
A reference guide to the stored procedures and views found in kinton_reporting
Architectural overview
The following diagram shows the components of the reporting schema architecture.
At the top layer of the architecture is the Jaspersoft JasperReports Server. This is where the report presentation is defined, managed, and executed. The JasperReports report definition specifies a report stored procedure to obtain the raw report data for the report. These report stored procedures are defined in a separate kinton_reports schema - this allows us to modularise the separate report components and improves the DBMS security, as the Reports Application does not need direct access to the main Abiquo databases. Customers can create their own reporting schema containing any reports they need for the platform, which should be maintained in their own schema, and not in the same schema as the Abiquo standard reports.
The report stored procedures generate the data set returned to the reports. This is done by utilizing objects in the kinton_reporting schema, which is the interface to the Abiquo DBs. It defines stored procedures and tables to manage Database Row Level Security (RLS) - which ensure that users only have access to the data they are entitled to see. The kinton_reporting schema also defines a set of views, which provide an RLS-controlled interface to the data stored in the underlying kinton and kinton_accounting' database schemas.
Row level security (RLS)
RLS ensures that third parties (such as reporting systems) can only retrieve data appropriate for the user requesting it - for example that an Abiquo Enterprise User can only see data for their Enterprise, even though the underlying table contains data for all Enterprises. In the case of the 'virtualmachine' table it contains details of the VMs for all enterprises, but an enterprise administrator should only be allowed to see the rows in the table belonging to their own VMs - this 'row level filtering' is the job of RLS.
Internally, RLS relies on the database user calling the InitialiseRLS() stored procedure, supplying the name of the Abiquo user for which data should be prepared. This procedure identifies the Enterprises, VDCs, and Datacenters which the user is entitled to know, and stores them in the RLS tables. Each stored entry also identifies the DBMS connection making the RLS call, so that the RLS tables can concurrently store different RLS configurations for multiple users. After that, a number of RLS views are defined, which are used to join the RLS tables to the underlying 'kinton' schema tables, filtering rows accordingly.
The RLS views rely on the use of 'SQL Definer rights', which means that users are given access to the tables used by the view as if they are the user who defined the view, rather than the user referencing the view. This means that it is very important that the 'kinton_reporting' schema is created in the same method as the main application schemas. Typically this will mean importing the 'kinton_reporting.sql' script directly onto the machine hosting the Abiquo DBMS, when logged in as 'root'.
Finally, the CleanupRLS() procedure is used to remove unneeded data for the database connection from the RLS tables.
If a connection attempts to use any of the RLS views without first calling InitialiseRLS(), the views will return no data.
Benefits of the architecture
Security
There are two key security benefits of the architecture:
The database user accounts used by reporting systems can be restricted to require just EXECUTE privileges to only the kinton_reports and custom_reports schemas. No access needs to be granted to the other Abiquo database schemas, even if the reports themselves reference their tables.
Row level security (RLS) provides application-level security at the database layer
Well-defined public interface to the DBMS
kinton_reporting provides a view based interface for accessing Abiquo data for reporting purposes. It is designed to provide a consistent view of the underlying Abiquo DB tables, even when these tables are altered. When the underlying DB tables change, the implementation of the RLS views also changes, but the view output columns do not, thus minimizing any changes required to any reports which use the RLS views.
Simplified report creation
By abstracting the DB logic into stored procedures, and further abstraction of the RLS logic into the 'kinton_reporting' schema, reports now benefit from:
Separation of the business and presentation logic for the reports
Abstraction of the RLS implementation away from the report writer, allowing report SQL to contain only the business logic needed to retrieve data.
RLS is now implemented in a single location in the 'kinton_reports' schema (rather than in each report), making the RLS logic easier to maintain and extend as required.
Simplifying the report SQL, through the use of 'Helper' and 'Summary' database Views, which provide access to report level information without needing to understand the complexities of the 'kinton' and 'kinton_accounting' schemas. Removing the RLS logic also simplifies the report SQL.
How to create a report with JasperReports server
This section describes how to create reports that query Abiquo data using the JasperReports Server application. It explains how to create and call your own custom report stored procedures from your own custom reports.
Note that this section assumes that the user is familiar with creating reports for JasperReports Server - this section does not attempt to describe how to create report presentation layers (a good starting point for such information is this: http://jasperforge.org/projects/ireport).
How JasperReports server is configured to use Abiquo RLS
When creating a JasperReports Server reports, we have seen that the report logic is encapsulated in a report stored procedure, and that the report procedure must be supplied the name of the Abiquo user the report is intended for. Therefore, a key part of the report definition in the report application is to identify the Abiquo user, and then supply it to the report stored procedure.
Identifying the Abiquo user
Since Abiquo supply an authentication plugin to allow Jaspersoft Server to perform its user authentication against an Abiquo Enterprise server, identification of the Abiquo user running the report is straightforward - because the JasperReports Server user name will be the Abiquo user who logged in to the JasperReports Server.
Specifying report procedure parameters
JasperReports Server provides access to details of the user who is running the report, and we can use that user information to create a report parameter containing the name of the Abiquo user - we then simply use that parameter during the call to the report stored procedure.
Note that all parameters required by a report stored procedure should have an equivalent JasperReports Parameter defined for it - this applies to all report procedure parameters including the name of the Abiquo user used to initialise RLS.
Step 1 - Create a custom reports schema
When creating your very first custom report, ensure that you create it in your own 'custom_reports' schema, and not in the 'kinton_reports' schema. By placing them in your own schema you are ensuring that they will not be removed by future upgrades of Abiquo software.
_Note that 'custom_reports' is just a recommended name for your schema and you can choose a more suitable name yourself. _
Step 2 - Copy the report template stored procedure
The 'kinton_reports' schema (which contains all of the procedures for the standard Abiquo reports) also contains a template report procedure called 'RPT_Template_Level_v1_0'. It is recommended that you make a copy of this stored procedure in your custom reports schema, and use it as the starting point for your own custom report procedures, since it contains the necessary parameters and RLS initialisation and cleanup to get you started.
When creating your own report procedure, it is simply a question of adding a query in the 'TODO' section of the report template.
Please refer to the 'kinton_reports.RPT_EnterpriseLimits_VDC_v1_0' for an example of a simple report query.
Additionally, if your report needs to supply parameters to the stored procedure (for example to specify drilldown details) then these should be added to the procedure parameters.
Once your reports stored procedure is complete, it is recommended that you manually test it directly in MySQL using CALL statements, and review the result set to ensure it contains the correct data that you need.
Step 3 - Create a separate JasperReports server report folder
The standard Abiquo reports are all contained within a 'reports' folder on the JasperReports Server. It is strongly recommended that you create and store your own reports in a separate folder (e.g. 'custom_reports'), as the 'reports' folder (and all of its content) may be deleted when the standard reports are upgraded in future Abiquo versions.
Step 4 - Create your report with iReport (or Eclipse)
When defining the database SQL to identify the report's result set, instead of supplying a SELECT query to obtain the report data, you call your report stored procedure instead. This can be done by supplying a CALL SQL statement instead of a SELECT statement, e.g.
CALL kinton_reports.RPT_EnterpriseLimits_Ent_v1_0('admin');
Note that when you first create your report, you will have to manually supply the procedure parameters - the parameters are automated in the next steps.
Step 5 - Prepare RLS details within your report
When you have created your report, you will need to ensure that the report data returned is in the context of the Abiquo user it is being run by.
This can be done using the following steps:
#Create a Jaspersoft report parameter called 'LoggedInUser'. Ensure that:
'Parameter Class' of the variable is set to: 'com.jaspersoft.jasperserver.api.metadata.user.domain.User'
'Use as a prompt' is FALSE.
'DefaultValue Expression' is empty.
Create a Jaspersoft report parameter called 'LoggedInUserName'. Ensure that:
'Parameter Class' of the variable is set to: 'java.lang.String'
'Use as a prompt' is TRUE.
'DefaultValue Expression' is '$P{LoggedInUser}.getUsername()'.
Step 6 - Using RLS in the call your report stored procedure
The final mandatory step is to adjust the report's call to your report stored procedure. This is done by replacing the hard coded parameters from step 4 with appropriate parameters from your report. At the very least you need to supply the 'LoggedInUserName' from step 5, e.g.
CALL kinton_reports.RPT_EnterpriseLimits_Ent_v1_0( $P{LoggedInUserName} );
This will ensure that your report always initialises RLS for the appropriate Abiquo user.
Step 6 (optional) - JasperReports server input control support
If your JasperReports Server report needs to run a query to obtain data for a report Input Control, you can create stored procedures for each Input Control and call them from the control's SQL, using the same technique as the reports use to call the report stored procedures. Note that the Input Control stored procedures can also use the '$P{LoggedInUserName}' report parameter to initialise RLS.
Reference Input Control procedures can be found in the 'kinton_reports' schema, the procedure names all begin with a 'LST' prefix (e.g. 'LST_Enterprises_v1_0')._
Reporting schema views summary
The reporting schema has the following views.
Core RLS views
RLS_ENTERPRISE_V1_0_VW
RLS_VDC_V1_0_VW
RLS_DATACENTER_V1_0_VW
RLS_ENTERPRISE_LIMITS_BY_DATACENTER_V1_0_VW
RLS_USER_V1_0_VW
RLS_VAPP_V1_0_VW
VM-centric RLS views
RLS_VIRTUAL_MACHINE_V1_0_VW
RLS_SUM_VM_IN_USE_BY_VDC_V1_0_VW
RLS_SUM_VM_RESOURCES_BY_STATE_BY_VDC_V1_0_VW
RLS_SUM_VM_DETAILS_V1_0_VW
Network-centric RLS views
RLS_NETWORK_USED_BY_VDC_V1_0_VW
RLS_NETWORK_USED_BY_ENTERPRISE_V1_0_VW
Storage-centric RLS views
RLS_STORAGE_USED_BY_VM_V1_0_VW
RLS_STORAGE_USED_BY_VDC_V1_0_VW
RLS_STORAGE_USED_BY_ENTERPRISE_V1_0_VW
RLS_STORAGE_TIER_USED_BY_VM_V1_0_VW
RLS_STORAGE_TIER_USED_BY_VDC_V1_0_VW
RLS_STORAGE_TIER_USED_BY_ENTERPRISE_V1_0_VW
Repository-centric RLS views
RLS_REPOSITORY_USED_BY_ENTERPRISE_V1_0_VW
RLS_VIRTUAL_IMAGE_V1_0_VW
RLS_VIRTUAL_IMAGE_USE_BY_ENTERPRISE_V1_0_VW
Pricing-centric RLS views
RLS_PRICING_TEMPLATE_V1_0_VW
RLS_PRICING_TIERS_V1_0_VW
RLS_PRICING_COST_CODES_V1_0_VW
RLS_PRICING_PER_HOUR_V1_0_VW
Event-centric RLS views
RLS_EVENTS_V1_0_VW
RLS_ADD_REMOVE_EVENTS_V1_0_VW
RLS_ADD_REMOVE_EVENTS_V2_0_VW
Reporting schema reference
This section provides reference material regarding the 'kinton_reporting' schema row-level security (RLS) procedures and tables. It is intended to be a reference guide for customers who are writing their own reports using Abiquo data.
Core RLS stored procedures
InitialiseRLS
InitialiseRLS(rls_abiquo_user VARCHAR(128))
Used to initialise DBMS-based RLS. MUST be run before referencing any of the RLS views, otherwise the views will be empty or may contain 'out of date' information.
This stored procedure should be called as the first operation in any report stored procedure.
Note: The supplied 'rls_abiquo_user' is the abiquo user name, not a DBMS user name.
e.g.
CleanupRLS()
This procedure should be a corresponding call to InitialiseRLS(), to be made once all queries have been run. It prevents the underlying RLS tables from gathering orphaned data.
e.g.
TruncateRLSTables
This SP is provided to remove any orphaned RLS data form the RLS tables, however please note it it removes ALL data from the RLS tables, and should be called no more than periodically, to clean up any orphaned data. Additionally, this procedure should only be called when no RLS users are active on the system.
e.g.
Core RLS views
These views provide the low-level 'core' RLS filtering, and are often used by the views in the following sections to perform RLS filtering.
RLS_ENTERPRISE_V1_0_VW
This view provides a filtered version of the kinton.enterprise table. Currently, a user can only see the Enterprise to which they belong, unless they have the 'ENTERPRISE_ENUMERATE' privilege, in which case they can see all Enterprises.
Column name | SQL type | Description |
---|---|---|
kinton.enterprise.* | * | All columns from the kinton.enterprise table |
RLS_VDC_V1_0_VW
This view provides a filtered version of the kinton.virtualdatacenter table. Users can only see the virtual datacenters which they have been granted access, unless they have the 'USERS_PROHIBIT_VDC_RESTRICTION' privilege, in which case they can see all virtual datacenters in each Enterprise they are entitled to see.
Column name | SQL type | Description |
---|---|---|
kinton.virtualdatacenter.* | * | All columns from the kinton.virtualdatacenter table |
RLS_DATACENTER_V1_0_VW
This view provides a filtered version of the kinton.datacenter table. Currently a user can see no datacenter unless they have the 'PHYS_DC_RETRIEVE_DETAILS' privilege, in which case they can see all datacenters.
Column name | SQL type | Description |
---|---|---|
kinton.datacenter.* | * | All columns from the kinton.datacenter table |
RLS_ENTERPRISE_LIMITS_BY_DATACENTER_V1_0_VW
Not really a 'core' view, this provides filtered access to the kinton.enterprise_limits_by_datacenter table. Rows are filtered according to the datacenters and the enterprises the user can access.
Column name | SQL type | Description |
---|---|---|
kinton.enterprise_limits_by_datacenter.* | * | All columns from the kinton.enterprise_limits_by_datacenter table |
RLS_USER_V1_0_VW
This view provides a filtered version of the kinton.user table. The users returned are restricted to those that are associated with the Enterprises that the user can access.
Column name | SQL type | Description |
---|---|---|
kinton.user.* | * | All columns from the kinton.user table |
RLS_VAPP_V1_0_VW
This view provides a filtered version of the kinton.virtualapp table. The virtualapps returned are restricted to those that are associated with the Enterprises and VDCs that the user can access.
Column name | SQL type | Description |
---|---|---|
kinton.virtualapp* | * | All columns from the kinton.virtualapp table |
VM-centric RLS views
This group of views return data centered around virtual machines, and their resources.
Unless stated otherwise, each view applies RLS by VDC restriction.
RLS_VIRTUAL_MACHINE_V1_0_VW
This view returns a list of all VMs (and their detailed attributes, including VDC and VApp membership).
Column name | SQL type | Description |
---|---|---|
kinton.virtualmachine.* | * | All columns from the kinton.virtualmachine table |
idVirtualApp | INTEGER | ID of the virtual appliance the VM belongs to |
ApplianceName | VARCHAR | Name of the virtual appliance the VM belongs to |
idVirtualDataCenter | INTEGER | ID of the VDC to which the VM belongs |
RLS_SUM_VM_IN_USE_BY_VDC_V1_0_VW
A view that returns a sum of all hypervisor-deployed VM resource usage (CPU, Memory, Local Storage), totalled by VDC.
Column name | SQL type | Description |
---|---|---|
idVirtualDataCenter | INTEGER | ID of the VDC whose VM resources are being summed |
idEnterprise | INTEGER | ID of enterprise to which the VDC belongs |
cpuused | DECIMAL | Total number of deployed CPU cores used by the VDC |
ramused | DECIMAL | Total amount of memory used (in MB) by the VDC |
hdUsed | DECIMAL | Total amount of local hypervisor disk used (in bytes) by the VDC |
RLS_SUM_VM_RESOURCES_BY_STATE_BY_VDC_V1_0_VW
View that returns a breakdown of VM resources by their state, per VDC.
Column name | SQL type | Description |
---|---|---|
idEnterprise | INTEGER | ID of enterprise to which the VDC belongs |
idVirtualDataCenter | INTEGER | ID of the VDC whose VM resources are being summed |
VMState | VARCHAR | Textual description of the VM state |
TotalVMs | INTEGER | The total number of VMs in that state within the VDC |
CPUUsed | DECIMAL | The number of CPU cores used by VMs in that state within the VDC |
RAMUsed | DECIMAL | The amount of memory (in MB) used by VMs in that state within the VDC |
HDUsed | DECIMAL | The amount of local hypervisor disk used (in bytes) by VMs in that state within the VDC |
RLS_SUM_VM_DETAILS_V1_0_VW
View that returns physical & logical VM details, plus numerous other VM details (but not including network or storage tier VM usage). One row per VM.
RLS is by ENTERPRISE, VDC and DATACENTER restriction.
Column name | SQL type | Description |
---|---|---|
idDataCenter | INTEGER | ID of datacenter hosting the VM |
Datacenter | VARCHAR | Name of datacenter hosting the VM |
idRack | INTEGER | ID of the rack hosting the VM |
Rack | VARCHAR | Name of the rack hosting the VM |
idPhysicalMachine | INTEGER | ID of the physical machine hosting the VM |
Host | VARCHAR | Name of the physical machine hosting the VM |
HypervisorType | VARCHAR | The type of hypervisor hosting the VM |
idEnterprise | INTEGER | The ID of the enterprise to which the VM belongs |
Enterprise | VARCHAR | Name of the enterprise to which the VM belongs |
idVirtualDataCenter | INTEGER | ID of the VDC which the VM belongs to |
VirtualDatacenter | VARCHAR | Name of the VDC which the VM belongs to |
idVirtualApp | INTEGER | ID of the virtual appliance to which the VM belongs |
VirtualAppliance | VARCHAR | Name of the virtual appliance to which the VM belongs |
idVM | INTEGER | ID of the VM |
VirtualMachine | VARCHAR | Name of the VM |
idImage | INTEGER | ID of the virtual image used by the VM |
VirtualImage | VARCHAR | Name of the virtual image used by the VM |
VirtualMachineState | VARCHAR | The current state of the VM |
idUser | INTEGER | ID of the user which owns the VM |
Owner | VARCHAR | Name of the user which owns the VM |
idCostCode | INTEGER | ID of the 'cost code' associated with the VM's virtual image |
CostCode | VARCHAR | Name of the 'cost code' associated with the VM's virtual image |
CPU | DECIMAL | The number of CPU cores used by the VM |
MemoryMB | DECIMAL | The amount of memory (in MB) used by the VM |
LocalStorageGB | DECIMAL | The amount of LOCAL STORAGE (in GB) used by the VM |
Network-centric RLS views
This group of views return data about VLAN usage (Internal, External, Public networks) and Public IP addresses.
RLS_NETWORK_USED_BY_VDC_V1_0_VW
View that returns a sum of all network resource usage (Total VLANs,Internal,External,Public), totalled by VDC.
RLS is applied by VDC restriction.
Column name | SQL type | Description |
---|---|---|
idVirtualDataCenter | INTEGER | ID of the VDC whose network resources are being summed |
idEnterprise | INTEGER | ID of enterprise to which the VDC belongs |
totalVlansUsed | INTEGER | Total number of VLANs used by the VDC for all network types |
totalIPsUsed | INTEGER | Total number of IP addresses allocated to VMs within the VDC for all network types |
internalNetworksUsed | INTEGER | Total number of internal/private networks used by the VDC |
internalIPsUsed | INTEGER | Total number of internal/private IP addresses allocated to VMs within the VDC |
externalNetworksUsed | INTEGER | Total number of external networks used by the VDC |
externalIPsUsed | INTEGER | Total number of external IP addresses allocated to VMs within the VDC |
publicNetworksUsed | INTEGER | Total number of public networks used by the VDC |
publicIPsUsed | INTEGER | Total number of public IP addresses allocated to VMs within the VDC |
RLS_NETWORK_USED_BY_ENTERPRISE_V1_0_VW
View that returns a sum of all network resource usage (Total VLANs, Internal,External,Public), totalled by Enterprise.
RLS is applied by Enterprise restriction.
Column name | SQL type | Description |
---|---|---|
idEnterprise | INTEGER | ID of enterprise whose network resources are being totalled |
totalVlansUsed | INTEGER | Total number of VLANs used by the enterprise for all network types |
totalIPsUsed | INTEGER | Total number of IP addresses allocated to VMs within the enterprise for all network types |
internalNetworksUsed | INTEGER | Total number of internal/private networks used by the Enterprise |
internalIPsUsed | INTEGER | Total number of internal/private IP addresses allocated to VMs within the enterprise |
externalNetworksUsed | INTEGER | Total number of external networks used by the enterprise |
externalIPsUsed | INTEGER | Total number of external IP addresses allocated to VMs within the enterprise |
publicNetworksUsed | INTEGER | Total number of public networks used by the Enterprise |
publicIPsUsed | INTEGER | Total number of public IP addresses allocated to VMs within the enterprise |
Storage-centric RLS views
This group of views returns information about the use of external storage. There are two types of views, those which return information groups by storage tier, and those which return information independent of storage tier.
RLS_STORAGE_USED_BY_VM_V1_0_VW
View that returns details of external storage usage, summed at VM level.
Note: This view is independent of storage tiers - please use RLS_STORAGE_TIER_USED_BY_VM_V1_0_VW for a tier-based breakdown by VDC
RLS is applied by VDC restriction.
Column name | SQL type | Description |
---|---|---|
idVM | INTEGER | ID of the VM whose external storage is being summed |
idEnterprise | INTEGER | ID of Enterprise to which the VM belongs |
idVirtualDataCenter | INTEGER | ID of the VDC which the VM belongs to |
extStorageMBAllocated | DECIMAL | Amount of external storage (in MB) allocated (across all tiers) to the VM |
RLS_STORAGE_USED_BY_VDC_V1_0_VW
View that returns details of external storage usage, summed at VDC level. Note: This view is independent of storage tiers - please use RLS_STORAGE_TIER_USED_BY_VDC_V1_0_VW
for a tier-based breakdown by VDC.
RLS is applied by VDC restriction.
Column name | SQL type | Description |
---|---|---|
idDataCenter | INTEGER | ID of the phyical datacenter whose external storage is being summed for the VDC |
idEnterprise | INTEGER | ID of enterprise to which the VDC belongs |
idVirtualDataCenter | INTEGER | ID of the VDC whose external storage is being totalled |
extStorageMBAllocated | DECIMAL | Amount of external storage (in MB) allocated (across all tiers) to the VDC. Note that this includes storage not assigned to VMs |
extStorageMBAssignedToVMs | DECIMAL | Amount of external storage (in MB) across all tiers which is assigned to VMs within the VDC. |
RLS_STORAGE_USED_BY_ENTERPRISE_V1_0_VW
View that returns details of external storage usage, summed at ENTERPRISE level. Note: This view is independent of storage tiers - please use RLS_STORAGE_TIER_USED_BY_ENTERPRISE_V1_0_VW for a tier-based breakdown by Enterprise.
RLS is applied by ENTERPRISE restriction.
Column name | SQL type | Description |
---|---|---|
idDataCenter | INTEGER | ID of the phyical datacenter whose external storage is being summed for the VDC |
idEnterprise | INTEGER | ID of enterprise whose external storage is being summed |
extStorageMBAllocated | DECIMAL | Amount of external storage (in MB) allocated (across all tiers) to the enterprise. Note that this includes storage not assigned to VMs |
extStorageMBAssignedToVMs | DECIMAL | Amount of external storage (in MB) across all tiers which is assigned to VMs within the enterprise. |
RLS_STORAGE_TIER_USED_BY_VM_V1_0_VW
View that returns the details of external storage usage by storage tier, summed at VM level.
RLS is applied by VDC restriction.
Column name | SQL type | Description |
---|---|---|
idVM | INTEGER | ID of the VM whose external storage is being summed |
idEnterprise | INTEGER | ID of enterprise to which the VM belongs |
idVirtualDataCenter | INTEGER | ID of the VDC which the VM belongs to |
idTier | INTEGER | ID of the storage tier being summed for the VM |
extStorageMBAllocated | DECIMAL | Amount of external storage (in MB) allocated in the tier to the VM |
RLS_STORAGE_TIER_USED_BY_VDC_V1_0_VW
View that returns details of external storage usage by storage tier, summed at VDC level.
RLS is applied by VDC restriction.
Column name | SQL type | Description |
---|---|---|
idDataCenter | INTEGER | ID of the phyical datacenter whose external storage is being summed for the VDC |
idEnterprise | INTEGER | ID of enterprise to which the VDC belongs |
idVirtualDataCenter | INTEGER | ID of the VDC whose external storage is being totalled |
idTier | INTEGER | ID of the storage tier being summed for the VDC |
extStorageMBAllocated | DECIMAL | Amount of external storage (in MB) allocated for the tier to the VDC. Note that this includes storage not assigned to VMs |
extStorageMBAssignedToVMs | DECIMAL | Amount of external storage (in MB) of the tier which is assigned to VMs within the VDC. |
RLS_STORAGE_TIER_USED_BY_ENTERPRISE_V1_0_VW
View that returns details of external storage usage by storage tier, summed at ENTERPRISE level.
RLS is applied by Enterprise restriction.
Column name | SQL type | Description |
---|---|---|
idDataCenter | INTEGER | ID of the phyical datacenter whose external storage is being summed for the VDC |
idEnterprise | INTEGER | ID of enterprise whose external storage is being summed |
idTier | INTEGER | ID of the storage tier being summed for the enterprise |
extStorageMBAllocated | DECIMAL | Amount of external storage (in MB) allocated to the tier for the enterprise. It includes storage not assigned to VMs |
extStorageMBAssignedToVMs | DECIMAL | Amount of external storage (in MB) of the tier which is assigned to VMs within the enterprise. |
Repository-centric RLS views
This group of views return information about enterprise usage of repository space within Appliance Libraries.
Note that repository usage includes Virtual Machine Templates and VM Instances; it DOES NOT include 'Persistent Images' which are stored outside of the repository using external storage.
RLS_REPOSITORY_USED_BY_ENTERPRISE_V1_0_VW
View that returns details of repository usage, summed at Enterprise level.
RLS is applied by Enterprise restriction.
Column name | SQL type | Description |
---|---|---|
idEnterprise | INTEGER | ID of enterprise whose repository usage is being summed |
repositoryUsageGB | DECIMAL | The amount of repository usage (in GB) for the enterprise. |
RLS_VIRTUAL_IMAGE_V1_0_VW
View that returns details of virtual images from the kinton.virtualimage table.
RLS is applied by Enterprise restriction.
Column name | SQL type | Description |
---|---|---|
kinton.virtualimage.* | * | All columns from the kinton.virtualimage table |
RLS_VIRTUAL_IMAGE_USE_BY_ENTERPRISE_V1_0_VW
View that returns IDs of virtual images (and the Enterprises which own them) along with counts of the VMs using the images.
RLS is applied by Enterprise restriction.
Column name | SQL type | Description |
---|---|---|
idEnterprise | INTEGER | ID of enterprise whose repository usage is being summed |
idImage | INTEGER | ID of the virtual image owned by the enterprise |
vmsUsingImage | INTEGER | The total number of VMs which are using the image. This includes VMs in the this enterprise, plus any other enterprises the user is entitled to see. |
vmsInOtherEnterpiseUsingImage | INTEGER | The total number of VMs in other enterprises that are using the virtual image. This total only includes the enterprises which the user is entitled to view. |
Pricing-centric RLS Views
RLS_PRICING_TEMPLATE_V1_0_VW
View that returns pricing template and its associated currency details.
RLS is applied by Enterprise restriction.
Column name | SQL type | Description |
---|---|---|
idEnterprise | INTEGER | ID of enterprise whose pricing details are contained in the row |
kinton.pricingTemplate.* | * | All rows from the kinton.pricingTemplate table |
symbol | VARCHAR | The currency symbol associated with the pricing template |
currencyName | VARCHAR | The currency name |
digits | INTEGER | The number of scale digits for the currency |
RLS_PRICING_TIERS_V1_0_VW
View that returns pricing information for the storage tiers.
RLS is applied by Enterprise restriction.
Column name | SQL type | Description |
---|---|---|
idEnterprise | INTEGER | ID of enterprise whose pricing details are contained in the row |
idTier | INTEGER | ID of the storage tier whose pricing details are included |
name | VARCHAR | Name of the storage tier |
idPricingTemplate | INTEGER | ID of the enterprise's pricing template |
price | DECIMAL | Price (per GB) for the storage tier |
symbol | VARCHAR | The currency symbol associated with the pricing template |
currencyName | VARCHAR | The currency name |
digits | INTEGER | The number of scale digits for the currency |
RLS_PRICING_COST_CODES_V1_0_VW
View that returns pricing information for cost codes
RLS is applied by Enterprise restriction.
Column name | SQL type | Description |
---|---|---|
idEnterprise | INTEGER | ID of enterprise whose pricing details are contained in the row |
idCostCode | INTEGER | ID of the cost code whose pricing details are included |
costCodeName | VARCHAR | Name of the cost code |
idPricingTemplate | INTEGER | ID of the enterprise's pricing template |
price | DECIMAL | Price for the cost code |
symbol | VARCHAR | The currency symbol associated with the pricing template |
currencyName | VARCHAR | The currency name |
digits | INTEGER | The number of scale digits for the currency |
RLS_PRICING_PER_HOUR_V1_0_VW
View that returns pricing information 'per hour' (i.e. for a given Enterprise's pricing template, works out how one hour's resource usage costs for each resource).
RLS applied by ENTERPRISE restriction.
Column name | SQL type | Description |
---|---|---|
idEnterprise | INTEGER | ID of enterprise whose pricing details are contained in the row |
cpu | DECIMAL | Cost of a CPU core |
memoryGB | DECIMAL | Cost of 1 GB of RAM |
hdGB | DECIMAL | Cost of 1GB of local (hypervisor) storage |
ip | DECIMAL | Cost of 1 public IP address |
vlan | DECIMAL | Cost of 1 VLAN |
standingCharge | DECIMAL | Fixed standing charge value assoicated with the enterprise's pricing template |
minimumCharge | DECIMAL | The minimum charge (per charging period) that should be billed against this enterprise |
chargingPeriod | INTEGER | Integer value identifying the pricing template's charging period |
chargingPeriodName | VARCHAR | Name of the charging period |
priceToHourConversion | DECIMAL | The divisor value by which the above resource costs should be divided by, in order to determine the resource cost 'per hour' |
currency | VARCHAR | String containing the currency symbol for the above prices |
Event Centric RLS views
RLS_EVENTS_V1_0_VW
View that returns events that have occurred in the system from the kinton.metering table. The events returned are restricted to those associated with Enterprises that are accessible to the user.
Column name | SQL type | Description |
---|---|---|
EventTime | TIMESTAMP | The date and time of the event |
Severity | VARCHAR | The severity of the event |
idEnterprise | DECIMAL | The id of the enterprise |
Enterprise | VARCHAR | The name of the enterprise |
idVirtualDataCenter | DECIMAL | The id of the VDC |
VirtualDataCenter | VARCHAR | The name of the VDC |
VirtualAppliance | VARCHAR | The name of the virtual appliance |
idUser | DECIMAL | The id of the user |
User | VARCHAR | The name of the user |
Component | VARCHAR | The component associated with the event e.g USER,NETWORK |
Action | VARCHAR | The action that the event performed e.g USER_CREATE,USER_MODFIY,VLAN_DELETED |
EventMessage | VARCHAR | Textual information that is specific to the event |
RLS_ADD_REMOVE_EVENTS_V1_0_VW
View that performs the very specific task of identifying from the metering table those events that specifically correspond to the creation and deletion of various components,
specifically it analyses the following components types:- USER,ENTERPRISE,VIRTUAL_MACHINE,VIRTUAL_APPLIANCE,VIRTUAL_DATACENTER.
The events returned are restricted to those associated with Enterprises that are accessible to the User.
Column name | SQL type | Description |
---|---|---|
EventTime | TIMESTAMP | The date and time of the event |
idEnterprise | DECIMAL | The id of the enterprise |
Enterprise | VARCHAR | The name of the enterprise |
Component | VARCHAR | The component associated with the event e.g USER,NETWORK |
Add_Event | INT | Returns 1 if the event was creation event else 0 |
Remove_Event | INT | Returns 1 if the event was deletion event else 0 |
Add_Remove_Delta | INT | Returns 1 if the event was creation event, -1 if the event was a deletion event or 0 if its undefined (it should never be 0) |
RLS_ADD_REMOVE_EVENTS_V2_0_VW
Semantically identical to RLS_ADD_REMOVE_EVENTS_V1_0_VW , but has additional functionality that it is able to interpret the USER_MODIFY event when
a user moves form one enterprise to another and returns two rows one for a Remove_Event for the old Enterprise and one for an Add_Event for the new Enterprise.
This functionality requires abiquo version 2.6.1 (and data created by that version) to operate which is the reason a separate version 2 exists.
Column name | SQL type | Description |
---|---|---|
EventTime | TIMESTAMP | The date and time of the event |
idEnterprise | DECIMAL | The id of the enterprise |
Enterprise | VARCHAR | The name of the enterprise |
Component | VARCHAR | The component associated with the event e.g USER,NETWORK |
Add_Event | INT | Returns 1 if the event was creation event else 0 |
Remove_Event | INT | Returns 1 if the event was deletion event else 0 |
Add_Remove_Delta | INT | Returns 1 if the event was creation event, -1 if the event was a deletion event or 0 if its undefined (it should never be 0) |
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved