Revert "Temporary revert current function moveItem"
This reverts commit e204aac4e8ac42a14b5290b0acc3595bbcba9e6e.
Reason for revert: <Not needed more - redirect has been added>
Related-PROD: RE-3325
Change-Id: I6cfff1065c2cce81948f3391f9f3841a926c0c00
diff --git a/src/com/mirantis/mcp/MCPArtifactory.groovy b/src/com/mirantis/mcp/MCPArtifactory.groovy
index 4297939..881e44a 100644
--- a/src/com/mirantis/mcp/MCPArtifactory.groovy
+++ b/src/com/mirantis/mcp/MCPArtifactory.groovy
@@ -130,21 +130,6 @@
/**
* Move/copy an artifact or a folder to the specified destination
- *
- * @param artifactoryURL String, an URL to Artifactory
- * @param sourcePath String, a source path to the artifact including repository name
- * @param dstPath String, a destination path to the artifact including repository name
- * @param copy boolean, whether to copy or move the item, default is move
- * @param dryRun boolean, whether to perform dry run on not, default is false
- */
-def moveItem (String artifactoryURL, String sourcePath, String dstPath, boolean copy = false, boolean dryRun = false) {
- def url = "${artifactoryURL}/api/${copy ? 'copy' : 'move'}/${sourcePath}?to=/${dstPath}&dry=${dryRun ? '1' : '0'}"
- def http = new com.mirantis.mk.Http()
- return http.doPost(url, 'artifactory')
-}
-
-/**
- * Move/copy an artifact or a folder to the specified destination
* Uses curl to download/upload/delete files since /api/copy and /api/move are not supported
*
* @param artifactoryURL String, an URL to Artifactory
@@ -153,7 +138,7 @@
* @param copy boolean, whether to copy or move the item, default is move
* @param dryRun boolean, whether to perform dry run on not, default is false
*/
-def moveItemNew (String artifactoryURL, String sourcePath, String dstPath, boolean copy = false, boolean dryRun = false, String credentialsId = 'artifactory') {
+def moveItem (String artifactoryURL, String sourcePath, String dstPath, boolean copy = false, boolean dryRun = false, String credentialsId = 'artifactory') {
def respCode = 200
def respText = ''