Search in sources :

Example 1 with CreateNetworkACLCmd

use of org.apache.cloudstack.api.command.user.network.CreateNetworkACLCmd in project cloudstack by apache.

the class NetworkACLServiceTest method setUp.

@Override
@Before
public void setUp() {
    ComponentContext.initComponentsLifeCycle();
    Account account = new AccountVO("testaccount", 1, "testdomain", (short) 0, UUID.randomUUID().toString());
    UserVO user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone", UUID.randomUUID().toString(), User.Source.UNKNOWN);
    CallContext.register(user, account);
    createACLItemCmd = new CreateNetworkACLCmd() {

        @Override
        public Long getACLId() {
            return 3L;
        }

        @Override
        public Integer getNumber() {
            return 1;
        }

        @Override
        public String getProtocol() {
            return "TCP";
        }
    };
    acl = new NetworkACLVO() {

        @Override
        public Long getVpcId() {
            return 1L;
        }

        @Override
        public long getId() {
            return 1L;
        }
    };
    aclItem = new NetworkACLItemVO() {

        @Override
        public long getAclId() {
            return 4L;
        }
    };
}
Also used : Account(com.cloud.user.Account) NetworkACLVO(com.cloud.network.vpc.NetworkACLVO) UserVO(com.cloud.user.UserVO) CreateNetworkACLCmd(org.apache.cloudstack.api.command.user.network.CreateNetworkACLCmd) AccountVO(com.cloud.user.AccountVO) NetworkACLItemVO(com.cloud.network.vpc.NetworkACLItemVO) Before(org.junit.Before)

Aggregations

NetworkACLItemVO (com.cloud.network.vpc.NetworkACLItemVO)1 NetworkACLVO (com.cloud.network.vpc.NetworkACLVO)1 Account (com.cloud.user.Account)1 AccountVO (com.cloud.user.AccountVO)1 UserVO (com.cloud.user.UserVO)1 CreateNetworkACLCmd (org.apache.cloudstack.api.command.user.network.CreateNetworkACLCmd)1 Before (org.junit.Before)1