Package com.openshift.client

Examples of com.openshift.client.IDomain


    /**
     * Creates a name validator that checks there isn't an application of the given name already
     */
    NameValidator createNameValidator(CreateOpenshiftContainerOptions options) {
        IUser user = getOrCreateConnection(options).getUser();
        final IDomain domain =  getOrCreateDomain(user, options);
        return new NameValidator() {
            @Override
            public boolean isValid(String name) {
                IApplication application = domain.getApplicationByName(name);
                return application == null;
            }
        };
    }
View Full Code Here


    @Override
    protected Object doExecute() throws Exception {
        IOpenShiftConnection connection = getOrCreateConnection();
        IUser user = connection.getUser();
        IDomain domain = domainId != null ? user.getDomain(domainId) : user.getDefaultDomain();
        if (domainId != null && domain == null) {
            domain = user.createDomain(domainId);
        }

        IApplication application = domain.createApplication(applicationName, new StandaloneCartridge(cartridge), null, new GearProfile(gearProfile));
        System.out.println(application.getCreationLog());
        return null;
    }
View Full Code Here

TOP

Related Classes of com.openshift.client.IDomain

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.