Project

General

Profile

« Previous | Next » 

Revision a2f70da3

Added by Ermal Luçi over 17 years ago

Disable some bandwidth checks(revisit later on)

View differences:

etc/inc/shaper.inc
1295 1295
                       $input_errors[] = "Bandwidth in percentage should be between 1 and 100 bounds.";
1296 1296
                 }
1297 1297

  
1298
/*
1298 1299
                $parent =& $this->GetParent();
1299 1300
                switch ($data['bandwidthtype']) {
1300 1301
                       case "%":
1301 1302
                             $myBw = $parent->GetAvailableBandwidth() * floatval($data['bandwidth']) / 100;
1302 1303
                       default:
1303
                             $mybw = floatval($data['bandwiddth']) * get_bandwidthtype_scale($data['bandwidthtype']);
1304
                             $mybw = floatval($data['bandwidth']) * get_bandwidthtype_scale($data['bandwidthtype']);
1304 1305
                             break;
1305 1306
                }
1306 1307
                if ($parent->GetAvailableBandwidth() < $myBw)
1307 1308
                        $input_errors[] = "The sum of child bandwidths exceeds that of the parent.";
1309
*/
1310

  
1308 1311
                if ($data['priority'] > 7)
1309 1312
                        $input_errors[] = "Priority must be an integer between 1 and 7.";
1310 1313
		}
......
1320 1323
		if ($data['upperlimit3'] <> "" && !is_valid_shaperbw($data['upperlimit3']))
1321 1324
			$input_errors[] = ("upperlimit m2 value needs to be Kb, Mb, Gb, or %");
1322 1325

  
1326
/*
1323 1327
		if (isset($data['upperlimit']) && $data['upperlimit3'] <> "" && $data['upperlimit1'] <> "") {
1324 1328
		$bw_1 = get_hfsc_bandwidth($this, $data['upperlimit1']);
1325 1329
		$bw_2 = get_hfsc_bandwidth($this, $data['upperlimit3']);
......
1330 1334
		if (get_interface_bandwidth($this) < (0.8 * (floatval($bw_1) + floatval($bw_2))))
1331 1335
			$input_errors[] = ("upperlimit specification excedd 80% of allowable allocation.");
1332 1336
		}
1337
*/
1338

  
1333 1339
		if ($data['linkshare1'] <> "" &&  $data['linkshare2'] == "")
1334 1340
			$input_errors[] = ("linkshare service curve defined but missing (d) value");
1335 1341
		if ($data['linkshare2'] <> "" &&  $data['linkshare1'] == "")
......
1345 1351
		if ($data['realtime2'] <> "" &&  $data['realtime1'] == "")
1346 1352
			$input_errors[] = ("realtime service curve defined but missing initial bandwidth (m1) value");
1347 1353

  
1354
/*
1348 1355
		if (isset($data['linkshare']) && $data['linkshare3'] <> "" && $data['linkshare1'] <> "") {
1349 1356
		$bw_1 = get_hfsc_bandwidth($this, $data['linkshare1']);
1350 1357
                $bw_2 = get_hfsc_bandwidth($this, $data['linkshare3']);
......
1355 1362
                if (get_interface_bandwidth($this) < (0.8 * (floatval($bw_1) + floatval($bw_2))))
1356 1363
                        $input_errors[] = ("linkshare specification excedd 80% of allowable allocation.");
1357 1364
		}
1365
*/
1366

  
1358 1367
		if ($data['realtime1'] <> "" && !is_valid_shaperbw($data['realtime1']))
1359 1368
			$input_errors[] = ("realtime m1 value needs to be Kb, Mb, Gb, or %");
1360 1369
		if ($data['realtime2'] <> "" && !is_numeric($data['realtime2']))
......
1362 1371
		if ($data['realtime3'] <> "" && !is_valid_shaperbw($data['realtime3']))
1363 1372
			$input_errors[] = ("realtime m2 value needs to be Kb, Mb, Gb, or %");
1364 1373

  
1374
/*
1365 1375
		if (isset($data['realtime']) && $data['realtime3'] <> "" && $data['realtime1'] <> "") {
1366 1376
		$bw_1 = get_hfsc_bandwidth($this, $data['realtime1']);
1367 1377
                $bw_2 = get_hfsc_bandwidth($this, $data['realtime3']);
......
1372 1382
                if (get_interface_bandwidth($this) < (0.8 * (floatval($bw_1) + floatval($bw_2))))
1373 1383
                        $input_errors[] = ("realtime specification excedd 80% of allowable allocation.");
1374 1384
		}
1385
*/
1375 1386

  
1376 1387
	}
1377 1388

  
......
1820 1831
                       $input_errors[] = "Bandwidth in percentage should be between 1 and 100 bounds.";
1821 1832
           }
1822 1833

  
1834
/*
1823 1835
           $parent =& $this->GetParent();
1824 1836
           switch ($data['bandwidthtype']) {
1825 1837
                       case "%":
1826 1838
                             $myBw = $parent->GetAvailableBandwidth() * floatval($data['bandwidth']) / 100;
1827 1839
                       default:
1828
                             $mybw = floatval($data['bandwiddth']) * get_bandwidthtype_scale($data['bandwidthtype']);
1840
                             $mybw = floatval($data['bandwidth']) * get_bandwidthtype_scale($data['bandwidthtype']);
1829 1841
                             break;
1830 1842
           }
1831 1843
                if ($parent->GetAvailableBandwidth() < floatval($myBw))
1832 1844
                        $input_errors[] = "The sum of child bandwidths exceeds that of the parent.";
1845
*/
1833 1846
	}
1834 1847
		function ReadConfig(&$q) {
1835 1848
				parent::ReadConfig($q);

Also available in: Unified diff