Idea - Brad Ascar? (2014 Summit?) Use Case Prototyping (need better word) non-migrating Design Rest API Automate UI Relationships Habtm (only ?) Future Reporting Tagging Chargeback (?) Talk Topic
Removed: * For external use only
Generic Objects - Bill Wei - ManageIQ Design Summit 2016
Bill Wei - Red Hat
What is a generic object?
Why generic objects are needed?
Who can access generic objects?
What is a Generic Object
It is an “object”
It is like an object
It has a definition
Define in runtime
Each type has an unique name and user defined
Stored in four tables - one for definitions, one for objects, one
for attributes, and one for relationships
Why generic objects are needed
Talk topic: Generic objects in AE Model
Good for quickly adding capability of collecting and
provisioning resources that are not yet officially supported
Examples include Load Balancer or RDS Database
A basis for modeling official ManageIQ support
Who can access generic objects
UI REST client
Use Case: Create generic object definitions
Create/List/Update/Delete generic object definitions through
It has a type name, an icon representation, and a
It defines type specific attributes
It defines associations to other resources
Update/deletion of definitions that already have instances
Use Case: Provider resource provisioning through service
Purpose: Provision a new resource type that is not supported in ManageIQ
● Create a Generic Catalog Item
● Catalog item runs a state machine with typical pre-provisioning,
provisioning, check-provisioned, post-provisioning steps
● Create the resource in the provider through API (for example, AWS
● Create a corresponding generic object in ManageIQ
● Add associations to other objects (Generic or Rails Models)
● Resulting generic objects can be shown in UI or reports, with
Use Case: Process generic objects through automate
Generic objects can be shown in ManageIQ UI
User can add a button to a generic object
The button is connected to an automate entry-point where
the generic object can be processed
Use Case: Use generic objects in a service
Generic objects can be directly accessed or passed in as a
parameter in any step of an existing service state machine,
for example, the pre-provisioning, provisioning, or post-
provisioning method of a vm provisioning.
GenericObjectDefinition with attributes
GenericObject with attributes setters/getters
Expose in automate
Full CRUD for definitions
User script to create a generic object and get/set attributes
Examples - REST API endpoints
Examples: CRUD on generic object definitions
Create POST /api/object_definitions/
POST /api/object_definitions/ via action: "create"
Query All Definitions GET /api/object_definitions/
Query One Definition GET /api/object_definitions/:id
Update Multiple Definitions POST /api/object_definitions action: "edit"
Update Definition POST /api/object_definitions/[:id|:name] action: "edit"
Delete a definition DELETE /api/object_definitions/[:id|:name]
or POST /api/object_definitions/[:id|:name] action: "delete"
Note: Must fail if objects of this type exists.
Example: CRUD on generic objects
Create POST /api/object_definition/[:id|:name]/objects
or POST /api/objects
Query All Objects GET /api/objects
Query Objects of same Definition GET /api/object_definitions/[:id|:name]/objects
possibly: GET /api/objects?filter=object_definition.name='<name>'
Update an object POST /api/objects/:id action: "edit"
Delete an object DELETE /api/objects/:id
POST /api/objects/:id action: "delete"
Delete multiple objects POST /api/objects action: "delete"
Can be tagged
Can be reported on
Can be used for chargeback
Can have an associated graphic image
Can be used in widgets
It is an active record but not true active record
Updates to the generic object definition (custom attributes
and relationships) have no protection for existing generic
Limited querying capability