Package org.nimbustools.api.services.rm

Examples of org.nimbustools.api.services.rm.Manager.create()


        logger.info(rm.getVMMReport());

        // Three regular VMs should preempt
        Caller caller = this.populator().getCaller();
        CreateRequest req = this.populator().getCreateRequest("regular", 1200, 256 , 3);
        rm.create(req, caller);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);

        logger.info(rm.getVMMReport());
View Full Code Here


        logger.info(rm.getVMMReport());

        // One regular VM that needs all the 512 RAM should preempt
        Caller caller = this.populator().getCaller();
        CreateRequest req = this.populator().getCreateRequest("regular", 1200, 512 , 1);
        rm.create(req, caller);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);

        logger.info(rm.getVMMReport());
View Full Code Here

        final Caller caller = this.populator().getCaller();
        final CreateRequest request =
                this.populator().getCreateRequest("suite:issue26:tooMuchMemory", 240, 3584, 1);
        boolean impossibleMemory = false;
        try {
            final CreateResult result = rm.create(request, caller);
        } catch (ImpossibleAmountOfMemoryException e) {
            impossibleMemory = true;
        }
        assertTrue(impossibleMemory);
    }
View Full Code Here

        final long startMs = System.currentTimeMillis();

        boolean notEnoughMemory = false;
        try {
            rm.create(req, caller);
        } catch (NotEnoughMemoryException e) {
            notEnoughMemory = true;
        }

        final long endMs = System.currentTimeMillis();
View Full Code Here

        // In 10 seconds, trigger the shutdown task to start succeeding
        this.suiteExecutor.submit(new DestroyEnableFutureTask(10));

        final long startMs = System.currentTimeMillis();
        final CreateResult result = rm.create(req, caller);

        final long endMs = System.currentTimeMillis();
        final long totalSeconds = (endMs - startMs) / 1000;
        logger.info("Total seconds: " + totalSeconds);
View Full Code Here

    public void memoryFreed() throws Exception {
        final Manager rm = this.locator.getManager();
        final Caller caller = this.populator().getCaller();
        final CreateRequest request =
                this.populator().getCreateRequest("memoryFreed", 240, 63, 1);
        final CreateResult result = rm.create(request, caller);
        final VM[] vms = result.getVMs();

        VmmNode node = getNodes()[0];
        assertFalse(node.isVacant());
View Full Code Here

        final Caller caller = this.populator().getCaller();
        final CreateRequest request =
                this.populator().getCreateRequest("badNetworkMemoryFreed", 240, 63, 1, null, "notarealnetwork");
        boolean gotError = false;
        try {
            rm.create(request, caller);

        } catch (ResourceRequestDeniedException e) {
            gotError = true;
            logger.error("Got error", e);
        }
View Full Code Here

        /* One */
        final CreateRequest req =
                this.populator().getCreateRequestCustomNetwork(
                        "suite:issue37:leaseOnePublicOnePrivate",
                        "public");
        final CreateResult result = rm.create(req, caller);

        final VM[] vms = result.getVMs();
        assertEquals(1, vms.length);
        assertNotNull(vms[0]);
        logger.info("Leased vm '" + vms[0].getID() + '\'');
View Full Code Here

        /* Two */
        final CreateRequest req2 =
                this.populator().getCreateRequestCustomNetwork(
                        "suite:issue37:leaseOnePublicOnePrivate",
                        "private");
        final CreateResult result2 = rm.create(req2, caller);

        final VM[] vms2 = result2.getVMs();
        assertEquals(1, vms2.length);
        assertNotNull(vms2[0]);
        logger.info("Leased vm '" + vms2[0].getID() + '\'');
View Full Code Here

        /* One */
        final CreateRequest req =
                this.populator().getCreateRequestCustomNetwork(
                        "suite:issue37:leaseTwoPrivate",
                        "private");
        final CreateResult result = rm.create(req, caller);

        final VM[] vms = result.getVMs();
        assertEquals(1, vms.length);
        assertNotNull(vms[0]);
        logger.info("Leased vm '" + vms[0].getID() + '\'');
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.