comanage-users - [comanage-users] Problem creating new provisioner plugin
Subject: COmanage Users List
List archive
- From: Duncan Brown <>
- To: "" <>
- Subject: [comanage-users] Problem creating new provisioner plugin
- Date: Sun, 17 Nov 2019 01:41:11 +0000
Hi all,
I'm trying to create a new provisioner plugin, starting from the
GitHubProvisioner as a base, but I can't get past the following error when
trying to configure the plugin:
comanage-registry_comanage-registry.1.dkcvymquud9x@docker-desktop |
2019-11-17 01:22:24 Error: [InvalidArgumentException] No CO Specified
comanage-registry_comanage-registry.1.dkcvymquud9x@docker-desktop |
Request URL:
/registry/rest_dcc_provisioner/co_rest_dcc_provisioner_targets/edit/8
comanage-registry_comanage-registry.1.dkcvymquud9x@docker-desktop | Stack
Trace:
comanage-registry_comanage-registry.1.dkcvymquud9x@docker-desktop | #0
/srv/comanage-registry/app/Controller/SPTController.php(46):
AppController->beforeFilter()
It looks like calculateImpliedCoId is failing to get the CO Id. For some
reason, my new plugin's model seems incomplete. A dump of the model shows
that it's missing actsAs, belongsTo, validate, etc. but I can't figure out
why:
{"useDbConfig":"default","useTable":"co_rest_dcc_provisioner_targets","id":null,"data":[],"schemaName":null,"table":"co_rest_dcc_provisioner_targets","primaryKey":"id","validate":[],"validationErrors":[],"validationDomain":null,"plugin":"RestDccProvisioner","name":"CoRestDccProvisionerTarget","alias":"CoRestDccProvisionerTarget","tableToModel":{"co_rest_dcc_provisioner_targets":"CoRestDccProvisionerTarget"},"cacheQueries":false,"belongsTo":[],"hasOne":[],"hasMany":[],"hasAndBelongsToMany":[],"actsAs":null,"Behaviors":{"modelName":"CoRestDccProvisionerTarget","defaultPriority":10},"whitelist":[],"cacheSources":true,"findQueryType":null,"recursive":1,"order":null,"virtualFields":[],"__backAssociation":[],"__backInnerAssociation":[],"__backOriginalAssociation":[],"__backContainableAssociation":[],"__safeUpdateMode":false,"useConsistentAfterFind":true,"findMethods":{"all":true,"first":true,"count":true,"neighbors":true,"list":true,"threaded":true}}
Compared to the GitHubProvisioner:
{"name":"CoGithubProvisionerTarget","actsAs":["Containable"],"belongsTo":{"CoProvisioningTarget":{"className":"CoProvisioningTarget","foreignKey":"co_provisioning_target_id","conditions":"","fields":"","order":"","counterCache":""}},"displayField":"github_user","validate":{"co_provisioning_target_id":{"rule":"numeric","required":true,"message":"A
CO Provisioning Target ID must be
provided"},"github_user":{"rule":"notBlank"},"github_org":{"rule":["maxlength",80]},"client_id":{"rule":"notBlank"},"client_secret":{"rule":"notBlank"},"access_token":{"rule":["maxlength",80]},"provision_group_members":{"rule":"boolean"},"remove_unknown_members":{"rule":"boolean"},"provision_ssh_keys":{"rule":"boolean"}},"useDbConfig":"default","useTable":"co_github_provisioner_targets","id":null,"data":[],"schemaName":null,"table":"co_github_provisioner_targets","primaryKey":"id","validationErrors":[],"validationDomain":null,"plugin":"GithubProvisioner","alias":"CoGithubProvisionerTarget","tableToModel":{"co_github_provisioner_targets":"CoGithubProvisionerTarget"},"cacheQueries":false,"hasOne":[],"hasMany":[],"hasAndBelongsToMany":[],"Behaviors":{"modelName":"CoGithubProvisionerTarget","defaultPriority":10},"whitelist":[],"cacheSources":true,"findQueryType":null,"recursive":1,"order":null,"virtualFields":[],"__backAssociation":[],"__backInnerAssociation":[],"__backOriginalAssociation":[],"__backContainableAssociation":[],"__safeUpdateMode":false,"useConsistentAfterFind":true,"findMethods":{"all":true,"first":true,"count":true,"neighbors":true,"list":true,"threaded":true}}
The code for my model sets the actsAs, belongsTo, validate:
<https://github.com/duncan-brown/comanage-registry/blob/dcc-provisioner/app/AvailablePlugin/RestDccProvisioner/Model/CoRestDccProvisonerTarget.php>
So I'm not sure what I've messed up. Any suggestions are appreciated.
Cheers,
Duncan.
--
Duncan Brown Room 263-1, Physics Department
Charles Brightman Professor of Physics Syracuse University, NY 13244
http://dabrown.expressions.syr.edu Phone: 315 443 5993
- [comanage-users] Problem creating new provisioner plugin, Duncan Brown, 11/17/2019
- Re: [comanage-users] Problem creating new provisioner plugin, Benn Oshrin, 11/17/2019
- Re: [comanage-users] Problem creating new provisioner plugin, Duncan Brown, 11/17/2019
- Re: [comanage-users] Problem creating new provisioner plugin, Benn Oshrin, 11/17/2019
Archive powered by MHonArc 2.6.19.