I am trying to create a resource where the resource's properties have different ACLS than the resource's general tab. I can do this through the web interface but can't seem to find a way through ectool.
The only way I know of doing it is by getting the resource's properties tab propertySheetId. Then applying the ACL to that. The problem is I can't get the propertySheetId.
Is this the right way or is there a better way?
I tried the obvious but it returns an error "No such property: 'propertySheetId'":
ectool getProperty "/resources/resourceName/propertySheetId"
Answer by cfulton · May 28, 2015 at 03:43 PM
Answer by mike westerhof · Jun 02, 2015 at 09:20 AM
I find it easier to use the object path instead of the Id.
The path to the top-level property-sheet on any object can be constructed by appending "/propertySheet" to the path to the object. The example below adds an Acl Entry for group "operations" to the propertySheet on the resource named "coal":
$ ectool getAclEntry group operations --path /resources/coal/propertySheet ectool error [NoSuchAclEntry]: An acl entry for group 'operations' does not exist $ ectool createAclEntry group operations --readPrivilege allow --modifyPrivilege allow \ --executePrivilege allow --changePermissionsPrivilege allow \ --path /resources/coal/propertySheet 02aa078b-0927-11e5-94aa-000c29b46065 operations group 1 $ ectool getAclEntry group operations --path /resources/coal/propertySheet 02aa078b-0927-11e5-94aa-000c29b46065 allow allow allow operations group allow 1 $ ectool getAclEntry group operations --path /resources/coal ectool error [NoSuchAclEntry]: An acl entry for group 'operations' does not exist $
By the way, instead of using FIND to pull out an individual element from the returned XML, you can ask ectool to do that for you:
$ ectool --valueOf //resource/propertySheetId getResource coal 8d3579b5-0925-11e5-a624-000c29b46065
Electric Cloud powers Continuous Delivery, helping organizations developing deliver better software faster by automating and accelerating build, test, and deployment processes at scale. Industry leaders like Qualcomm, SpaceX, Cisco, GE, Gap, and E*TRADE use Electric Cloud solutions to boost DevOps productivity and Agile throughput.