Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1165063

Summary: [kie-config-cli] Refactor to use REST instead of VFS
Product: [Retired] JBoss BPMS Platform 6 Reporter: manstis
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED NOTABUG QA Contact: Pavel Kralik <pkralik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.0CC: kverlaen, mbaluch, smcgowan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-09 12:30:04 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description manstis 2014-11-18 09:13:00 UTC
Description of problem:

kie-config-cli currently clones system.git and other repositories locally (i.e. to the same computer as the tool itself is being ran). It does this to manipulate settings and query repositories for projects etc.

Proposed enhancement replaces the local manipulation of cloned repositories with manipulation of repositories within the workbench using REST APIs. This requires additions to the REST API (to be able to add/remove roles to OUs, Repositories and Projects). Furthermore since each REST call would be an atomic operation we'd loose the ability to discard changes.

Version-Release number of selected component (if applicable):

6.2.0.x (Community), 6.1.0.x (Product)

Comment 1 Marco Rietveld 2014-11-19 20:38:26 UTC
I've done a quick inventory of the current commands (https://github.com/droolsjbpm/kie-wb-distributions/tree/master/kie-config-cli/src/main/java/org/kie/config/cli/command/impl) and matched them to the existing REST API operations.

My *unofficial* estimate is:
- 30 (+/- 10) hours work for initial implementation of the 10 commands below: most of the time is ironically for API design in order to ensure API flexibility (future modifications are possible) and forwards/backwards compatibility (future modifications don't impact existing ones). 
- Another 40 hours for integration testing and bugfixing. 

- new: 
AddDeploymentConfigCliCommand: 
+ via org.guvnor.structure.deployment.DeploymentConfigService
AddRoleToOrganizationalUnitCliCommand
+ via existing code, (easy)
AddRoleToProjectCliCommand
+ via existing code, (easy)
AddRoleToRepositoryCliCommand
+ via existing code, (easy)
ListDeploymentsCliCommand
+ via org.guvnor.structure.deployment.DeploymentConfigService
PushGitRepositoryCliCommand
+ via org.uberfire.io.IOService
RemoveDeploymentConfigCliCommand
+ via org.guvnor.structure.deployment.DeploymentConfigService
RemoveRoleFromOrganizationalUnitCliCommand
+ via existing code, (easy)
RemoveRoleFromProjectCliCommand
+ via existing code, (easy)
RemoveRoleFromRepositoryCliCommand
+ via existing code, (easy)

- already exists in REST API:  
AddRepositoryToOrganizationalUnitCliCommand
CloneGitRepositoryCliCommand
CreateOrganizationalUnitCliCommand
CreateRepositoryCliCommand
ListOrganizationalUnitCliCommand
ListRepositoriesCliCommand
RemoveOrganizationalUnitCliCommand
RemoveRepositoryCliCommand
RemoveRepositoryFromOrganizationalUnitCliCommand

- not related to REST API? 
DiscardCliCommand
ExitCliCommand
HelpCliCommand

Comment 2 Marco Rietveld 2015-12-09 12:30:04 UTC
Moved to https://issues.jboss.org/browse/GUVNOR-2324