Package org.nimbustools.api.repr

Examples of org.nimbustools.api.repr.Caller


            if(vms == null || vms.length == 0)
                return errorMsg;

            for(int i = 0; i < vms.length; i++) {
                String id = vms[i].getID();
                Caller caller = vms[i].getCreator();
                manager.cleanup(id, manager.INSTANCE, caller);
            }

            return null;
        }
View Full Code Here


    @Test(dependsOnGroups="prereqs")
    public void leaseOne() throws Exception {
        logger.debug("leaseOne");
        final Manager rm = this.locator.getManager();

        final Caller caller = this.populator().getCaller();
        final CreateResult result =
                rm.create(this.populator().getCreateRequest("suite:basic:leaseOne"),
                          caller);

        final VM[] vms = result.getVMs();
View Full Code Here

    @Test(expectedExceptions = CreationException.class,
            expectedExceptionsMessageRegExp = ".*clientToken.*")
    public void testTooLongClientToken() throws Exception {
        final Manager rm = this.locator.getManager();

        final Caller caller = this.populator().getCaller();

        //65 character string, max token length is 64
        final String token = "akjfa34q9ufajalkja4fajlfdaldfkja94iw0459i34jwljrselkfjsldfkjgslkd";

        final CreateRequest request = this.populator().
View Full Code Here

    public void testBasicIdempotency() throws Exception {
        final Manager rm = this.locator.getManager();

        String token = UUID.randomUUID().toString();

        final Caller caller = this.populator().getCaller();


        // 1. first start a basic single VM with a clientToken

        final CreateRequest request1 = this.populator().getIdempotentCreateRequest("suite:basic:idempotency", token);
View Full Code Here

    public void testGroupIdempotency() throws Exception {
        final Manager rm = this.locator.getManager();

        String token = UUID.randomUUID().toString();

        final Caller caller = this.populator().getCaller();


        // 1. first start a group of 3 VMs with a clientToken

        final CreateRequest request1 = this.populator().
View Full Code Here

    public void testIdempotencyRollback() throws Exception {
        final Manager rm = this.locator.getManager();

        String token = UUID.randomUUID().toString();

        final Caller caller = this.populator().getCaller();


        // 1. make a request with impossibly high memory value, sure to be denied

        final CreateRequest request1 = this.populator().
View Full Code Here

        final Caller[] callers =
                this.manager.getAuthorizedManagers(this.id, this.type);
        if (callers != null) {
            for (int i = 0; i < callers.length; i++) {
                final Caller caller = callers[i];
                if (caller != null && !caller.isSuperUser()) {
                    map.map(caller.getIdentity(), "fakeuserid");
                }
            }
        }
        this.securityDescriptor.setGridMap(map);
    }
View Full Code Here

     */
    public void done(String callerDN) throws ManageException,
                                             DoesNotExistException,
                                             CoSchedulingException {

        final Caller caller = this.translate.getCaller(callerDN);
        this.manager.coscheduleDone(this.id, caller);
    }
View Full Code Here

        if (callerDN == null) {
            logger.error("REMOVE: no caller identity");
            throw new ResourceException("no caller identity", null);
        }

        final Caller caller = this.baseTranslate.getCaller(callerDN);

        try {
            this.manager.trash(this.id, this.type, caller);
        } catch (DoesNotExistException e) {
            throw new NoSuchResourceException(e.getMessage(), e);
View Full Code Here

     */
    public void start(String callerDN) throws OperationDisabledException,
                                              ManageException,
                                              DoesNotExistException {

        final Caller caller = this.translate.getCaller(callerDN);
        this.manager.start(this.id, Manager.GROUP, caller);
    }
View Full Code Here

TOP

Related Classes of org.nimbustools.api.repr.Caller

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.