author | Kristina Tripp <Kristina.Tripp@Sun.COM> |
Wed, 27 Jul 2011 10:12:11 -0600 | |
changeset 1331 | 41bc8cab0ad5 |
parent 1320 | bb767e3cc519 |
child 1356 | 5d3d88f3d447 |
permissions | -rw-r--r-- |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1 |
# |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2 |
# CDDL HEADER START |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
3 |
# |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
4 |
# The contents of this file are subject to the terms of the |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
5 |
# Common Development and Distribution License (the "License"). |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
6 |
# You may not use this file except in compliance with the License. |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
7 |
# |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
9 |
# or http://www.opensolaris.org/os/licensing. |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
10 |
# See the License for the specific language governing permissions |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
11 |
# and limitations under the License. |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
12 |
# |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
18 |
# |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
19 |
# CDDL HEADER END |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
20 |
# |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
21 |
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
22 |
# |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
23 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
24 |
import os |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
25 |
import shutil |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
26 |
import tempfile |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
27 |
import unittest |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
28 |
import lxml.etree as etree |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
29 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
30 |
import solaris_install.js2ai as js2ai |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
31 |
|
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
32 |
from solaris_install.js2ai.common import ARCH_GENERIC, ARCH_SPARC, ARCH_X86 |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
33 |
from solaris_install.js2ai.common import ConversionReport |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
34 |
from solaris_install.js2ai.common import KeyValues |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
35 |
from solaris_install.js2ai.common import DEFAULT_AI_FILENAME |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
36 |
from solaris_install.js2ai.common import DEFAULT_AI_DTD_FILENAME |
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
37 |
from solaris_install.js2ai.common import fetch_xpath_node |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
38 |
from solaris_install.js2ai.common import pretty_print |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
39 |
from solaris_install.js2ai.common import write_xml_data |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
40 |
from solaris_install.js2ai.common import validate |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
41 |
from solaris_install.js2ai.conv import XMLProfileData |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
42 |
from solaris_install.js2ai.conv import XMLRuleData |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
43 |
from solaris_install.js2ai.default_xml import XMLDefaultData |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
44 |
from test_js2ai import failure_report |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
45 |
|
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
46 |
TEST_PROFILE_NAME = "profile.xml" |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
47 |
|
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
48 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
49 |
class Test_Profile(unittest.TestCase): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
50 |
"""Test Profile code""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
51 |
default_xml = None |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
52 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
53 |
def setUp(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
54 |
"""Setup test run""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
55 |
# Create a directory to work in |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
56 |
self.working_dir = tempfile.mkdtemp() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
57 |
self.log_file = os.path.join(self.working_dir, js2ai.LOGFILE) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
58 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
59 |
# Test to see if the default xml file is present |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
60 |
# on the system. It isn't guaranteed to be present unless |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
61 |
# the package pkg:/system/install/auto-install/auto-install-common |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
62 |
# is installed. If it is present use it. If not we'll create |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
63 |
# a barebones xml file |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
64 |
if os.path.isfile(DEFAULT_AI_FILENAME): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
65 |
default_xml_filename = DEFAULT_AI_FILENAME |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
66 |
else: |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
67 |
default_xml_filename = None |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
68 |
|
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
69 |
self.default_xml = XMLDefaultData(default_xml_filename) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
70 |
js2ai.logger_setup(self.working_dir) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
71 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
72 |
def tearDown(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
73 |
"""Clean up test run""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
74 |
# Delete everything when we are done |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
75 |
shutil.rmtree(self.working_dir) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
76 |
|
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
77 |
def get_xml_contents(self, filename): |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
78 |
"""Read in the xml file and return it's contents""" |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
79 |
|
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
80 |
name = os.path.join(self.working_dir, filename) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
81 |
x = etree.parse(name) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
82 |
return etree.tostring(x, pretty_print=True) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
83 |
|
1304
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
84 |
def validate_xml_output(self, xml_data): |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
85 |
"""Outputs the xml data to a file and then performs a validation test |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
86 |
on the resulting file |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
87 |
|
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
88 |
""" |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
89 |
self.assertNotEquals(xml_data.tree, None) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
90 |
report = ConversionReport() |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
91 |
if xml_data.architecture is None: |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
92 |
tree = xml_data.fetch_tree(ARCH_X86) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
93 |
else: |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
94 |
tree = xml_data.tree |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
95 |
|
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
96 |
write_xml_data(tree, self.working_dir, TEST_PROFILE_NAME) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
97 |
result = validate(TEST_PROFILE_NAME, self.working_dir, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
98 |
TEST_PROFILE_NAME, DEFAULT_AI_DTD_FILENAME, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
99 |
report, False) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
100 |
self.assertTrue(result, "Validation of xml failed:\n\n" + |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
101 |
self.get_xml_contents(TEST_PROFILE_NAME)) |
1304
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
102 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
103 |
def profile_failure_report(self, xml_profile_data, report): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
104 |
"""Generate profile failure report""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
105 |
rbuffer = "\nResulting XML Tree: " |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
106 |
if xml_profile_data.tree is None: |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
107 |
rbuffer += "No data available" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
108 |
else: |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
109 |
rbuffer += "\n\n" + pretty_print(xml_profile_data.tree) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
110 |
rbuffer += "\n\n\n" + failure_report(report, self.log_file) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
111 |
return rbuffer |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
112 |
|
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
113 |
def test_arch_conflict(self): |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
114 |
"""Test for conversion error when x86 and sparc ops mixed""" |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
115 |
kv_dict = {} |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
116 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
117 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
118 |
key_value = KeyValues("boot_device", ["c2t0d0s1"], 2) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
119 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
120 |
key_value = KeyValues("fdisk", ["c3t0d0", "solaris", "all"], 3) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
121 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
122 |
report = ConversionReport() |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
123 |
xml_data = XMLProfileData("test", kv_dict, report, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
124 |
self.default_xml, True, None) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
125 |
self.assertEquals(report, xml_data.conversion_report) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
126 |
self.assertEquals(report.has_errors(), True) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
127 |
self.assertEquals(report.process_errors, 0, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
128 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
129 |
self.assertEquals(report.conversion_errors, 1, |
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
130 |
self.profile_failure_report(xml_data, report)) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
131 |
self.assertEquals(report.unsupported_items, 0, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
132 |
self.profile_failure_report(xml_data, report)) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
133 |
self.assertEquals(report.validation_errors, 0, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
134 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
135 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
136 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
137 |
self.validate_xml_output(xml_data) |
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
138 |
|
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
139 |
def test_arch_sparc(self): |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
140 |
"""Make sure arch type for profile is SPARC when sparc op used""" |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
141 |
kv_dict = {} |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
142 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
143 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
144 |
key_value = KeyValues("boot_device", ["c2t0d0s1"], 2) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
145 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
146 |
report = ConversionReport() |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
147 |
xml_data = XMLProfileData("test", kv_dict, report, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
148 |
self.default_xml, True, None) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
149 |
self.assertEquals(report, xml_data.conversion_report) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
150 |
self.assertEquals(report.has_errors(), False, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
151 |
self.profile_failure_report(xml_data, report)) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
152 |
self.assertEquals(ARCH_SPARC, xml_data.architecture) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
153 |
self.validate_xml_output(xml_data) |
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
154 |
|
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
155 |
def test_arch_x86(self): |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
156 |
"""Make sure arch type for profile is X86 when x86 op used""" |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
157 |
kv_dict = {} |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
158 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
159 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
160 |
key_value = KeyValues("boot_device", ["c2t0d0"], 2) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
161 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
162 |
report = ConversionReport() |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
163 |
xml_data = XMLProfileData("test", kv_dict, report, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
164 |
self.default_xml, True, None) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
165 |
self.assertEquals(report, xml_data.conversion_report) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
166 |
self.assertEquals(report.has_errors(), False, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
167 |
self.profile_failure_report(xml_data, report)) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
168 |
self.assertEquals(ARCH_X86, xml_data.architecture) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
169 |
self.validate_xml_output(xml_data) |
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
170 |
|
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
171 |
def test_arch_generic(self): |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
172 |
"""Ensure arch type for prof is generic when no sparc/x86 is op used""" |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
173 |
kv_dict = {} |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
174 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
175 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
176 |
key_value = KeyValues("pool", |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
177 |
["newpool", "auto", "auto", "auto", "any"], 2) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
178 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
179 |
report = ConversionReport() |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
180 |
xml_data = XMLProfileData("test", kv_dict, report, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
181 |
self.default_xml, True, None) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
182 |
self.assertEquals(report, xml_data.conversion_report) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
183 |
self.assertEquals(report.has_errors(), False, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
184 |
self.profile_failure_report(xml_data, report)) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
185 |
self.assertEquals(ARCH_GENERIC, xml_data.architecture) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
186 |
self.validate_xml_output(xml_data) |
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
187 |
|
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
188 |
def test_arch_none(self): |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
189 |
kv_dict = {} |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
190 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
191 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
192 |
key_value = KeyValues("partitioning", ["default"], 2) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
193 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
194 |
key_value = KeyValues("filesys", ["c0t0d0s0", "40", "/"], 3) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
195 |
kv_dict[key_value.line_num] = key_value |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
196 |
report = ConversionReport() |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
197 |
xml_data = XMLProfileData("test", kv_dict, report, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
198 |
self.default_xml, True, None) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
199 |
self.assertEquals(report, xml_data.conversion_report) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
200 |
self.assertEquals(report.has_errors(), False, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
201 |
self.profile_failure_report(xml_data, report)) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
202 |
self.assertEquals(None, xml_data.architecture) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
203 |
|
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
204 |
# Fetch x86 and sparc versions of the manifest xml tree |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
205 |
x86_tree = xml_data.fetch_tree(ARCH_X86) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
206 |
sparc_tree = xml_data.fetch_tree(ARCH_SPARC) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
207 |
|
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
208 |
# Test to make sure that the <partition> node exists in the x86 |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
209 |
# tree but not in the sparc tree |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
210 |
xpath = "/auto_install/ai_instance/target/disk/partition" |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
211 |
partition = fetch_xpath_node(x86_tree, xpath) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
212 |
self.assertNotEquals(None, partition, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
213 |
"<partition> not found in x86 tree") |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
214 |
|
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
215 |
partition = fetch_xpath_node(sparc_tree, xpath) |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
216 |
self.assertEquals(None, partition, |
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
217 |
"<partition> found in sparc tree") |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
218 |
self.validate_xml_output(xml_data) |
1219
bb5365b7dfad
7054528 js2ai is generating <partition> for all architectures
Harold N Shaw- Oracle <Harold.Shaw@oracle.COM>
parents:
1193
diff
changeset
|
219 |
|
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
220 |
def test_boot_device_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
221 |
"""Tests boot_device <device> where device is a disk""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
222 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
223 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
224 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
225 |
key_value = KeyValues("boot_device", ["c2t0d0"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
226 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
227 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
228 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
229 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
230 |
self.assertEquals(report, xml_data.conversion_report) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
231 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
232 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
233 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
234 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
235 |
def test_boot_device_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
236 |
"""Tests boot_device <device> where device is a slice""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
237 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
238 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
239 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
240 |
key_value = KeyValues("boot_device", ["c2d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
241 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
242 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
243 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
244 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
245 |
report = xml_data.conversion_report |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
246 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
247 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
248 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
249 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
250 |
def test_boot_device_entry3(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
251 |
"""Tests boot_device <device> where device = any""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
252 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
253 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
254 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
255 |
key_value = KeyValues("boot_device", ["any"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
256 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
257 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
258 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
259 |
self.default_xml, True, None) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
260 |
self.assertEquals(report.has_errors(), False, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
261 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
262 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
263 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
264 |
def test_boot_device_entry4(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
265 |
"""Tests boot_device <device> where device = existing""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
266 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
267 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
268 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
269 |
key_value = KeyValues("boot_device", ["existing"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
270 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
271 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
272 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
273 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
274 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
275 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
276 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
277 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
278 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
279 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
280 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
281 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
282 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
283 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
284 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
285 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
286 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
287 |
def test_boot_device_entry5(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
288 |
"""Tests boot_device <device> <eprom> where eprom = preserve""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
289 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
290 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
291 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
292 |
key_value = KeyValues("boot_device", ["c2t0d0s0", "preserve"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
293 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
294 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
295 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
296 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
297 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
298 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
299 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
300 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
301 |
def test_boot_device_entry6(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
302 |
"""Tests boot_device <device> <eprom> where eeprom = update""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
303 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
304 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
305 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
306 |
key_value = KeyValues("boot_device", ["c2t0d0s0", "update"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
307 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
308 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
309 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
310 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
311 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
312 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
313 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
314 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
315 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
316 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
317 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
318 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
319 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
320 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
321 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
322 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
323 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
324 |
def test_boot_device_entry7(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
325 |
"""Tests boot_device <device> where device is a /dev/dsk""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
326 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
327 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
328 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
329 |
key_value = KeyValues("boot_device", ["c2d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
330 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
331 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
332 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
333 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
334 |
report = xml_data.conversion_report |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
335 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
336 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
337 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
338 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
339 |
def test_boot_device_entry8(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
340 |
"""Tests boot_device <device> where too many args specified""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
341 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
342 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
343 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
344 |
key_value = KeyValues("boot_device", ["c2d0s0", "1", "2"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
345 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
346 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
347 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
348 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
349 |
report = xml_data.conversion_report |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
350 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
351 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
352 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
353 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
354 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
355 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
356 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
357 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
358 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
359 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
360 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
361 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
362 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
363 |
def test_boot_device_entry9(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
364 |
"""Tests boot_device <device> <eprom> where eeprom = bogus""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
365 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
366 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
367 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
368 |
key_value = KeyValues("boot_device", ["c2t0d0s0", "bogus"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
369 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
370 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
371 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
372 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
373 |
self.assertEquals(report.has_errors(), True, str(report)) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
374 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
375 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
376 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
377 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
378 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
379 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
380 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
381 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
382 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
383 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
384 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
385 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
386 |
def test_boot_device_entry10(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
387 |
"""Tests boot_device with previous set root_device """ |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
388 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
389 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
390 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
391 |
key_value = KeyValues("root_device", ["c2t0d0"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
392 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
393 |
key_value = KeyValues("boot_device", ["c0t0d0s0"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
394 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
395 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
396 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
397 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
398 |
self.assertEquals(report.has_errors(), True, str(report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
399 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
400 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
401 |
self.assertEquals(report.conversion_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
402 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
403 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
404 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
405 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
406 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
407 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
408 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
409 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
410 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
411 |
def test_boot_device_entry11(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
412 |
"""Tests boot_device with bad device name """ |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
413 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
414 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
415 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
416 |
key_value = KeyValues("boot_device", ["c0txx0s0"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
417 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
418 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
419 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
420 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
421 |
self.assertEquals(report.has_errors(), True, str(report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
422 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
423 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
424 |
self.assertEquals(report.conversion_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
425 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
426 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
427 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
428 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
429 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
430 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
431 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
432 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
433 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
434 |
def test_fdisk_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
435 |
"""Tests fdisk <diskname> where diskname is rootdisk""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
436 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
437 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
438 |
kv_dict[key_value.line_num] = key_value |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
439 |
key_value = KeyValues("fdisk", ["rootdisk", "solaris", "all"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
440 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
441 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
442 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
443 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
444 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
445 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
446 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
447 |
self.assertEquals(report.conversion_errors, 1, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
448 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
449 |
self.assertEquals(report.unsupported_items, 0, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
450 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
451 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
452 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
453 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
454 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
455 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
456 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
457 |
def test_fdisk_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
458 |
"""Tests fdisk <diskname> where diskname is all""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
459 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
460 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
461 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
462 |
key_value = KeyValues("fdisk", ["all", "solaris", "all"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
463 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
464 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
465 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
466 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
467 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
468 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
469 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
470 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
471 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
472 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
473 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
474 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
475 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
476 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
477 |
self.profile_failure_report(xml_data, report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
478 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
479 |
def test_fdisk_entry3(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
480 |
"""Tests fdisk <diskname> where diskname is a valid disk""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
481 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
482 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
483 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
484 |
key_value = KeyValues("fdisk", ["c2t0d0", "solaris", "all"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
485 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
486 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
487 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
488 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
489 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
490 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
491 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
492 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
493 |
def test_fdisk_entry4(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
494 |
"""Tests fdisk <type> where type is dosprimary""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
495 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
496 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
497 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
498 |
key_value = KeyValues("fdisk", ["c1t0d0", "dosprimary", "all"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
499 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
500 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
501 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
502 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
503 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
504 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
505 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
506 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
507 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
508 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
509 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
510 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
511 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
512 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
513 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
514 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
515 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
516 |
def test_fdisk_entry5(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
517 |
"""Tests fdisk <type> where type is x86boot""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
518 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
519 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
520 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
521 |
key_value = KeyValues("fdisk", ["c1t0d0", "x86boot", "all"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
522 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
523 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
524 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
525 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
526 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
527 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
528 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
529 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
530 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
531 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
532 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
533 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
534 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
535 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
536 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
537 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
538 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
539 |
# size == all was tested via tests above |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
540 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
541 |
def test_fdisk_entry6(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
542 |
"""Tests fdisk <size> where size is maxfree""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
543 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
544 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
545 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
546 |
key_value = KeyValues("fdisk", ["c1t0d0", "solaris", "maxfree"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
547 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
548 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
549 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
550 |
self.default_xml, True, None) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
551 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
552 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
553 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
554 |
self.assertEquals(report.conversion_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
555 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
556 |
self.assertEquals(report.unsupported_items, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
557 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
558 |
self.assertEquals(report.validation_errors, 0, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
559 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
560 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
561 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
562 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
563 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
564 |
def test_fdisk_entry7(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
565 |
"""Tests fdisk <size> where size is delete""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
566 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
567 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
568 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
569 |
key_value = KeyValues("fdisk", ["c1t0d0", "solaris", "delete"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
570 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
571 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
572 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
573 |
self.default_xml, True, None) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
574 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
575 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
576 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
577 |
self.assertEquals(report.conversion_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
578 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
579 |
self.assertEquals(report.unsupported_items, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
580 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
581 |
self.assertEquals(report.validation_errors, 0, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
582 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
583 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
584 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
585 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
586 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
587 |
def test_fdisk_entry8(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
588 |
"""Tests fdisk <size> where size is 0 (delete)""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
589 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
590 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
591 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
592 |
key_value = KeyValues("fdisk", ["c1t0d0", "solaris", "0"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
593 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
594 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
595 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
596 |
self.default_xml, True, None) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
597 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
598 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
599 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
600 |
self.assertEquals(report.conversion_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
601 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
602 |
self.assertEquals(report.unsupported_items, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
603 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
604 |
self.assertEquals(report.validation_errors, 0, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
605 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
606 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
607 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
608 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
609 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
610 |
def test_fdisk_entry9(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
611 |
"""Tests fdisk <size> where size is ##""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
612 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
613 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
614 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
615 |
key_value = KeyValues("fdisk", ["c1t0d0", "solaris", "40000"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
616 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
617 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
618 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
619 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
620 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
621 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
622 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
623 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
624 |
def test_fdisk_entry10(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
625 |
"""Tests fdisk entry with to little args""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
626 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
627 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
628 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
629 |
key_value = KeyValues("fdisk", ["c1t0d0"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
630 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
631 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
632 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
633 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
634 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
635 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
636 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
637 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
638 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
639 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
640 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
641 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
642 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
643 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
644 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
645 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
646 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
647 |
def test_fdisk_entry11(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
648 |
"""Tests fdisk entry with invalid size""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
649 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
650 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
651 |
kv_dict[key_value.line_num] = key_value |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
652 |
key_value = KeyValues("fdisk", ["c1t0d0", "solaris", "xyz"], 5) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
653 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
654 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
655 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
656 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
657 |
self.assertEquals(report.has_errors(), True) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
658 |
self.assertEquals(report.process_errors, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
659 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
660 |
self.assertEquals(report.conversion_errors, 1, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
661 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
662 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
663 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
664 |
self.assertEquals(report.validation_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
665 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
666 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
667 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
668 |
self.validate_xml_output(xml_data) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
669 |
|
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
670 |
def test_fdisk_entry12(self): |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
671 |
"""Tests fdisk entry with invalid type""" |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
672 |
kv_dict = {} |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
673 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
674 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
675 |
key_value = KeyValues("fdisk", ["c1t0d0", "invalid_type", "4000"], 5) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
676 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
677 |
report = ConversionReport() |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
678 |
xml_data = XMLProfileData("test", kv_dict, report, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
679 |
self.default_xml, True, None) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
680 |
self.assertEquals(report.has_errors(), True) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
681 |
self.assertEquals(report.process_errors, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
682 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
683 |
self.assertEquals(report.conversion_errors, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
684 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
685 |
self.assertEquals(report.unsupported_items, 1, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
686 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
687 |
self.assertEquals(report.validation_errors, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
688 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
689 |
self.assertEquals(report.warnings, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
690 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
691 |
self.validate_xml_output(xml_data) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
692 |
|
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
693 |
def test_fdisk_entry13(self): |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
694 |
"""Tests fdisk rootdisk entry with pool keyword""" |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
695 |
kv_dict = {} |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
696 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
697 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
698 |
key_value = KeyValues("fdisk", ["rootdisk", "solaris", "all"], 5) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
699 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
700 |
key_value = KeyValues("pool", |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
701 |
["rpool", "4g", "4g", "4g", "c0d0s0"], 7) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
702 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
703 |
report = ConversionReport() |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
704 |
xml_data = XMLProfileData("test", kv_dict, report, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
705 |
self.default_xml, True, None) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
706 |
self.assertEquals(report.has_errors(), False, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
707 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
708 |
self.validate_xml_output(xml_data) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
709 |
|
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
710 |
def test_fdisk_entry14(self): |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
711 |
"""Tests fdisk rootdisk entry with pool keyword""" |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
712 |
kv_dict = {} |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
713 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
714 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
715 |
key_value = KeyValues("fdisk", ["c0t0d0", "solaris", "4000"], 5) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
716 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
717 |
key_value = KeyValues("fdisk", ["c0t0d0", "solaris", "5000"], 6) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
718 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
719 |
report = ConversionReport() |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
720 |
xml_data = XMLProfileData("test", kv_dict, report, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
721 |
self.default_xml, True, None) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
722 |
self.assertEquals(report.has_errors(), True) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
723 |
self.assertEquals(report.process_errors, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
724 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
725 |
self.assertEquals(report.conversion_errors, 1, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
726 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
727 |
self.assertEquals(report.unsupported_items, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
728 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
729 |
self.assertEquals(report.validation_errors, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
730 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
731 |
self.assertEquals(report.warnings, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
732 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
733 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
734 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
735 |
def test_filesys_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
736 |
"""Tests filesys <device> where device is a disk""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
737 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
738 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
739 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
740 |
# Fails because not a slice |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
741 |
key_value = KeyValues("filesys", ["c2t0d0", "20", "/"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
742 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
743 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
744 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
745 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
746 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
747 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
748 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
749 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
750 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
751 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
752 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
753 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
754 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
755 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
756 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
757 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
758 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
759 |
def test_filesys_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
760 |
"""Tests filesys <device> where device is a slice with mount /""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
761 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
762 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
763 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
764 |
key_value = KeyValues("filesys", ["c2t0d0s0", "20", "/"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
765 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
766 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
767 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
768 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
769 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
770 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
771 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
772 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
773 |
def test_filesys_entry3(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
774 |
"""Tests filesys <device> where device is a slice with mount swap""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
775 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
776 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
777 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
778 |
key_value = KeyValues("filesys", ["c2d0s0", "20", "swap"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
779 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
780 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
781 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
782 |
self.default_xml, True, None) |
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
783 |
self.assertEquals(report.has_errors(), False, |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
784 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
785 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
786 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
787 |
def test_filesys_entry4(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
788 |
"""Tests filesys <device> where device = any""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
789 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
790 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
791 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
792 |
key_value = KeyValues("filesys", ["any", "1024", "/"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
793 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
794 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
795 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
796 |
self.default_xml, True, None) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
797 |
self.assertEquals(report.has_errors(), True) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
798 |
self.assertEquals(report.process_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
799 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
800 |
self.assertEquals(report.conversion_errors, 1, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
801 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
802 |
self.assertEquals(report.unsupported_items, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
803 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
804 |
self.assertEquals(report.validation_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
805 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
806 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
807 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
808 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
809 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
810 |
def test_filesys_entry5(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
811 |
"""Tests filesys <device> where device is a slice with mount /opt""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
812 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
813 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
814 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
815 |
key_value = KeyValues("filesys", ["c2d0s0", "20", "/"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
816 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
817 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
818 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
819 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
820 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
821 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
822 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
823 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
824 |
def test_filesys_entry6(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
825 |
"""Tests filesys <remote> <ip_addr>|"-" [<mount>] [<mntopts>]""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
826 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
827 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
828 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
829 |
key_value = KeyValues("filesys", ["s_ref:/usr/share/man", "-", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
830 |
"/usr/share/man", "ro"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
831 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
832 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
833 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
834 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
835 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
836 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
837 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
838 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
839 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
840 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
841 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
842 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
843 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
844 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
845 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
846 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
847 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
848 |
def test_filesys_entry7(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
849 |
"""Tests filesys mirror where the mirror is unamed and mount is swap""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
850 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
851 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
852 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
853 |
# This is invalid since no root / mount was specified |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
854 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s1", "c0t1d0s1", |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
855 |
"2048", "swap"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
856 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
857 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
858 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
859 |
self.default_xml, True, None) |
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
860 |
self.assertEquals(report.has_errors(), False, |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
861 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
862 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
863 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
864 |
def test_filesys_entry8(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
865 |
"""Tests filesys mirror where the mirror is unamed""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
866 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
867 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
868 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
869 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s3", "c0t1d0s3", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
870 |
"4096", "/"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
871 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
872 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
873 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
874 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
875 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
876 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
877 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
878 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
879 |
def test_filesys_entry9(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
880 |
"""Tests filesys mirror where the mirror is missing :""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
881 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
882 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
883 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
884 |
key_value = KeyValues("filesys", ["mirrorbogus", "c0t0d0s3", \ |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
885 |
"c0t1d0s3", "4096", "/"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
886 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
887 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
888 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
889 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
890 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
891 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
892 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
893 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
894 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
895 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
896 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
897 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
898 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
899 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
900 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
901 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
902 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
903 |
def test_filesys_entry10(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
904 |
"""Tests filesys <device> with no size specified""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
905 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
906 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
907 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
908 |
key_value = KeyValues("filesys", ["c2t0d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
909 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
910 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
911 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
912 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
913 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
914 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
915 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
916 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
917 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
918 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
919 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
920 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
921 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
922 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
923 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
924 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
925 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
926 |
def test_filesys_entry11(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
927 |
"""Tests filesys with too many args""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
928 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
929 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
930 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
931 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s3", "c0t1d0s3", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
932 |
"4096", "/", "ro,quota", "extra arg"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
933 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
934 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
935 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
936 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
937 |
self.assertEquals(report.has_errors(), True) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
938 |
self.assertEquals(report.process_errors, 0, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
939 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
940 |
self.assertEquals(report.conversion_errors, 1, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
941 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
942 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
943 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
944 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
945 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
946 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
947 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
948 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
949 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
950 |
def test_filesys_entry12(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
951 |
"""Tests filesys mirror where the mirror device is not unique""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
952 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
953 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
954 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
955 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s3", "c0t0d0s3", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
956 |
"4096", "/"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
957 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
958 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
959 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
960 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
961 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
962 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
963 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
964 |
self.assertEquals(report.conversion_errors, 1, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
965 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
966 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
967 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
968 |
self.assertEquals(report.validation_errors, 0, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
969 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
970 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
971 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
972 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
973 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
974 |
def test_filesys_entry13(self): |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
975 |
"""Tests filesys mirror where the mirror device is not unique""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
976 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
977 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
978 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
979 |
key_value = KeyValues("root_device", ["c0t0d0s1"], 2) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
980 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
981 |
key_value = KeyValues("filesys", ["mirror", "rootdisk.s3", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
982 |
"rootdisk.s3", "4096", "/home"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
983 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
984 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
985 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
986 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
987 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
988 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
989 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
990 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
991 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
992 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
993 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
994 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
995 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
996 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
997 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
998 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
999 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1000 |
def test_filesys_entry14(self): |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1001 |
"""Tests filesys with rootdisk""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1002 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1003 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1004 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1005 |
key_value = KeyValues("root_device", ["c0t0d0s1"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1006 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1007 |
key_value = KeyValues("filesys", ["rootdisk.s1", "2000", "/"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1008 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1009 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1010 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1011 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1012 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1013 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1014 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1015 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1016 |
def test_filesys_entry15(self): |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1017 |
"""Tests filesys mirror with no mount point specified""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1018 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1019 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1020 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1021 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s3", "c0t1d0s3", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1022 |
"4096"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1023 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1024 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1025 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1026 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1027 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1028 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1029 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1030 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1031 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1032 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1033 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1034 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1035 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1036 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1037 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1038 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1039 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1040 |
def test_filesys_entry16(self): |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1041 |
"""Tests filesys <device> <size> with no mount point specified""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1042 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1043 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1044 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1045 |
key_value = KeyValues("filesys", ["c2t0d0s0", "5120"], 4) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1046 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1047 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1048 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1049 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1050 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1051 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1052 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1053 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1054 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1055 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1056 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1057 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1058 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1059 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1060 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1061 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1062 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1063 |
def test_filesys_entry17(self): |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1064 |
"""Tests filesys mirror with invalid mount point specified""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1065 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1066 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1067 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1068 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1069 |
kv_dict[key_value.line_num] = key_value |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1070 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s3", "c0t1d0s3", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1071 |
"4096", "bad_mp"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1072 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1073 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1074 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1075 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1076 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1077 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1078 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1079 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1080 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1081 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1082 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1083 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1084 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1085 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1086 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1087 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1088 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1089 |
def test_filesys_entry18(self): |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1090 |
"""Tests filesys <device> with invalid mount point specified""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1091 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1092 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1093 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1094 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1095 |
kv_dict[key_value.line_num] = key_value |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1096 |
key_value = KeyValues("filesys", ["c2t0d0s0", "5120", "bad_mp"], 4) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1097 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1098 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1099 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1100 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1101 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1102 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1103 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1104 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1105 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1106 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1107 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1108 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1109 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1110 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1111 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1112 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1113 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1114 |
def test_filesys_entry19(self): |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1115 |
"""Tests filesys mirror where the mount point is not /""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1116 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1117 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1118 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1119 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1120 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1121 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s3", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1122 |
"c0t0d0s4", "4096", "/home"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1123 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1124 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1125 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1126 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1127 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1128 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1129 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1130 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1131 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1132 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1133 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1134 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1135 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1136 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1137 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1138 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1139 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1140 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1141 |
def test_filesys_entry20(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1142 |
"""Tests root_device mirrored filesys conflict""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1143 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1144 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1145 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1146 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1147 |
#root_device c0t0d0s0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1148 |
key_value = KeyValues("root_device", ["c0t0d0s0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1149 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1150 |
key_value = KeyValues("partitioning", ["explicit"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1151 |
kv_dict[key_value.line_num] = key_value |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1152 |
|
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1153 |
# filesys mirror c1t0d0s0 c1t0d0s2 4000 / |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1154 |
key_value = KeyValues("filesys", ["mirror", "c1t0d0s0", "c1t0d0s2", |
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1155 |
"40000", "/"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1156 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1157 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1158 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1159 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1160 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1161 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1162 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1163 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1164 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1165 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1166 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1167 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1168 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1169 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1170 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1171 |
def test_filesys_entry21(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1172 |
"""Tests root_device filesys device conflict""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1173 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1174 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1175 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1176 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1177 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1178 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1179 |
#root_device c0t0d0s0 |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1180 |
key_value = KeyValues("root_device", ["c0t0d0s0"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1181 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1182 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1183 |
# filesys c2t0d0s0 20 / |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1184 |
key_value = KeyValues("filesys", ["c2t0d0s0", "20", "/"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1185 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1186 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1187 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1188 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1189 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1190 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1191 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1192 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1193 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1194 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1195 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1196 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1197 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1198 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1199 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1200 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1201 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1202 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1203 |
def test_filesys_entry22(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1204 |
"""Tests filesys <device> where device is a slice with mount /""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1205 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1206 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1207 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1208 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1209 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1210 |
key_value = KeyValues("filesys", ["c2t0d0s0", "2000000", "/"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1211 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1212 |
key_value = KeyValues("filesys", ["c2t0d0s4", "200", "swap"], 5) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1213 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1214 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1215 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1216 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1217 |
self.assertEquals(report.has_errors(), False, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1218 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1219 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1220 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1221 |
def test_filesys_entry23(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1222 |
"""Tests filesys mirror where the mirror is unamed for / and swap""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1223 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1224 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1225 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1226 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1227 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1228 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s0", "c0t1d0s0", |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1229 |
"12048", "/"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1230 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1231 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s1", "c0t1d0s1", |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1232 |
"2048", "swap"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1233 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1234 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1235 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1236 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1237 |
self.assertEquals(report.has_errors(), False, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1238 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1239 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1240 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1241 |
def test_filesys_entry24(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1242 |
"""Tests filesys for / and swap, where swap has size of all""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1243 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1244 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1245 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1246 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1247 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1248 |
key_value = KeyValues("filesys", ["c0t0d0s0", "12048", "/"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1249 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1250 |
key_value = KeyValues("filesys", ["c0t0d0s1", "all", "swap"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1251 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1252 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1253 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1254 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1255 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1256 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1257 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1258 |
self.assertEquals(report.conversion_errors, 1, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1259 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1260 |
self.assertEquals(report.unsupported_items, 0, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1261 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1262 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1263 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1264 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1265 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1266 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1267 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1268 |
def test_filesys_entry25(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1269 |
"""Tests filesys for / and swap, where / has size of all""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1270 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1271 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1272 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1273 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1274 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1275 |
key_value = KeyValues("filesys", ["c0t0d0s0", "all", "/"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1276 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1277 |
key_value = KeyValues("filesys", ["c0t0d0s1", "2000", "swap"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1278 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1279 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1280 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1281 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1282 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1283 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1284 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1285 |
self.assertEquals(report.conversion_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1286 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1287 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1288 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1289 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1290 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1291 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1292 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1293 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1294 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1295 |
def test_filesys_entry26(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1296 |
"""Tests filesys for / and swap, where same slice specified for both""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1297 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1298 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1299 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1300 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1301 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1302 |
key_value = KeyValues("filesys", ["c0t0d0s0", "all", "/"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1303 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1304 |
key_value = KeyValues("filesys", ["c0t0d0s0", "2000", "swap"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1305 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1306 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1307 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1308 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1309 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1310 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1311 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1312 |
self.assertEquals(report.conversion_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1313 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1314 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1315 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1316 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1317 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1318 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1319 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1320 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1321 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1322 |
def test_filesys_entry27(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1323 |
"""Tests filesys for / any and swap with specified slice""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1324 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1325 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1326 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1327 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1328 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1329 |
key_value = KeyValues("filesys", ["any", "200000", "/"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1330 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1331 |
key_value = KeyValues("filesys", ["c0t0d0s0", "2000", "swap"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1332 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1333 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1334 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1335 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1336 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1337 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1338 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1339 |
self.assertEquals(report.conversion_errors, 1, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1340 |
self.profile_failure_report(xml_data, report)) |
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1341 |
self.assertEquals(report.unsupported_items, 0, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1342 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1343 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1344 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1345 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1346 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1347 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1348 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1349 |
def test_filesys_entry28(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1350 |
"""Tests filesys for / any and swap any""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1351 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1352 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1353 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1354 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1355 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1356 |
key_value = KeyValues("filesys", ["any", "200000", "/"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1357 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1358 |
key_value = KeyValues("filesys", ["any", "2000", "swap"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1359 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1360 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1361 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1362 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1363 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1364 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1365 |
self.profile_failure_report(xml_data, report)) |
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1366 |
self.assertEquals(report.conversion_errors, 2, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1367 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1368 |
self.assertEquals(report.unsupported_items, 0, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1369 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1370 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1371 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1372 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1373 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1374 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1375 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1376 |
def test_filesys_entry29(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1377 |
"""Tests filesys for invalid size""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1378 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1379 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1380 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1381 |
key_value = KeyValues("partitioning", ["explicit"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1382 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1383 |
key_value = KeyValues("filesys", ["any", "xyz", "/"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1384 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1385 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1386 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1387 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1388 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1389 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1390 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1391 |
self.assertEquals(report.conversion_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1392 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1393 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1394 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1395 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1396 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1397 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1398 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1399 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1400 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1401 |
def test_filesys_entry30(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1402 |
"""Tests filesys with partitioning default""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1403 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1404 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1405 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1406 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1407 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1408 |
key_value = KeyValues("filesys", ["any", "4000", "/"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1409 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1410 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1411 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1412 |
self.default_xml, True, None) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1413 |
self.assertEquals(report.has_errors(), True) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1414 |
self.assertEquals(report.process_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1415 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1416 |
self.assertEquals(report.conversion_errors, 1, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1417 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1418 |
self.assertEquals(report.unsupported_items, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1419 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1420 |
self.assertEquals(report.validation_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1421 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1422 |
self.assertEquals(report.warnings, 0, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1423 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1424 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1425 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1426 |
def test_filesys_entry31(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1427 |
"""Tests filesys for / any and swap any""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1428 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1429 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1430 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1431 |
key_value = KeyValues("boot_device", ["any"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1432 |
kv_dict[key_value.line_num] = key_value |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1433 |
key_value = KeyValues("partitioning", ["explicit"], 3) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1434 |
kv_dict[key_value.line_num] = key_value |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1435 |
key_value = KeyValues("filesys", ["any", "200000", "/"], 4) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1436 |
kv_dict[key_value.line_num] = key_value |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1437 |
key_value = KeyValues("filesys", ["any", "2000", "swap"], 5) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1438 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1439 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1440 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1441 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1442 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1443 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1444 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1445 |
self.assertEquals(report.conversion_errors, 2, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1446 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1447 |
self.assertEquals(report.unsupported_items, 0, |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1448 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1449 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1450 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1451 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1452 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1453 |
self.validate_xml_output(xml_data) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1454 |
|
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1455 |
def test_filesys_entry32(self): |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1456 |
"""Tests filesys for / any and swap device""" |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1457 |
kv_dict = {} |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1458 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1459 |
kv_dict[key_value.line_num] = key_value |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1460 |
key_value = KeyValues("partitioning", ["explicit"], 3) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1461 |
kv_dict[key_value.line_num] = key_value |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1462 |
key_value = KeyValues("filesys", ["any", "all", "/"], 4) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1463 |
kv_dict[key_value.line_num] = key_value |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1464 |
key_value = KeyValues("filesys", ["c0t0d0s0", "2000", "swap"], 5) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1465 |
kv_dict[key_value.line_num] = key_value |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1466 |
report = ConversionReport() |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1467 |
xml_data = XMLProfileData("test", kv_dict, report, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1468 |
self.default_xml, True, None) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1469 |
self.assertEquals(report.has_errors(), True) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1470 |
self.assertEquals(report.process_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1471 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1472 |
self.assertEquals(report.conversion_errors, 1, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1473 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1474 |
self.assertEquals(report.unsupported_items, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1475 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1476 |
self.assertEquals(report.validation_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1477 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1478 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1479 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1480 |
self.validate_xml_output(xml_data) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1481 |
|
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1482 |
def test_filesys_entry33(self): |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1483 |
"""Tests filesys for / and swap using same slice""" |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1484 |
kv_dict = {} |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1485 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1486 |
kv_dict[key_value.line_num] = key_value |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1487 |
key_value = KeyValues("partitioning", ["explicit"], 3) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1488 |
kv_dict[key_value.line_num] = key_value |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1489 |
key_value = KeyValues("filesys", ["c0t0d0s0", "2000", "/"], 4) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1490 |
kv_dict[key_value.line_num] = key_value |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1491 |
key_value = KeyValues("filesys", ["c0t0d0s0", "2000", "swap"], 5) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1492 |
kv_dict[key_value.line_num] = key_value |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1493 |
report = ConversionReport() |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1494 |
xml_data = XMLProfileData("test", kv_dict, report, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1495 |
self.default_xml, True, None) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1496 |
self.assertEquals(report.has_errors(), True) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1497 |
self.assertEquals(report.process_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1498 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1499 |
self.assertEquals(report.conversion_errors, 1, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1500 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1501 |
self.assertEquals(report.unsupported_items, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1502 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1503 |
self.assertEquals(report.validation_errors, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1504 |
self.profile_failure_report(xml_data, report)) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1505 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1506 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1507 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1508 |
|
1304
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1509 |
def test_filesys_entry34(self): |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1510 |
"""Tests filesys for / with bad size specified""" |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1511 |
kv_dict = {} |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1512 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1513 |
kv_dict[key_value.line_num] = key_value |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1514 |
key_value = KeyValues("partitioning", ["explicit"], 3) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1515 |
kv_dict[key_value.line_num] = key_value |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1516 |
key_value = KeyValues("filesys", ["c0t0d0s0", "2000x", "/"], 4) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1517 |
kv_dict[key_value.line_num] = key_value |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1518 |
report = ConversionReport() |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1519 |
xml_data = XMLProfileData("test", kv_dict, report, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1520 |
self.default_xml, True, None) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1521 |
self.assertEquals(report.has_errors(), True) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1522 |
self.assertEquals(report.process_errors, 0, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1523 |
self.profile_failure_report(xml_data, report)) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1524 |
self.assertEquals(report.conversion_errors, 1, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1525 |
self.profile_failure_report(xml_data, report)) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1526 |
self.assertEquals(report.unsupported_items, 0, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1527 |
self.profile_failure_report(xml_data, report)) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1528 |
self.assertEquals(report.validation_errors, 0, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1529 |
self.profile_failure_report(xml_data, report)) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1530 |
self.assertEquals(report.warnings, 0, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1531 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1532 |
self.validate_xml_output(xml_data) |
1304
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1533 |
|
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1534 |
def test_filesys_entry35(self): |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1535 |
"""Tests filesys for / with a size of existing specified""" |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1536 |
kv_dict = {} |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1537 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1538 |
kv_dict[key_value.line_num] = key_value |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1539 |
key_value = KeyValues("partitioning", ["explicit"], 3) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1540 |
kv_dict[key_value.line_num] = key_value |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1541 |
key_value = KeyValues("filesys", ["c0t0d0s0", "existing", "/"], 4) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1542 |
kv_dict[key_value.line_num] = key_value |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1543 |
report = ConversionReport() |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1544 |
xml_data = XMLProfileData("test", kv_dict, report, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1545 |
self.default_xml, True, None) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1546 |
self.assertEquals(report.has_errors(), True) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1547 |
self.assertEquals(report.process_errors, 0, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1548 |
self.profile_failure_report(xml_data, report)) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1549 |
self.assertEquals(report.conversion_errors, 0, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1550 |
self.profile_failure_report(xml_data, report)) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1551 |
self.assertEquals(report.unsupported_items, 1, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1552 |
self.profile_failure_report(xml_data, report)) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1553 |
self.assertEquals(report.validation_errors, 0, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1554 |
self.profile_failure_report(xml_data, report)) |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1555 |
self.assertEquals(report.warnings, 0, |
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1556 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1557 |
self.validate_xml_output(xml_data) |
1304
e8974a735e0f
7055567 js2ai add support for converting LDAP entries in profile
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1294
diff
changeset
|
1558 |
|
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1559 |
def test_filesys_entry36(self): |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1560 |
"""Tests filesys mirror with size of all""" |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1561 |
kv_dict = {} |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1562 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1563 |
kv_dict[key_value.line_num] = key_value |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1564 |
key_value = KeyValues("partitioning", ["explicit"], 3) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1565 |
kv_dict[key_value.line_num] = key_value |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1566 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s1", "c0t1d0s1", |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1567 |
"all", "/"], 4) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1568 |
kv_dict[key_value.line_num] = key_value |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1569 |
report = ConversionReport() |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1570 |
xml_data = XMLProfileData("test", kv_dict, report, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1571 |
self.default_xml, True, None) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1572 |
self.assertEquals(report.has_errors(), True) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1573 |
self.assertEquals(report.process_errors, 0, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1574 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1575 |
self.assertEquals(report.conversion_errors, 0, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1576 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1577 |
self.assertEquals(report.unsupported_items, 1, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1578 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1579 |
self.assertEquals(report.validation_errors, 0, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1580 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1581 |
self.assertEquals(report.warnings, 0, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1582 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1583 |
self.validate_xml_output(xml_data) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1584 |
|
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1585 |
def test_filesys_entry37(self): |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1586 |
"""Tests filesys mirror swap with size of all""" |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1587 |
kv_dict = {} |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1588 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1589 |
kv_dict[key_value.line_num] = key_value |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1590 |
key_value = KeyValues("partitioning", ["explicit"], 3) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1591 |
kv_dict[key_value.line_num] = key_value |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1592 |
key_value = KeyValues("filesys", ["mirror", "c0t0d0s1", "c0t1d0s1", |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1593 |
"all", "swap"], 4) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1594 |
kv_dict[key_value.line_num] = key_value |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1595 |
key_value = KeyValues("filesys", ["c0t0d0s0", "20000", "/"], 5) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1596 |
kv_dict[key_value.line_num] = key_value |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1597 |
report = ConversionReport() |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1598 |
xml_data = XMLProfileData("test", kv_dict, report, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1599 |
self.default_xml, True, None) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1600 |
self.assertEquals(report.has_errors(), True) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1601 |
self.assertEquals(report.process_errors, 0, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1602 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1603 |
self.assertEquals(report.conversion_errors, 0, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1604 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1605 |
self.assertEquals(report.unsupported_items, 1, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1606 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1607 |
self.assertEquals(report.validation_errors, 0, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1608 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1609 |
self.assertEquals(report.warnings, 0, |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1610 |
self.profile_failure_report(xml_data, report)) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1611 |
self.validate_xml_output(xml_data) |
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1612 |
|
1320
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1613 |
def test_locale_entry1(self): |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1614 |
"""Tests locale for unsupported syntax""" |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1615 |
kv_dict = {} |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1616 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1617 |
kv_dict[key_value.line_num] = key_value |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1618 |
key_value = KeyValues("locale", ["en", "bogus"], 3) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1619 |
kv_dict[key_value.line_num] = key_value |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1620 |
report = ConversionReport() |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1621 |
xml_data = XMLProfileData("test", kv_dict, report, |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1622 |
self.default_xml, True, None) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1623 |
self.assertEquals(report.has_errors(), True) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1624 |
self.assertEquals(report.process_errors, 1, |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1625 |
self.profile_failure_report(xml_data, report)) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1626 |
self.assertEquals(report.conversion_errors, 0, |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1627 |
self.profile_failure_report(xml_data, report)) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1628 |
self.assertEquals(report.unsupported_items, 0, |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1629 |
self.profile_failure_report(xml_data, report)) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1630 |
self.assertEquals(report.validation_errors, 0, |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1631 |
self.profile_failure_report(xml_data, report)) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1632 |
self.assertEquals(report.warnings, 0, |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1633 |
self.profile_failure_report(xml_data, report)) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1634 |
self.validate_xml_output(xml_data) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1635 |
|
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1636 |
def test_locale_entry2(self): |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1637 |
"""Tests locale with 2 different locals specifed""" |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1638 |
kv_dict = {} |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1639 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1640 |
kv_dict[key_value.line_num] = key_value |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1641 |
key_value = KeyValues("locale", ["en"], 3) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1642 |
kv_dict[key_value.line_num] = key_value |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1643 |
key_value = KeyValues("locale", ["zh"], 4) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1644 |
kv_dict[key_value.line_num] = key_value |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1645 |
report = ConversionReport() |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1646 |
xml_data = XMLProfileData("test", kv_dict, report, |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1647 |
self.default_xml, True, None) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1648 |
self.assertEquals(report.has_errors(), False, |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1649 |
self.profile_failure_report(xml_data, report)) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1650 |
self.validate_xml_output(xml_data) |
bb767e3cc519
7068893 Add support for language packs
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1310
diff
changeset
|
1651 |
|
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1652 |
def test_partitioning_entry1(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1653 |
"""Tests partitioning default""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1654 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1655 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1656 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1657 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1658 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1659 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1660 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1661 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1662 |
self.assertEquals(report.has_errors(), False, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1663 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1664 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1665 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1666 |
def test_partitioning_entry2(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1667 |
"""Tests partitioning existing""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1668 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1669 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1670 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1671 |
key_value = KeyValues("partitioning", ["existing"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1672 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1673 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1674 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1675 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1676 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1677 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1678 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1679 |
self.assertEquals(report.conversion_errors, None, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1680 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1681 |
self.assertEquals(report.unsupported_items, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1682 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1683 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1684 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1685 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1686 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1687 |
self.assertEquals(xml_data.tree, None, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1688 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1689 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1690 |
def test_partitioning_entry3(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1691 |
"""Tests partitioning duplicate""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1692 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1693 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1694 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1695 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1696 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1697 |
key_value = KeyValues("partitioning", ["existing"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1698 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1699 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1700 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1701 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1702 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1703 |
self.assertEquals(report.process_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1704 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1705 |
self.assertEquals(report.conversion_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1706 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1707 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1708 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1709 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1710 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1711 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1712 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1713 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1714 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1715 |
def test_package_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1716 |
"""Tests package with incorrect # of args""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1717 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1718 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1719 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1720 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1721 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1722 |
key_value = KeyValues("package", ["mirrorbogus", "/"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1723 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1724 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1725 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1726 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1727 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1728 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1729 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1730 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1731 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1732 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1733 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1734 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1735 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1736 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1737 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1738 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1739 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1740 |
def test_package_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1741 |
"""Tests package with add option""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1742 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1743 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1744 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1745 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1746 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1747 |
key_value = KeyValues("package", ["SUNWzoner", "add"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1748 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1749 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1750 |
xml_data = XMLProfileData("test", kv_dict, report, None, False, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1751 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1752 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1753 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1754 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1755 |
def test_package_entry3(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1756 |
"""Tests package with delete option""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1757 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1758 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1759 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1760 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1761 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1762 |
key_value = KeyValues("package", ["SUNWzoner", "delete"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1763 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1764 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1765 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1766 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1767 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1768 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1769 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1770 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1771 |
def test_package_entry4(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1772 |
"""Tests package with understood add option""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1773 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1774 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1775 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1776 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1777 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1778 |
key_value = KeyValues("package", ["SUNWftp"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1779 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1780 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1781 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1782 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1783 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1784 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1785 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1786 |
|
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1787 |
def test_package_entry5(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1788 |
"""Tests package with remote add option""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1789 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1790 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1791 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1792 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1793 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1794 |
# package SPROcc add nfs 172.16.64.194:/export/packages |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1795 |
key_value = KeyValues("package", ["SUNWftp", "add", "nfs", |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1796 |
"172.16.64.194:/export/packages"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1797 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1798 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1799 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1800 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1801 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1802 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1803 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1804 |
self.assertEquals(report.conversion_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1805 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1806 |
self.assertEquals(report.unsupported_items, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1807 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1808 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1809 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1810 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1811 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1812 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1813 |
|
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1814 |
def test_pool_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1815 |
"""Tests pool with incorrect # of args""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1816 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1817 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1818 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1819 |
key_value = KeyValues("pool", ["mirrorbogus", "/"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1820 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1821 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1822 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1823 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1824 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1825 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1826 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1827 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1828 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1829 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1830 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1831 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1832 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1833 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1834 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1835 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1836 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1837 |
def test_pool_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1838 |
"""Tests pool with pool name too long""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1839 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1840 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1841 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1842 |
key_value = KeyValues("pool", ["aVeryLongPoolName01234567890123", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1843 |
"auto", "4g", "4g", "mirror", "c0t0d0s0", "c0t1d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1844 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1845 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1846 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1847 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1848 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1849 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1850 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1851 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1852 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1853 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1854 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1855 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1856 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1857 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1858 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1859 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1860 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1861 |
def test_pool_entry3(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1862 |
"""Tests pool with unsupported pool size of auto""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1863 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1864 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1865 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1866 |
key_value = KeyValues("pool", ["rpool", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1867 |
"auto", "4g", "4g", "mirror", "c0t0d0s0", "c0t1d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1868 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1869 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1870 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1871 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1872 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1873 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1874 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1875 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1876 |
def test_pool_entry4(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1877 |
"""Tests pool with unsupported pool size of all""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1878 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1879 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1880 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1881 |
key_value = KeyValues("pool", ["rpool", |
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
1882 |
"auto", "4g", "4g", "mirror", "c0t0d0s0", "c0t1d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1883 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1884 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1885 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1886 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1887 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1888 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1889 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1890 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1891 |
def test_pool_entry5(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1892 |
"""Tests pool with pool size/swap size/dump size/ of 4g""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1893 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1894 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1895 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1896 |
key_value = KeyValues("pool", ["rpool", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1897 |
"4g", "4g", "4g", "mirror", "c0t0d0s0", "c0t1d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1898 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1899 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1900 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1901 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1902 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1903 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1904 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1905 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1906 |
def test_pool_entry6(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1907 |
"""Tests pool with invalid pool size""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1908 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1909 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1910 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1911 |
key_value = KeyValues("pool", ["rpool", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1912 |
"4TB", "4g", "4g", "mirror", "c0t0d0s0", "c0t1d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1913 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1914 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1915 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1916 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1917 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1918 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1919 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1920 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1921 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1922 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1923 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1924 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1925 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1926 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1927 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1928 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1929 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1930 |
def test_pool_entry7(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1931 |
"""Tests pool with invalid swap size""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1932 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1933 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1934 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1935 |
key_value = KeyValues("pool", ["rpool", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1936 |
"4g", "4TB", "4g", "mirror", "c0t0d0s0", "c0t1d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1937 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1938 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1939 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1940 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1941 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1942 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1943 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1944 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1945 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1946 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1947 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1948 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1949 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1950 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1951 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1952 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1953 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1954 |
def test_pool_entry8(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1955 |
"""Tests pool with invalid dump size""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1956 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1957 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1958 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1959 |
key_value = KeyValues("pool", ["rpool", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1960 |
"4g", "4g", "4KB", "mirror", "c0t0d0s0", "c0t1d0s0"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1961 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1962 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1963 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1964 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1965 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1966 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1967 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1968 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1969 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1970 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1971 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1972 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1973 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1974 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1975 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1976 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1977 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1978 |
def test_pool_entry9(self): |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1979 |
"""Tests pool where vdevlist is any""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1980 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1981 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1982 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1983 |
key_value = KeyValues("pool", ["rpool", "4g", "4g", "4g", "any"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1984 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1985 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1986 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1987 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
1988 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1989 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1990 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1991 |
self.assertEquals(report.conversion_errors, 1, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1992 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1993 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1994 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
1995 |
self.assertEquals(report.validation_errors, 0, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
1996 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1997 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
1998 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
1999 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2000 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2001 |
def test_pool_entry10(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2002 |
"""Tests pool with all any values""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2003 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2004 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2005 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2006 |
key_value = KeyValues("pool", ["rpool", |
1331
41bc8cab0ad5
7068993 if filesys swap is placed before / then valid profile generates error
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1320
diff
changeset
|
2007 |
"auto", "auto", "auto", "any"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2008 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2009 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2010 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2011 |
self.default_xml, True, None) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2012 |
self.assertEquals(report.has_errors(), False) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2013 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2014 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2015 |
def test_pool_entry11(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2016 |
"""Tests boot_device mirrored pool conflict""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2017 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2018 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2019 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2020 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2021 |
#boot_device c0t0d0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2022 |
key_value = KeyValues("boot_device", ["c0t0d0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2023 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2024 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2025 |
#pool newpool auto auto auto mirror c0t0d0s0 c0t0d0s1 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2026 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2027 |
"mirror", "c0t0d0s0", "c1t0d0s1"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2028 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2029 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2030 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2031 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2032 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2033 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2034 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2035 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2036 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2037 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2038 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2039 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2040 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2041 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2042 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2043 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2044 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2045 |
def test_pool_entry12(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2046 |
"""Tests root_device mirrored pool conflict""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2047 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2048 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2049 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2050 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2051 |
#root_device c0t0d0s1 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2052 |
key_value = KeyValues("root_device", ["c0t0d0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2053 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2054 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2055 |
#pool newpool auto auto auto mirror c0t0d0s0 c0t0d0s1 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2056 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2057 |
"mirror", "c0t0d0s0", "c0t0d1s0"], 3) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2058 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2059 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2060 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2061 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2062 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2063 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2064 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2065 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2066 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2067 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2068 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2069 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2070 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2071 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2072 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2073 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2074 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2075 |
def test_pool_entry13(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2076 |
"""Tests boot_device pool device conflict""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2077 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2078 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2079 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2080 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2081 |
#boot_device c0t0d0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2082 |
key_value = KeyValues("boot_device", ["c0t0d0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2083 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2084 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2085 |
#pool newpool auto auto auto c1t0d0s7 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2086 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2087 |
"c1t0d0s7"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2088 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2089 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2090 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2091 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2092 |
self.assertEquals(report.has_errors(), True, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2093 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2094 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2095 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2096 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2097 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2098 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2099 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2100 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2101 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2102 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2103 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2104 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2105 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2106 |
def test_pool_entry14(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2107 |
"""Tests root_device pool device conflict""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2108 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2109 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2110 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2111 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2112 |
#root_device c0t0d0s0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2113 |
key_value = KeyValues("root_device", ["c0t0d0s0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2114 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2115 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2116 |
#pool newpool auto auto auto c0t0d0s7 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2117 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2118 |
"c1t0d0s7"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2119 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2120 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2121 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2122 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2123 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2124 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2125 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2126 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2127 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2128 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2129 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2130 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2131 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2132 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2133 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2134 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2135 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2136 |
def test_pool_entry15(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2137 |
"""Tests root_device pool with no device conflict""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2138 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2139 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2140 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2141 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2142 |
#root_device c0t0d0s0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2143 |
key_value = KeyValues("root_device", ["c0t0d0s0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2144 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2145 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2146 |
#pool newpool auto auto auto c0t0d0s0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2147 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2148 |
"c0t0d0s0"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2149 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2150 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2151 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2152 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2153 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2154 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2155 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2156 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2157 |
def test_pool_entry17(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2158 |
"""Tests root_device pool with any device""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2159 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2160 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2161 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2162 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2163 |
#root_device c0t0d0s0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2164 |
key_value = KeyValues("root_device", ["c0t0d0s0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2165 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2166 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2167 |
#pool newpool auto auto auto any |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2168 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2169 |
"any"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2170 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2171 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2172 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2173 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2174 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2175 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2176 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2177 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2178 |
def test_pool_entry18(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2179 |
"""Tests mirrored pool with a device of any""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2180 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2181 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2182 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2183 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2184 |
#root_device c0t0d0s0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2185 |
key_value = KeyValues("root_device", ["c0t0d0s0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2186 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2187 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2188 |
#pool newpool auto auto auto mirror any c0t0d0s7 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2189 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2190 |
"mirror", "any", "c1t0d0s7"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2191 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2192 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2193 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2194 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2195 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2196 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2197 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2198 |
self.assertEquals(report.conversion_errors, 1, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2199 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2200 |
self.assertEquals(report.unsupported_items, 0, |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2201 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2202 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2203 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2204 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2205 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2206 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2207 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2208 |
def test_pool_entry19(self): |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2209 |
"""Tests pool/fdisk can co-exist on using same device""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2210 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2211 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2212 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2213 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2214 |
#pool newpool auto auto auto c0t0d0s0 |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2215 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2216 |
"c0t0d0s0"], 2) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2217 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2218 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2219 |
# fdisk c1t0d0 solaris all |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2220 |
key_value = KeyValues("fdisk", ["c0t0d0", "solaris", "all"], 3) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2221 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2222 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2223 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2224 |
self.default_xml, True, None) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2225 |
self.assertEquals(report.has_errors(), False, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2226 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2227 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2228 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2229 |
def test_pool_entry20(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2230 |
"""Tests boot_device mirrored pool where devices agree""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2231 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2232 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2233 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2234 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2235 |
#boot_device c0t0d0 |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2236 |
key_value = KeyValues("boot_device", ["c0t0d0s0"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2237 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2238 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2239 |
#pool newpool auto auto auto mirror c0t0d0s0 c0t0d0s1 |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2240 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2241 |
"mirror", "c0t0d0s0", "c0t0d0s1"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2242 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2243 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2244 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2245 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2246 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2247 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2248 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2249 |
self.assertEquals(report.conversion_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2250 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2251 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2252 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2253 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2254 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2255 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2256 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2257 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2258 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2259 |
def test_pool_entry21(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2260 |
"""Tests boot_device, pool where device is any size is auto""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2261 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2262 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2263 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2264 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2265 |
#boot_device c0t0d0 |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2266 |
key_value = KeyValues("boot_device", ["c0t0d0s0"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2267 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2268 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2269 |
#pool newpool auto auto auto mirror c0t0d0s0 c0t0d0s1 |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2270 |
key_value = KeyValues("pool", ["newpool", "1000", "auto", "auto", |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2271 |
"any"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2272 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2273 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2274 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2275 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2276 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2277 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2278 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2279 |
self.assertEquals(report.conversion_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2280 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2281 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2282 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2283 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2284 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2285 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2286 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2287 |
self.validate_xml_output(xml_data) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2288 |
|
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2289 |
def test_pool_entry22(self): |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2290 |
"""Tests pool where slice specified is disk""" |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2291 |
kv_dict = {} |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2292 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2293 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2294 |
|
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2295 |
#pool newpool auto auto auto c0t0d0s0 |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2296 |
key_value = KeyValues("pool", ["newpool", "auto", "auto", "auto", |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2297 |
"c0t0d0"], 2) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2298 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2299 |
|
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2300 |
# fdisk c1t0d0 solaris all |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2301 |
key_value = KeyValues("fdisk", ["c0t0d0", "solaris", "all"], 3) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2302 |
kv_dict[key_value.line_num] = key_value |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2303 |
report = ConversionReport() |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2304 |
xml_data = XMLProfileData("test", kv_dict, report, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2305 |
self.default_xml, True, None) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2306 |
self.assertEquals(report.has_errors(), True) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2307 |
self.assertEquals(report.process_errors, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2308 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2309 |
self.assertEquals(report.conversion_errors, 1, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2310 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2311 |
self.assertEquals(report.unsupported_items, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2312 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2313 |
self.assertEquals(report.validation_errors, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2314 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2315 |
self.assertEquals(report.warnings, 0, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2316 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2317 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2318 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2319 |
def test_root_device_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2320 |
"""Tests root_device with incorrect # of args""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2321 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2322 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2323 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2324 |
key_value = KeyValues("root_device", ["mirrorbogus", "/"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2325 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2326 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2327 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2328 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2329 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2330 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2331 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2332 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2333 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2334 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2335 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2336 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2337 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2338 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2339 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2340 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2341 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2342 |
def test_root_device_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2343 |
"""Tests root_device with invalid device""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2344 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2345 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2346 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2347 |
key_value = KeyValues("root_device", ["cKt0d0s3"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2348 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2349 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2350 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2351 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2352 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2353 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2354 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2355 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2356 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2357 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2358 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2359 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2360 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2361 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2362 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2363 |
def test_root_device_entry3(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2364 |
"""Tests root_device with valid device""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2365 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2366 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2367 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2368 |
key_value = KeyValues("root_device", ["c0t0d0s1"], 4) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2369 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2370 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2371 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2372 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2373 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2374 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2375 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2376 |
|
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2377 |
def test_root_device_entry4(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2378 |
"""Tests root_device with previous set boot_device""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2379 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2380 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2381 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2382 |
key_value = KeyValues("boot_device", ["c1t0d0s1"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2383 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2384 |
key_value = KeyValues("root_device", ["c0t0d0s1"], 4) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2385 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2386 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2387 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2388 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2389 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2390 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2391 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2392 |
self.assertEquals(report.conversion_errors, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2393 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2394 |
self.assertEquals(report.unsupported_items, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2395 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2396 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2397 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2398 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2399 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2400 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2401 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2402 |
def test_system_type_entry1(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2403 |
"""Tests system_type with valid value""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2404 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2405 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2406 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2407 |
key_value = KeyValues("system_type", ["standalone"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2408 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2409 |
key_value = KeyValues("partitioning", ["default"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2410 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2411 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2412 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2413 |
self.default_xml, True, None) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2414 |
self.assertEquals(report.has_errors(), False, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2415 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2416 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2417 |
|
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2418 |
def test_system_type_entry2(self): |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2419 |
"""Tests system_type with invalid value""" |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2420 |
kv_dict = {} |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2421 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2422 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2423 |
key_value = KeyValues("system_type", ["somevalue"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2424 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2425 |
key_value = KeyValues("partitioning", ["default"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2426 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2427 |
kv_dict[key_value.line_num] = key_value |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2428 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2429 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2430 |
self.default_xml, True, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2431 |
self.assertEquals(report.has_errors(), True) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2432 |
self.assertEquals(report.process_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2433 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2434 |
self.assertEquals(report.conversion_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2435 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2436 |
self.assertEquals(report.unsupported_items, 1, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2437 |
self.profile_failure_report(xml_data, report)) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2438 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2439 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2440 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2441 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2442 |
self.validate_xml_output(xml_data) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2443 |
|
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2444 |
def test_usedisk_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2445 |
"""Tests usedisk with incorrect # of args""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2446 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2447 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2448 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2449 |
key_value = KeyValues("partitioning", ["default"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2450 |
kv_dict[key_value.line_num] = key_value |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2451 |
key_value = KeyValues("usedisk", ["mirrorbogus", "c0d0s3", \ |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2452 |
"c0t1d0s3", "4096", "/"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2453 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2454 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2455 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2456 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2457 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2458 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2459 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2460 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2461 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2462 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2463 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2464 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2465 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2466 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2467 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2468 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2469 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2470 |
def test_usedisk_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2471 |
"""Tests usedisk with correct # of args""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2472 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2473 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2474 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2475 |
key_value = KeyValues("partitioning", ["default"], 3) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2476 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2477 |
key_value = KeyValues("usedisk", ["c0t0d0"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2478 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2479 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2480 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2481 |
self.default_xml, True, None) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2482 |
self.assertEquals(report.has_errors(), False, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2483 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2484 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2485 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2486 |
def test_usedisk_entry3(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2487 |
"""Tests usedisk with correct # of args but bad disk""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2488 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2489 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2490 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2491 |
key_value = KeyValues("usedisk", ["bogus"], 5) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2492 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2493 |
key_value = KeyValues("partitioning", ["default"], 7) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2494 |
kv_dict[key_value.line_num] = key_value |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2495 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2496 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2497 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2498 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2499 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2500 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2501 |
self.assertEquals(report.conversion_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2502 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2503 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2504 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2505 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2506 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2507 |
self.validate_xml_output(xml_data) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2508 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2509 |
def test_install_type_entry1(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2510 |
"""Tests failure of install_type upgrade""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2511 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2512 |
key_value = KeyValues("install_type", ["upgrade"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2513 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2514 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2515 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2516 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2517 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2518 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2519 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2520 |
self.assertEquals(report.conversion_errors, None, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2521 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2522 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2523 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2524 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2525 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2526 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2527 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2528 |
self.assertEquals(xml_data.tree, None, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2529 |
self.profile_failure_report(xml_data, report)) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2530 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2531 |
def test_install_type_entry2(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2532 |
"""Tests failure of install_type""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2533 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2534 |
key_value = KeyValues("install_type", ["None"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2535 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2536 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2537 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2538 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2539 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2540 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2541 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2542 |
self.assertEquals(report.conversion_errors, None, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2543 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2544 |
self.assertEquals(report.unsupported_items, None, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2545 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2546 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2547 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2548 |
self.assertEquals(xml_data.tree, None, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2549 |
self.profile_failure_report(xml_data, report)) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2550 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2551 |
def test_install_type_entry3(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2552 |
"""Tests failure of install_type flash_install""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2553 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2554 |
key_value = KeyValues("install_type", ["flash_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2555 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2556 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2557 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2558 |
self.default_xml, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2559 |
self.assertEquals(report.has_errors(), True) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2560 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2561 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2562 |
self.assertEquals(report.conversion_errors, None, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2563 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2564 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2565 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2566 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2567 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2568 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2569 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2570 |
self.assertEquals(xml_data.tree, None, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2571 |
self.profile_failure_report(xml_data, report)) |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2572 |
self.assertEquals(xml_data.tree, None, |
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2573 |
self.profile_failure_report(xml_data, report)) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2574 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2575 |
def test_install_type_entry4(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2576 |
"""Tests failure of install_type flash_upgrade""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2577 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2578 |
key_value = KeyValues("install_type", ["flash_upgrade"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2579 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2580 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2581 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2582 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2583 |
self.assertEquals(report.has_errors(), True) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2584 |
self.assertEquals(report.process_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2585 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2586 |
self.assertEquals(report.conversion_errors, None, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2587 |
self.profile_failure_report(xml_data, report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2588 |
self.assertEquals(report.unsupported_items, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2589 |
self.profile_failure_report(xml_data, report)) |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2590 |
self.assertEquals(report.validation_errors, 0, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2591 |
self.profile_failure_report(xml_data, report)) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2592 |
self.assertEquals(report.warnings, 0, |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2593 |
self.profile_failure_report(xml_data, report)) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2594 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2595 |
def test_install_type_entry5(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2596 |
"""Tests install_type of initial_install""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2597 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2598 |
key_value = KeyValues("install_type", ["initial_install"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2599 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2600 |
key_value = KeyValues("partitioning", ["default"], 2) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2601 |
kv_dict[key_value.line_num] = key_value |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2602 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2603 |
xml_data = XMLProfileData("test", kv_dict, report, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2604 |
self.default_xml, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2605 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2606 |
self.profile_failure_report(xml_data, report)) |
1310
83589242ecdd
7068239 fdisk rootdisk solaris <size> not being handling properly by js2ai
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1304
diff
changeset
|
2607 |
self.validate_xml_output(xml_data) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2608 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2609 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2610 |
class Test_Profile_corner_cases(unittest.TestCase): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2611 |
"""Test profile corner cases""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2612 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2613 |
def setUp(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2614 |
"""Setup for tests run""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2615 |
# Create a directory to work in |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2616 |
self.working_dir = tempfile.mkdtemp() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2617 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2618 |
def tearDown(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2619 |
"""Cleanup test""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2620 |
# Delete everything when we are done |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2621 |
shutil.rmtree(self.working_dir) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2622 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2623 |
def test_corner_case1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2624 |
"""Tests corner cases to satisfy code coverage""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2625 |
kv_dict = {} |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2626 |
key_value = KeyValues("install_type", ["upgrade"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2627 |
kv_dict[key_value.line_num] = key_value |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2628 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2629 |
xml_data = XMLProfileData("test", kv_dict, report, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2630 |
None, None, None) |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2631 |
self.assertEquals(report.has_errors(), True) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2632 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2633 |
def test_corner_case2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2634 |
"""Tests corner cases to satisfy code coverage""" |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2635 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2636 |
kv_dict[0] = None |
1193
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2637 |
report = ConversionReport() |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2638 |
self.assertRaises(KeyError, XMLProfileData, |
6bcf22ae1e19
7021883 js2ai needs to be updated to work with the new target DTD
Drew Fisher <drew.fisher@oracle.com>
parents:
1030
diff
changeset
|
2639 |
"test", kv_dict, report, None, True, None) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2640 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2641 |
def test_non_exist_dir1(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2642 |
"""Write xml data (None) to non existing directory |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2643 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2644 |
""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2645 |
tdir = os.path.join(self.working_dir, "abc") |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2646 |
# The directory that this file will be written to doesn't exist |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2647 |
# so this test passes by not getting any exceptions during the |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2648 |
# run |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2649 |
write_xml_data(None, tdir, "filename") |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2650 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2651 |
def test_non_exist_dir2(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2652 |
"""Write xml data to non existing directory |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2653 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2654 |
""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2655 |
kv_dict = {} |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2656 |
key_value = KeyValues("install_type", ["invalid_value"], 1) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2657 |
kv_dict[key_value.line_num] = key_value |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2658 |
report = ConversionReport() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2659 |
xml_data = XMLProfileData("test", kv_dict, report, None, True, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2660 |
tdir = os.path.join(self.working_dir, "abc") |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2661 |
# The directory that this file will be written to doesn't exist |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2662 |
# so this test passes by not getting any exceptions during the |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2663 |
# run |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2664 |
write_xml_data(xml_data.tree, tdir, "filename") |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2665 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2666 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2667 |
class Test_Profile_unsupported_keywords(unittest.TestCase): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2668 |
"""Test profile unsupported keywords""" |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2669 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2670 |
unsupported_keywords = [ |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2671 |
"bootenv", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2672 |
"client_arch", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2673 |
"client_swap", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2674 |
"cluster", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2675 |
"dontuse", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2676 |
"geo", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2677 |
"locale", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2678 |
"num_clients", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2679 |
"partitioning", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2680 |
"system_type", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2681 |
] |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2682 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2683 |
def test_unsupported_keywords(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2684 |
"""Tests failure of unsupported keywords""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2685 |
for keyword in self.unsupported_keywords: |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2686 |
kv_dict = {} |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2687 |
key_value = KeyValues(keyword, ["bogus_arg"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2688 |
kv_dict[key_value.line_num] = key_value |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2689 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2690 |
XMLProfileData("test", kv_dict, report, None, True, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2691 |
self.assertEquals(report.has_errors(), True) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2692 |
self.assertEquals(report.process_errors, 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2693 |
self.assertEquals(report.conversion_errors, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2694 |
self.assertEquals(report.unsupported_items, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2695 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2696 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2697 |
class Test_Rules(unittest.TestCase): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2698 |
"""Test Rules""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2699 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2700 |
def setUp(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2701 |
"""Setup tests""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2702 |
# Create a directory to work in |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2703 |
self.working_dir = tempfile.mkdtemp() |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2704 |
self.log_file = os.path.join(self.working_dir, js2ai.LOGFILE) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2705 |
js2ai.logger_setup(self.working_dir) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2706 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2707 |
def tearDown(self): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2708 |
"""Cleanup after test run""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2709 |
# Delete everything when we are done |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2710 |
shutil.rmtree(self.working_dir) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2711 |
|
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2712 |
def rule_failure_report(self, report): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2713 |
"""Generate failure report""" |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2714 |
return failure_report(report, self.log_file) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2715 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2716 |
def test_arch_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2717 |
""" Tests the "arch" keyword to make sure it returns successfully""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2718 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2719 |
def_rule.add_key_values("arch", ["sparc"], 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2720 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2721 |
XMLRuleData("test", def_rule, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2722 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2723 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2724 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2725 |
def test_arch_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2726 |
""" Tests the "arch" keyword to make sure it returns failure. |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2727 |
""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2728 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2729 |
def_rule.add_key_values("arch", None, 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2730 |
report = ConversionReport() |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2731 |
try: |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2732 |
XMLRuleData("test", def_rule, report, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2733 |
except ValueError: |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2734 |
pass |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2735 |
else: |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2736 |
self.fail("Expected ValueError") |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2737 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2738 |
def test_hostaddress_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2739 |
""" Tests the "hostaddress" keyword to make sure it returns success""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2740 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2741 |
def_rule.add_key_values("hostaddress", ["192.168.168.123"], 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2742 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2743 |
XMLRuleData("test", def_rule, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2744 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2745 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2746 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2747 |
def test_hostaddress_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2748 |
""" Tests the "hostaddress" keyword to make sure it fails if None""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2749 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2750 |
def_rule.add_key_values("hostaddress", None, 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2751 |
report = ConversionReport() |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2752 |
try: |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2753 |
XMLRuleData("test", def_rule, report, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2754 |
except ValueError: |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2755 |
pass |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2756 |
else: |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2757 |
self.fail("Expected ValueError") |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2758 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2759 |
def test_no_def_rule(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2760 |
""" Test the error path in the case where is no defined rule""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2761 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2762 |
XMLRuleData("test", None, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2763 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2764 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2765 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2766 |
def test_network_range1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2767 |
""" Test that given an address we process it correctly""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2768 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2769 |
def_rule.add_key_values("network", ["192.168.168.0"], 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2770 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2771 |
XMLRuleData("test", def_rule, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2772 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2773 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2774 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2775 |
def test_network_range2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2776 |
""" Test that given an invalid address we error correctly""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2777 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2778 |
def_rule.add_key_values("network", ["192.168.168"], 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2779 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2780 |
XMLRuleData("test", def_rule, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2781 |
self.assertEquals(report.has_errors(), True, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2782 |
self.rule_failure_report(report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2783 |
self.assertEquals(report.process_errors, 1, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2784 |
self.rule_failure_report(report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2785 |
self.assertEquals(report.conversion_errors, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2786 |
self.rule_failure_report(report)) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2787 |
self.assertEquals(report.unsupported_items, 0, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2788 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2789 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2790 |
def test_karch_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2791 |
""" Test that given an karch we process it correctly""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2792 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2793 |
def_rule.add_key_values("karch", ["sun4v"], 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2794 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2795 |
XMLRuleData("test", def_rule, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2796 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2797 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2798 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2799 |
def test_karch_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2800 |
""" Test that given an invalid karch we error correctly""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2801 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2802 |
def_rule.add_key_values("karch", None, 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2803 |
report = ConversionReport() |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2804 |
try: |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2805 |
XMLRuleData("test", def_rule, report, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2806 |
except ValueError: |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2807 |
pass |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2808 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2809 |
def test_memsize_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2810 |
""" Test that given a memsize we process it correctly""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2811 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2812 |
def_rule.add_key_values("memsize", ["2048"], 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2813 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2814 |
XMLRuleData("test", def_rule, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2815 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2816 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2817 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2818 |
def test_memsize_entry2(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2819 |
""" Test that given a invalid memsize we error correctly """ |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2820 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2821 |
def_rule.add_key_values("memsize", None, 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2822 |
report = ConversionReport() |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2823 |
try: |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2824 |
XMLRuleData("test", def_rule, report, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2825 |
except ValueError: |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2826 |
pass |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2827 |
else: |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2828 |
self.fail("Expected ValueError") |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2829 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2830 |
def test_memsize_entry3(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2831 |
""" Test that given a memsize we process it correctly""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2832 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2833 |
def_rule.add_key_values("memsize", ["1024-2048"], 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2834 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2835 |
XMLRuleData("test", def_rule, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2836 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2837 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2838 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2839 |
def test_model_entry1(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2840 |
""" Test that given an model we process it correctly""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2841 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2842 |
def_rule.add_key_values("model", ["SUNW,Sun-Fire-880"], 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2843 |
report = ConversionReport() |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2844 |
XMLRuleData("test", def_rule, report, None) |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2845 |
self.assertEquals(report.has_errors(), False, |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2846 |
self.rule_failure_report(report)) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2847 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2848 |
def test_model(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2849 |
""" Test that given an blank model we error correctly""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2850 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2851 |
def_rule.add_key_values("model", None, 1) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2852 |
report = ConversionReport() |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2853 |
try: |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2854 |
XMLRuleData("test", def_rule, report, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2855 |
except ValueError: |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2856 |
pass |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2857 |
else: |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2858 |
self.fail("Expected ValueError") |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2859 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2860 |
|
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2861 |
class Test_Rule_unsupported_keywords(unittest.TestCase): |
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2862 |
"""Test Rules unsupported keywords""" |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2863 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2864 |
unsupported_rule_keywords = [ |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2865 |
"any", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2866 |
"disksize", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2867 |
"domainname", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2868 |
"hostname", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2869 |
"installed", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2870 |
"osname", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2871 |
"probe", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2872 |
"totaldisk", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2873 |
"bogus", |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2874 |
] |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2875 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2876 |
def test_unsupported_rule_keywords(self): |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2877 |
"""Tests failure of unsupported keywords""" |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2878 |
for keyword in self.unsupported_rule_keywords: |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2879 |
def_rule = js2ai.DefinedRule(None, None, None) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2880 |
report = ConversionReport() |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2881 |
def_rule.add_key_values(keyword, ["bogus_arg"], 1) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2882 |
XMLRuleData("test", def_rule, report, None) |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2883 |
self.assertEquals(report.has_errors(), True) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2884 |
self.assertEquals(report.process_errors, 0) |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2885 |
self.assertEquals(report.conversion_errors, 0) |
1294
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2886 |
self.assertEquals(report.validation_errors, 0) |
29f8c8d3791c
7062927 js2ai need to delete slices prior to create when user specified whole disk
Kristina Tripp <Kristina.Tripp@Sun.COM>
parents:
1219
diff
changeset
|
2887 |
self.assertEquals(report.warnings, 0) |
1030
fba9ec006f29
7008130 Add support for converting sysidcfg
Evan Layton <evan.layton@oracle.com>
parents:
961
diff
changeset
|
2888 |
self.assertEquals(report.unsupported_items, 1, keyword + "failed") |
961
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2889 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2890 |
|
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2891 |
if __name__ == '__main__': |
1db352e5e4c9
16260 We need a migration tool for going from Jumpstart profiles and rules files to AI manifest entries
Evan Layton <Evan.Layton@Sun.COM>
parents:
diff
changeset
|
2892 |
unittest.main() |