Package org.candlepin.policy.js.pool

Examples of org.candlepin.policy.js.pool.PoolHelper


        when(config.getBoolean(ConfigProperties.STANDALONE)).thenReturn(true);
        consumer.setType(new ConsumerType(ConsumerTypeEnum.CANDLEPIN));
        Pool pool = setupVirtLimitPool();
        Entitlement e = new Entitlement(pool, consumer, 1);

        PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);

        enforcer.postEntitlement(consumer, postHelper, e);
        verify(poolManagerMock, never()).createPool(any(Pool.class));
        verify(poolManagerMock, never()).updatePoolQuantity(any(Pool.class), anyInt());
View Full Code Here


        when(config.getBoolean(ConfigProperties.STANDALONE)).thenReturn(true);
        Pool pool = setupVirtLimitPool();
        consumer.setFact("virt.is_guest", "true");
        Entitlement e = new Entitlement(pool, consumer, 1);

        PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);

        enforcer.postEntitlement(consumer, postHelper, e);
        verify(poolManagerMock, never()).createPool(any(Pool.class));
        verify(poolManagerMock, never()).updatePoolQuantity(any(Pool.class), anyInt());
View Full Code Here

        // Initial entitlement from one of the pools:
        stackedEnts.add(createEntFromPool(pool2));
        when(entCurMock.findByStackId(consumer, STACK)).thenReturn(stackedEnts);

        PoolHelper helper = new PoolHelper(poolManagerMock, productCache,
            stackedEnts.get(0));
        stackDerivedPool = helper.createHostRestrictedPool(prod2.getId(), pool2, "6");
    }
View Full Code Here

        // To reflect what we just added to the db.
        pool.setConsumed(pool.getConsumed() + quantity);
        if (consumer.getType().isManifest()) {
            pool.setExported(pool.getExported() + quantity);
        }
        PoolHelper poolHelper = new PoolHelper(this, productCache, entitlement);
        handler.handlePostEntitlement(consumer, poolHelper, entitlement);

        // Check consumer's new compliance status and save:
        complianceRules.getStatus(consumer, null, false, false);
        consumerCurator.update(consumer);
View Full Code Here

                }
            }
        }

        // post unbind actions
        PoolHelper poolHelper = new PoolHelper(this, productCache, entitlement);
        enforcer.postUnbind(consumer, poolHelper, entitlement);

        if (regenModified) {
            // Find all of the entitlements that modified the original entitlement,
            // and regenerate those to remove the content sets.
View Full Code Here

TOP

Related Classes of org.candlepin.policy.js.pool.PoolHelper

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.