Package io.fathom.cloud.openstack.client

Examples of io.fathom.cloud.openstack.client.OpenstackClient


        runSshCommand("id-role-grant", "-u", username, "-p", password, "-touser", username, "-proj", project, "-r",
                "admin");

        {
            TokenProvider tokenProvider = AuthTokenProvider.build(identityClient, project, username, password);
            OpenstackClient client = OpenstackClient.build(tokenProvider);

            V2ProjectList projects = client.getIdentity().listProjects();

            assertEquals(1, projects.tenants.size());
            assertEquals(project, projects.tenants.get(0).name);
            assertEquals(true, projects.tenants.get(0).enabled);
        }

        String password2 = "moresecrets";
        runSshCommand("id-password-change", "-u", username, "-p", password2, "-o", workdir.resolve("passwordrecovery")
                .toString());

        {
            TokenProvider tokenProvider = AuthTokenProvider.build(identityClient, project, username, password2);
            OpenstackClient client = OpenstackClient.build(tokenProvider);

            V2ProjectList projects = client.getIdentity().listProjects();

            assertEquals(1, projects.tenants.size());
            assertEquals(project, projects.tenants.get(0).name);
            assertEquals(true, projects.tenants.get(0).enabled);
        }
View Full Code Here


        String project = identityClient.getUtils().ensureProjectWithPrefix("__federation__");

        CertificateAuthTokenProvider tokenProvider = new CertificateAuthTokenProvider(identityClient, project,
                certificateAndKey);

        OpenstackClient openstackClient = OpenstackClient.build(tokenProvider);

        BootstrapConfigStoreProvider configStoreProvider = new BootstrapConfigStoreProvider(openstackClient);

        return configStoreProvider;
    }
View Full Code Here

        }

        CertificateAuthTokenProvider tokenProvider = new CertificateAuthTokenProvider(identityClient, project,
                certificateAndKey);

        OpenstackClient openstackClient = OpenstackClient.build(tokenProvider);
        return openstackClient;
    }
View Full Code Here

    @Override
    public String createZone(Project project, String zone, String topZone, DnsSuffixData suffixData)
            throws CloudException {
        try {
            OpenstackClient openstackClient = getOpenstackClient();
            OpenstackDnsClient dns = openstackClient.getDns();

            Zone request = new Zone();
            request.name = zone;

            Zone response = dns.createZone(request);
View Full Code Here

TOP

Related Classes of io.fathom.cloud.openstack.client.OpenstackClient

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.