Hi Sue,
No big surprises since I looked this over earlier, just a few new nits
(since I can always find more nits...)
publish_manifest.py:
64: Nit: "append" action should not specify a default of [] (same reason
you don't use mutable objects as default kwargs)
293, 298: One of these checks for man_criterion[0] being an int, the
other a string? Similarly, one has long(INFINITY) the other just has
INFINITY.
825: Nit: Best to add new keyword args to the *end,* just in case
someone was relying on the mapping of positional args -> keyword args -
i.e., the following syntax is syntactically legal, but now "broken" had
it been in use anywhere:
DataFiles(my_dir, my_path, my_db, my_file, my_dict, my_crit)
1281: Comment would be better if it explained why we need to add the .xml
list.py:
NYC (Not your changes), but on lines 1072/75/76, can you just change
those to "if OPTIONS.something:"? The "is True" bit bothers me. And
while I'm derailing everything, the function calls should be
"PEP8"-ified on 1069/73/78 by removing the spaces around '='.
installadm.1m.txt:
591: Curiosity - why the removal of the trailing '\'?
- Keith
On 10/13/10 09:32 AM, Sue Sohn wrote:
Could I please get a review of the changes for:
4322 installadm list should list name of the manifest that was used
for creation
12724 installadm list shouldn't append '.xml" to manifest names
6977446 name attribute of 'ai-instance' tag used as manifest filename
in AI database
6980684 criteria range checking for memory can fail for valid range
6980725 installadm list sometimes prints out range for mem criteria as
MAX-MIN,
rather than MIN-MAX
6987975 installadm list doesn't print range for mem if either min or
max is
"unbounded"
Webrev:
http://cr.opensolaris.org/~sohn/4322_et_al
Below is a draft of the heads up email to be sent upon integration of
the changes. Comments welcome on this as well.
Thanks,
Sue
---------------------------------
Heads Up: AI manifest naming
If you don't use the Automated Installer, you can safely delete this
message.
With the integration of
<TBD>
the way that AI manifest names are assigned has changed:
1. The AI manifest ai_instance name attribute is now optional (see
Note 1)
2. The usage of installadm add-manifest has changed:
Previous usage:
add-manifest -m <manifest> -n <svcname>
[-c <criteria=value|range> ... | -C <criteria.xml>]
New usage:
add-manifest -n <svcname> -f <manifest_file> [-m <manifest_name>]
[-c <criteria=value|range> ... | -C <criteria.xml>]
The path to the manifest file is now specified with "-f", rather than
"-m". The
"-m" is optional and can be used to specify the manifest name on the
command
line, if desired. The name of the manifest is obtained from (in this
order):
1) installadm add-manifest command line "-m" option, if present
2) name attribute in manifest, if present
3) manifest filename
Unless the name of the manifest is "default", no ".xml" is appended to
the
name.
NOTES:
1. A name attribute must continue to be specified in the manifest for
the following cases:
o When using installadm tools from a build prior to this integration.
o When adding a manifest to a service whose image was built prior to this
integration. However, this name may be overridden by specifying the
name of
the manifest on the command line with the "-m" option.
2. Existing scripts that contain installadm add-manifest commands need
to be
changed to use the "-f" option rather than the "-m" option, otherwise the
command will fail as follows:
# installadm add-manifest -n svc1 -m /tmp/my_manifest.xml
Usage: add-manifest -n service_name -f manifest_file [-m
<manifest_name>]
[-c <criteria=value|range> ... | -C criteria_file]
add-manifest: error: Missing one or more required options.
Failure running subcommand add-manifest.
3. Already published manifests are not affected by these changes.
EXAMPLES:
1: Replace the default manifest for an existing install service,
service_092910, with a custom manifest, my_manifest.xml. The
manifest contains a name attribute, name="default", which
designates it as the default manifest, i.e.:
<ai_instance name="default">
# installadm add-manifest -f my_manifest.xml -n service_092910
2: Add the manifest in /export/my_manifest to svc1, specifying the
name with the -m option:
# installadm add-manifest -f /export/my_manifest -n svc1
-m chosen_name -c IPV4="10.0.2.100-10.0.2.199"
# installadm list -m -n svc1
Manifest Criteria
-------- --------
chosen_name ipv4 = 10.0.2.100 - 10.0.2.199
3: Add the manifest in /export/manifest3 to svc1, specifying the
name with the manifest name attribute, name="my_name", i.e.:
<ai_instance name="my_name">
# installadm add-manifest -f /export/manifest3 -n svc1
-c MEM="2048-unbounded"
# installadm list -m -n svc1
Manifest Criteria
-------- --------
my_name mem = 2048 MB - unbounded
4: Add the manifest in /export/my_manifest to svc1, with no
manifest name attribute specified in the manifest:
# installadm add-manifest -f /export/my_manifest -n svc1
-c MAC="aa:bb:cc:dd:ee:ff"
In this example, the manifest name is taken from the file name:
# installadm list -m -n svc1
Manifest Criteria
-------- --------
my_manifest mac = AA:BB:CC:DD:EE:FF
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss