Package com.cloud.bridge.service.core.ec2

Examples of com.cloud.bridge.service.core.ec2.EC2Engine


            for ( int i=0; i < filterSet.length; i++ )
                afs.addFilter( filterSet[i] );
            ec2Request.setFilterSet( afs );
        }
        // -> execute the request
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();
        serializeResponse(response, EC2SoapServiceImpl.toDescribeAddressesResponse( engine.describeAddresses( ec2Request)));
    }
View Full Code Here


    }

    private void allocateAddress( HttpServletRequest request, HttpServletResponse response )
            throws ADBException, XMLStreamException, IOException {

        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();

        AllocateAddressResponse ec2Response = EC2SoapServiceImpl.toAllocateAddressResponse( engine.allocateAddress());

        serializeResponse(response, ec2Response);
    }
View Full Code Here

    }

    private void releaseAddress( HttpServletRequest request, HttpServletResponse response )
            throws ADBException, XMLStreamException, IOException {

        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();

        String publicIp = request.getParameter( "PublicIp" );
        if (publicIp == null) {
            throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - PublicIp");
        }

        EC2ReleaseAddress ec2Request = new EC2ReleaseAddress();
        if (ec2Request != null) {
            ec2Request.setPublicIp(publicIp);
        }

        ReleaseAddressResponse EC2Response = EC2SoapServiceImpl.toReleaseAddressResponse( engine.releaseAddress( ec2Request ));

        serializeResponse(response, EC2Response);
    }
View Full Code Here

        serializeResponse(response, EC2Response);
    }

    private void associateAddress( HttpServletRequest request, HttpServletResponse response )
            throws ADBException, XMLStreamException, IOException {
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();

        String publicIp = request.getParameter( "PublicIp" );
        if (null == publicIp) {
            throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - PublicIp");
        }
        String instanceId = request.getParameter( "InstanceId" );
        if (null == instanceId) {
            throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - InstanceId");
        }

        EC2AssociateAddress ec2Request = new EC2AssociateAddress();
        if (ec2Request != null) {
            ec2Request.setInstanceId(instanceId);
            ec2Request.setPublicIp(publicIp);
        }

        AssociateAddressResponse ec2Response = EC2SoapServiceImpl.toAssociateAddressResponse( engine.associateAddress( ec2Request ));

        serializeResponse(response, ec2Response);
    }
View Full Code Here

        serializeResponse(response, ec2Response);
    }

    private void disassociateAddress( HttpServletRequest request, HttpServletResponse response )
            throws ADBException, XMLStreamException, IOException {     
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();

        String publicIp = request.getParameter( "PublicIp" );
        if (null == publicIp) {
            throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - PublicIp");
        }

        EC2DisassociateAddress ec2Request = new EC2DisassociateAddress();
        if (ec2Request != null) {
            ec2Request.setPublicIp(publicIp);
        }

        DisassociateAddressResponse ec2Response = EC2SoapServiceImpl.toDisassociateAddressResponse( engine.disassociateAddress( ec2Request ) );

        serializeResponse(response, ec2Response);
    }
View Full Code Here

            for (EC2Filter filter : filterSet) gfs.addFilter( filter );
            EC2request.setFilterSet( gfs );
        }

        // -> execute the request
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();

        DescribeSecurityGroupsResponse EC2response = EC2SoapServiceImpl.toDescribeSecurityGroupsResponse( engine.describeSecurityGroups( EC2request ));
        serializeResponse(response, EC2response);
            }
View Full Code Here

            for( int i=0; i < filterSet.length; i++ ) sfs.addFilter( filterSet[i] );
            EC2request.setFilterSet( sfs );
        }

        // -> execute the request
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();
        DescribeSnapshotsResponse EC2response = EC2SoapServiceImpl.toDescribeSnapshotsResponse(
                engine.describeSnapshots( EC2request ));
        serializeResponse(response, EC2response);
            }
View Full Code Here

            for( int i=0; i < filterSet.length; i++ ) vfs.addFilter( filterSet[i] );
            EC2request.setFilterSet( vfs );
        }

        // -> execute the request
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();
        DescribeVolumesResponse EC2response = EC2SoapServiceImpl.toDescribeVolumesResponse(
                ServiceProvider.getInstance().getEC2Engine().describeVolumes( EC2request ), engine);
        serializeResponse(response, EC2response);
            }
View Full Code Here

        else {
            throw new EC2ServiceException(ClientError.MissingParamter, "Missing required parameter - VolumeId");
        }

        // -> execute the request
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();
        CreateSnapshotResponse EC2response = EC2SoapServiceImpl.toCreateSnapshotResponse(engine.createSnapshot(volumeId), engine);
        serializeResponse(response, EC2response);
    }
View Full Code Here

                }
            }
        }

        // -> execute the request
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();
        RunInstancesResponse EC2response = EC2SoapServiceImpl.toRunInstancesResponse(engine.runInstances(EC2request), engine);
        serializeResponse(response, EC2response);
    }
View Full Code Here

TOP

Related Classes of com.cloud.bridge.service.core.ec2.EC2Engine

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.