use of org.apache.cloudstack.api.command.user.project.DeleteProjectCmd in project cloudstack by apache.
the class NetworkProviderTest method deleteProject.
public void deleteProject(String name) {
BaseCmd cmd = new DeleteProjectCmd();
BaseCmd proxy = ComponentContext.inject(cmd);
ProjectVO project = _projectDao.findByNameAndDomain(name, Domain.ROOT_DOMAIN);
try {
ManagementServerMock.setParameter(proxy, "id", BaseCmd.CommandType.LONG, project.getId());
((DeleteProjectCmd) proxy).execute();
if (_api.findById(net.juniper.contrail.api.types.Project.class, project.getUuid()) != null) {
fail("unable to delete project in vnc");
}
} catch (Exception e) {
e.printStackTrace();
fail("Exception while deleting project");
}
}
Aggregations