Skip to content

Commit

Permalink
Remove unneeded code from ansible credentials controller
Browse files Browse the repository at this point in the history
The code is not needed since

    ManageIQ/manageiq#14483

has been merged.
  • Loading branch information
mzazrivec committed Mar 28, 2017
1 parent a3e98a7 commit a66b602
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ ManageIQ.angular.app.controller('ansibleCredentialsFormController', ['$window',
.catch(miqService.handleFailure);
} else {
vm.select_options.push({'label':__('<Choose>'), 'value': ''});
// FIXME: this should go away once https://github.com/ManageIQ/manageiq/pull/14483 is merged
vm.credentialModel.organization = 1; // work-around, organization id needs to be filled in automatically by the backend

// credential creation requires manager_resource
API.get('/api/providers?collection_class=ManageIQ::Providers::EmbeddedAutomationManager')
.then(setManagerResource)
Expand Down Expand Up @@ -65,7 +62,6 @@ ManageIQ.angular.app.controller('ansibleCredentialsFormController', ['$window',
};

vm.addClicked = function(angularForm) {
addCredentialKind();
API.post('/api/authentications/', vm.credentialModel)
.then(getBack(sprintf(__("Add of Credential \"%s\" has been successfully queued."), vm.credentialModel.name)))
.catch(miqService.handleFailure);
Expand Down Expand Up @@ -117,11 +113,5 @@ ManageIQ.angular.app.controller('ansibleCredentialsFormController', ['$window',
vm.credentialModel.manager_resource = { "href": response.resources[0].href };
}

// FIXME: this should go away once https://github.com/ManageIQ/manageiq/pull/14483 is merged
// For creation, we need to send json like: {"kind": "scm", "type": "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ScmCredential"}
function addCredentialKind() {
vm.credentialModel.kind = vm.credential_options[vm.credentialModel.type].type;
}

init();
}]);

0 comments on commit a66b602

Please sign in to comment.