예제 #1
0
        private void WideIpRange(int ipRangeId, bool notify = true)
        {
            var ipRange = IPRanges.Where(ir => ir.Id == ipRangeId).FirstOrDefault();

            if (ipRange != null)
            {
                var subnets = Subnets.Where(s => s.IPRangeId == ipRangeId).ToList();
                ipRange.WideSubnet(subnets);
                if (notify)
                {
                    NotifySubnetChange();
                }
            }
        }
예제 #2
0
        public void SetVnetStartIp(int irId, string ip)
        {
            if (string.IsNullOrEmpty(ip))
            {
                return;
            }

            var ipRange = IPRanges.Where(ir => ir.Id == irId).FirstOrDefault();

            if ((ipRange?.StartIP ?? null) != ip)
            {
                ipRange.StartIP = ip;
                NotifyVnetStartIpChange();
            }
        }