[cisco-voip] Number of Partitions in CSS max 1024 chars?

Jason Aarons (AM) jason.aarons at dimensiondata.com
Mon Apr 20 16:44:26 EDT 2015


To clarify it’s not the variation of characters, but the maximum number of characters in a CSS is 1024.

Thus Chery’s birthday is clearly Dec 25th.

From: avholloway at gmail.com [mailto:avholloway at gmail.com] On Behalf Of Anthony Holloway
Sent: Monday, April 20, 2015 4:41 PM
To: Lelio Fulgenzi; Jason Aarons (AM)
Cc: cisco-voip (cisco-voip at puck.nether.net)
Subject: Re: [cisco-voip] Number of Partitions in CSS max 1024 chars?


Just sharing some interesting data on the topic...

The validation regex for the name of a partition is:  ^[a-zA-Z 0-9_-]{1,50}$

However, it's case-insensitive, and though a space is a valid character, you cannot start or end a name with spaces, they will be removed.

You can see the space removing function in the JS below; I've extracted the following functions:

// function jTrim:
//   javascript version of VBScript Trim function
// inputs:
//   s - a string object
// returns:
//   s with leading and trailing spaces removed (spaces within string remain intact)
//
function jTrim(s)
{
  if (typeof(s) == "string")
    s = jRTrim(jLTrim(s));
  return s;
}

function isNameValid(nameVal) {

  // We need to split the name based on the line feed character for Explorer Browsers.
  // Otherwise, the validiation check will fail
  // This check is only needed for Explorer, Netscape is ok
  //
  var nameArray = nameVal.split(/\r+/);
  nameVal = jTrim(nameArray[0]);

  reset_errors(errorArr);
  var msg = "";
  var check = /^[a-zA-Z 0-9_-]{1,50}$/;
  errorArr[0] = "true";
  errorArr[1] = "Name";
  if (nameVal.length > 0 ) {
    if (!check.test(nameVal)) {
       errorArr[4] = '- may only contain alphanumeric characters, space ( ), dashes (-), and underscores (_).';
       if (nameVal.length > 50) {
         errorArr[4] = '- must be less than 50 characters in length.';
       }
       msg += build_error_string(errorArr);
    }
  } else {
       errorArr[2] = '- is Required.  Please specify a value and try again.';
       msg += build_error_string(errorArr);
  }
  return msg;
}

With that out of the way, we now know that a leading and trailing space is not possible, which also rules out a name with solely spaces in the name (thank goodness!).

  A-Z
+ 0-9
+ " " (Space)
+ _ (Underscore)
+ - (Dash)
------------------------------
39 characters

The total 2 digit possibles with 39 characters is 39^2 = 1,521.  And if we take out the patterns with leading/trailing spaces, we lose 77 patterns and are left with 1,444.

But come on, who wants to name their partitions a meaningless "-_" (dash underscore)?  So, we're looking at a realistic naming convention of A9 to 99 (if A-Z0-9), then we have 1,296 realistically possible names.

On Mon, Apr 20, 2015 at 11:48 AM Lelio Fulgenzi <lelio at uoguelph.ca<mailto:lelio at uoguelph.ca>> wrote:
That's for two character partition names. My example was three character partition names. With two character partition names (assuming no case sensitivity) you get 36x36=1296 partition name combinations. I don't think that's enough.


---
Lelio Fulgenzi, B.A.
Senior Analyst, Network Infrastructure
Computing and Communications Services (CCS)
University of Guelph

519‐824‐4120 Ext 56354<tel:519%E2%80%90824%E2%80%904120%20Ext%2056354>
lelio at uoguelph.ca<mailto:lelio at uoguelph.ca>
www.uoguelph.ca/ccs<http://www.uoguelph.ca/ccs>
Room 037, Animal Science and Nutrition Building
Guelph, Ontario, N1G 2W1




itevomcid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20150420/3599fe1f/attachment.html>


More information about the cisco-voip mailing list