Package io.fathom.cloud.server.model

Examples of io.fathom.cloud.server.model.Project


        throw new IllegalArgumentException();

    }

    private Response addRemoveSecurityGroup(InstanceData instance, String name, boolean remove) throws CloudException {
        Project project = getProject();

        Long id = Long.valueOf(name);
        SecurityGroupData sg = securityGroups.find(project, id);

        // SecurityGroupData sg = securityGroups.find(project, request.name);
View Full Code Here


        return Response.accepted().build();
    }

    private Response createImage(InstanceData instance, CreateImageRequest request) throws IOException, CloudException {
        Project project = getProject();

        ImageService.Image image = computeServices.createImage(project, instance, request);

        String location = imageService.getUrl(httpRequest, image.getId());
View Full Code Here

        return Response.ok().header(HttpHeaders.LOCATION, location).build();
    }

    private Response removeFloatingIp(InstanceData instance, RemoveFloatingIpRequest request) throws CloudException {
        Project project = getProject();

        ipPools.detachFloatingIp(project, instance, request);

        return Response.ok().build();
    }
View Full Code Here

        return Response.ok().build();
    }

    protected Response addFloatingIp(InstanceData instance, AddFloatingIpRequest request) throws CloudException {
        Project project = getProject();

        ipPools.attachFloatingIp(project, instance, request);

        return Response.ok().build();
    }
View Full Code Here

    }

    @GET
    @Path("{id}/os-security-groups")
    public SecurityGroupList listSecurityGroups(@PathParam("id") String id) throws CloudException {
        Project project = getProject();

        InstanceData instance = getInstance(id);

        SecurityGroupList response = new SecurityGroupList();
View Full Code Here

    private ServerList listServers(boolean details) throws CloudException {
        Auth auth = getAuth();

        boolean allTenants = httpRequest.getParameter("all_tenants") != null;

        Project filterProject = getProject();
        if (allTenants) {
            filterProject = null;
        }

        List<InstanceData> instances = computeServices.listInstances(auth, filterProject);
View Full Code Here

    @Override
    public BlobData getImageBlob(Image i) throws IOException {
        ImageImpl image = (ImageImpl) i;
        ImageData data = image.getData();

        Project project = new Project(data.getOwnerProject());
        BlobData imageData = findImageData(project, data);
        return imageData;
    }
View Full Code Here

    @POST
    public WrappedDbInstance createDbInstance(WrappedDbInstance request) throws CloudException {
        // {"instance": {"volume": {"size": 1}, "flavorRef": "1", "name":
        // "db1"}}
        Project project = getProject();

        throw new UnsupportedOperationException();
    }
View Full Code Here

        if (!auth.checkProject(projectId)) {
            return null;
        }

        Project project = new Project(projectId);
        return project;
    }
View Full Code Here

    }

    @Override
    public Project getProject() {
        if (token.hasProjectId()) {
            return new Project(token.getProjectId());
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of io.fathom.cloud.server.model.Project

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.