...
Users and Roles
To setup users and roles using the populator you need to place the required details inside the Microsoft Excel Workbooks found in the users-and-roles
folder. Only the rows in the first sheet are considered. To add users, you need to include the details inside a .xls
file starting with the name users
. This file needs to have the values in the given order.
- Username
- Password
- Comma-separated list of Roles
- E-mail Address
- First Name
- Last Name.
Panel |
---|
The following is an example of how the Excel sheet would look: |
From the list mentioned above, only the username is mandatory. If the password is not specified it defaults to username123
(e.g.:- john123). If you specify the e-mail address, it is included in the user profile. If the e-mail address is specified and the first or last names are not specified, the username is used for that respective field.
To add roles, you need to include the details inside a .xls
file starting with the name roles
. This file needs to have the values in the given order.
- Role Name
- Comma-separated list of Permissions
Panel |
---|
The following is an example of how the Excel sheet would look: |
Both fields are mandatory. If the role name equals to admin
or everyone
, a new role is not created. The existing role is used and permissions are reset accordingly.
Registry Extension Types
The populator can install and configure new registry extension types. All such types need to be defined in .rxt
files found inside the registry-extensions
folder.
See /wiki/spaces/~yohanna@wso2.com/pages/21233721 for more information.
Resources and Collections
To setup resources and collections, include the required details in the Microsoft Excel Workbooks found in the data
folder. Only the rows in the first sheet are considered. To add RXT-based assets, you need to include the details inside a .xls
file starting with the name asset
. This file needs needs to have a header row which contains the keys of each attribute you are going to set for the added assets. In addition to that, the key of the asset (e.g.:- service, API, or URI) added needs to be specified in a separate column named key
. Due to differences between some assets, you might not be able to add more than one type of asset using a single spreadsheet. In such situations you can use more than one .xls
file. Subsequent rows should have the actual data that is being added.
To add text resources or collections, you need to include the details inside a .xls
file starting with the name resource
. This file needs to have the values in the given order.
- Resource Path
- Resource Content
- Description
The resource path is the only mandatory field, and if the content is not given, a collection is created instead of a resource. The media type is set to text/plain
at the time of resource creation. If the description is not specified, a sample description "This resource was added using the WSO2 Governance Registry Sample Data Populator", is added. If the resource already exists, a new resource is not added. The provided details are used to add properties instead. Therefore, for existing resources, this file needs to have the following values in the given order.
- Resource Path
- Property Key
- Property Value
The property value is not mandatory, and if specified, a new property is added with the given key and value. If not specified, the property with the existing key is removed. The populator also allows you to upload resources from the file system and import resources from remote URLs. These resources need to be specified inside a .xls
file starting with the name import
. This file needs to have the values in the given order.
- Resource Path
- Resource URL (e.g.:-
http://acme.org/john-doe.jpg
,file:///home/john/
john-doe.jpg
) - Media Type (e.g.:-
image/jpeg
) - Description
WSDL
, Schema
, Policy
) and the path is in the format of /_system/governance/somename.ext
. If the description is not specified, a sample description "This resource was added using the WSO2 Governance Registry Sample Data Populator", is added. If the resource already exists, a new resource is added overwriting the existing one.See Resources for more information.
Comments, Ratings and Tags
The populator supports adding, removing and updating comments, ratings and tags of resources and collections. To comment, rate or tag resources, put the required details inside Microsoft Excel Workbooks (.xls
files) starting with the name community
inside the data
folder. Only the rows in the first sheet are considered. This file needs to have the values in the given order.
- Type of Operation (e.g.:-
comment
,rate
,tag
) - Resource Path
- Value
Panel |
---|
The following is an example of how the Excel sheet would look: |
Please note that the first two fields are mandatory. To add a comment, rating or tag, the value is required. Comments and ratings can be updated and a value must be provided in such cases. Comments and tags can be deleted (setting a rating to 0 removes the rating) and a value must not be provided in such cases. To update or delete a comment, the path should be provided with the comment identifier (e.g.:- /foo/bar;comments:1
). To delete a tag, the path should be provided with the tag identifier (e.g.:- /foo/bar;tags:foobar
).
See Managing the Assets for more information.
Associations and Dependencies
To create associations or dependencies between resources, put the required details inside Microsoft Excel Workbooks (.xls
files) starting with the name association
inside the data
folder. Only the rows in the first sheet are considered. This file needs to have the values in the given order.
- Source Resource Path
- Target Resource Path
- Association Type
Please note that all these fields are mandatory. To add dependencies, simply set the association type as depends
.
See Associations and Dependencies for more information.
Lifecycle Operations
The populator is also capable of performing various lifecycle operations on resources and collections such as adding/removing lifecycle, voting, checking items on the checklist or performing an action (e.g.:- Promote
, Demote
). To perform lifecycle operations you need to create Microsoft Excel Workbooks (.xls
files) starting with the name actions
inside the lifecycle-operations
folder. Only the rows in the first sheet are considered. These files need to have the values in the given order.
- Resource Path
- Lifecycle Name (e.g.:- ServiceLifeCycle)
- Action (e.g.:-
itemClick
,voteClick
,Promote
,Demote
) - Item State
- Operation Input Parameters
The resource path and the lifecycle name is mandatory. If only these two fields are present, the lifecycle is either added or removed from the resource depending on whether it currently exists or not. If an action is provided, the item state also needs to be provided. For example, if you checked the first two items on a checklist having three items in total, the state would be {true
,true
,false
}. Some operations do require additional input parameters, depending on the type of resource involved. This depends on the transition executions and scripts that are triggered (read more under Configuring Lifecycles).
See Lifecycles for more information.
Resource Permissions
Permissions for resources and collections can be populated by placing the corresponding details inside Microsoft Excel Workbooks (.xls
files) starting with the name permission
inside the data
folder. Only the rows in the first sheet are considered. The populator expects the file to have the following values.
- Resource Path
- Role Name
- Permission String
All of the above is mandatory. The permission string is a comma-separated list of {ra
, wa
, da
, aa
, rd
, wd
, dd
, and ad
}. The first character denotes the type of operation, read
, write
, delete
or authorize
and the second represents allow
or deny
. (e.g.:- to allow read/write and to deny delete set the permission string as "ra,wa,dd
").
See also Role Permissions.
Multitenancy Aspects
Tenants can be added using the populator. You need to place the required details inside Microsoft Excel Workbooks found in the users-and-roles
folder. Only the rows in the first sheet are considered. To add tenants, you need to include the details inside a .xls
file starting with the name tenants
. This file needs to have the values in the given order.
- Admin Username
- Admin Password
- Admin's E-mail Address
- Admin's First Name
- Admin's Last Name
- Tenant Domain
All of the above are mandatory. Once tenants have been created either through the populator or using the management console, all of the above mentioned operations (except for creating tenants) can be run as a tenant user. In order to do this, change the username and password in the build.xml
file to match those of the tenant. Please note that the username of a tenant includes the tenant domain.
See Multitenancy for For more information, see Multitenancy.
Excerpt | ||
---|---|---|
| ||
Instructions on how to use the Sample Data Populator included with the Asset Models Sample. |