Search in sources :

Example 1 with CreateNetworkACLCmd

use of com.cloud.api.command.user.network.CreateNetworkACLCmd in project cosmic by MissionCriticalCloud.

the class NetworkACLServiceTest method setUp.

@Override
@Before
public void setUp() {
    ComponentContext.initComponentsLifeCycle();
    final Account account = new AccountVO("testaccount", 1, "testdomain", (short) 0, UUID.randomUUID().toString());
    final 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 Integer getNumber() {
            return 1;
        }

        @Override
        public String getProtocol() {
            return "TCP";
        }

        @Override
        public Long getACLId() {
            return 3L;
        }
    };
    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(com.cloud.api.command.user.network.CreateNetworkACLCmd) AccountVO(com.cloud.user.AccountVO) NetworkACLItemVO(com.cloud.network.vpc.NetworkACLItemVO) Before(org.junit.Before)

Aggregations

CreateNetworkACLCmd (com.cloud.api.command.user.network.CreateNetworkACLCmd)1 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 Before (org.junit.Before)1