[ https://issues.apache.org/jira/browse/CLOUDSTACK-10361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
KuiLIU resolved CLOUDSTACK-10361. --------------------------------- Resolution: Fixed > Inconsistent method name "getVlanAccount" > ----------------------------------------- > > Key: CLOUDSTACK-10361 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10361 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: KuiLIU > Priority: Major > > The following method is named "getVlanAccount", but the method is not a > simple getter. > It tries to find an account with the provided vlanId. > Then, the method name "findVlanAccount" should be more intuitive than the > "getVlanAccount". > {code:java} > @Override > public Account getVlanAccount(final long vlanId) { > final Vlan vlan = _vlanDao.findById(vlanId); > // if vlan is Virtual Account specific, get vlan information from the > // accountVlanMap; otherwise get account information > // from the network > if (vlan.getVlanType() == VlanType.VirtualNetwork) { > final List<AccountVlanMapVO> maps = > _accountVlanMapDao.listAccountVlanMapsByVlan(vlanId); > if (maps != null && !maps.isEmpty()) { > return _accountMgr.getAccount(maps.get(0).getAccountId()); > } > } > return null; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)