X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C72AD0.16C017B0@onstor-exch02.onstor.net>; Thu, 28 Dec 2006 14:32:42 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: FW: cli refactoring project 
Date: Thu, 28 Dec 2006 14:32:42 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E01E2BE50@onstor-exch02.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: cli refactoring project 
thread-index: AccqxmsqTH57kKynSGyc0sEmOHqavwACGNpQ
From: "Jay Michlin" <jay.michlin@onstor.com>
To: "dl-Cougar" <dl-Cougar@onstor.com>
Cc: "Charissa Willard" <charissa.willard@onstor.com>,
	"Brian DeForest" <brian.deforest@onstor.com>,
	"Jeyaram Sankar Gurusamy \(HCL\)" <jeyaramg@onstor.com>

Hello all,

Charissa brought up the question of how the ongoing CLI refactoring
project will interact with Cougar. Her email below gives details.

Both are major strategic projects spanning many months with both major
potential benefits and also considerable implications. To the extent
that we implement Linux in Cougar, and perhaps take advantage of Linux'
more capable shell or IP communication options, we could be affecting
the CLI work.

That would be easy to remedy early in the project by adapting the CLI
work to the Cougar environment we plan. It could be much harder later in
the project.

So by this message, and Charissa's below, I'll alert everyone working on
Cougar to the matter. Perhaps we should have a brief session early in
the new year to make sure Cougar people are acquainted with the existing
CLI and shell infrastructure to guide our decisions going forward.

Happy holidays,
jay

-----Original Message-----
From: Charissa Willard=20
Sent: Thursday, December 28, 2006 1:23 PM
To: Jay Michlin
Cc: Brian DeForest
Subject: cli refactoring project=20

Jay,

=20

The parsing part of the cli refactoring project specifies refactoring
the nfxsh code for parsing purposes. Before we continue down this path,
I think we need to find out how long we will be supporting the nfxsh.
When the nfxsh goes away so does this new parsing code. Larry said that
they are deciding on the use of the nfxsh in Cougar. If the nfxsh goes
away, we need to have a plan for how to handle cli commands outside of
any existing nfxsh code. We should be doing this now, perhaps as part
Cougar. Also, for the parsing design phase, it would be helpful to know
what the new shell will be since parsing appears to be tightly coupled
to the shell. Other issues we need to consider under Cougar are:

=20

1.)    Replacing sscccc, which is a wrapper around the nfxsh code that
supports the web-ui.

2.)    Communication for the web-ui when sscccc goes away. (Do we use a
web server?)

=20

With that said, I believe that the design specified in the FS may be a
bit more complicated than it should be. Basically we just want to parse
the command line, validate the parameters and populate the structures
for the command's corresponding handler. The validation template
specified in the FS seems a bit much. The example in the FS is as
follows:

=20

cluster add nasgateway NASGATEWAYNAME{"
NASGATEWAYNAME,%s,^[a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]$", OFFSET,
LENGTH, LEN_OFFSET, LEN_LENGTH} -a IPADDRESS{%I, OFFSET, LENGTH,}

=20

We may want to separate out the valid char string (in blue above) as the
same chars should apply to most string parameters. We can have a default
string and provide for exceptions to this rule by using something like a
bitmap against the entire list of possible chars. Also, the use of an
OFFSET (in green above) for mapping a parameter on the command line to
its corresponding data structure parameter seems like it can be made
simpler or perhaps explained in a bit more detail to show that this is
indeed a simple/efficient method of handling the parameters. The
alternative is to directly populate each parameter for the object being
passed to the commands corresponding command handler. (This is what we
currently do).

=20

Let me know what you think about doing the cli refactoring project as
part Cougar and not using the current nfxsh code.

=20

Thanks,

Charissa

=20

=20

=20

=20

=20

=20

=20

=20

