Skip to content

Commit

Permalink
Remove 32 GiB memory limit on XRv9000
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmatthews committed Feb 21, 2017
1 parent 7d11406 commit 30a423f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ Change Log
All notable changes to the COT project will be documented in this file.
This project adheres to `Semantic Versioning`_.

`Unreleased`_
-------------

**Changed**

- Removed 32 MiB memory limitation on Cisco IOS XRv 9000 platform.

`1.9.0`_ - 2017-02-13
---------------------

Expand Down
11 changes: 3 additions & 8 deletions COT/platforms/cisco_iosxrv_9000.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# September 2016, Glenn F. Matthews
# Copyright (c) 2013-2016 the COT project developers.
# Copyright (c) 2013-2017 the COT project developers.
# See the COPYRIGHT.txt file at the top-level directory of this distribution
# and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt.
#
Expand All @@ -15,9 +15,7 @@
import logging

from COT.platforms.cisco_iosxrv import IOSXRv
from COT.data_validation import (
ValueTooLowError, ValueTooHighError, validate_int,
)
from COT.data_validation import ValueTooLowError, validate_int

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -67,19 +65,16 @@ def validate_cpu_count(cls, cpus):

@classmethod
def validate_memory_amount(cls, mebibytes):
"""Minimum 8 GiB, maximum 32 GiB.
"""Minimum 8 GiB, no known maximum (128GiB+ is permitted).
Args:
mebibytes (int): RAM, in MiB.
Raises:
ValueTooLowError: if ``mebibytes`` is less than 8192
ValueTooHighError: if ``mebibytes`` is more than 32768
"""
if mebibytes < 8192:
raise ValueTooLowError("RAM", str(mebibytes) + " MiB", "8 GiB")
elif mebibytes > 32768:
raise ValueTooHighError("RAM", str(mebibytes) + " MiB", "32 GiB")

@classmethod
def validate_nic_count(cls, count):
Expand Down
5 changes: 2 additions & 3 deletions COT/platforms/tests/test_cisco_iosxrv_9000.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# test_cisco_iosxrv_9000.py - Unit test cases for Cisco IOS XRv9k platform
#
# October 2016, Glenn F. Matthews
# Copyright (c) 2014-2016 the COT project developers.
# Copyright (c) 2014-2017 the COT project developers.
# See the COPYRIGHT.txt file at the top-level directory of this distribution
# and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt.
#
Expand Down Expand Up @@ -52,8 +52,7 @@ def test_memory_amount(self):
self.cls.validate_memory_amount, 8191)
self.cls.validate_memory_amount(8192)
self.cls.validate_memory_amount(32768)
self.assertRaises(ValueTooHighError,
self.cls.validate_memory_amount, 32769)
self.cls.validate_memory_amount(128 * 1024)

def test_nic_count(self):
"""Test NIC range limits."""
Expand Down

0 comments on commit 30a423f

Please sign in to comment.