Package io.fathom.cloud.compute.api.os.model

Examples of io.fathom.cloud.compute.api.os.model.SecurityGroupRule


    @POST
    public WrappedSecurityGroupRule createRule(WrappedSecurityGroupRule request) throws Exception {
        Auth auth = getAuth();

        SecurityGroupRule rule = request.rule;
        long securityGroupId = Long.valueOf(rule.parentGroupId);

        SecurityGroupData securityGroupData = securityGroups.find(getProject(), securityGroupId);
        if (securityGroupData == null) {
            throw new WebApplicationException(Status.NOT_FOUND);
View Full Code Here


    public void deleteRule(@PathParam("id") long id) throws CloudException {
        securityGroups.deleteRule(getAuth(), getProject(), id);
    }

    static SecurityGroupRule toModel(SecurityGroupData parent, SecurityGroupRuleData data) throws CloudException {
        SecurityGroupRule model = new SecurityGroupRule();

        model.id = (int) data.getId();

        if (data.getIpProtocolCount() != 0) {
            int ipProtocol = data.getIpProtocol(0);
View Full Code Here

TOP

Related Classes of io.fathom.cloud.compute.api.os.model.SecurityGroupRule

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.