Bug 50913

Summary: redhat-config-network-cmd doesn't seem to work at all
Product: [Retired] Red Hat Linux Reporter: Panic <mdrew>
Component: redhat-config-networkAssignee: Phil Knirsch <pknirsch>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 7.3CC: harald, pknirsch, rvokal, teg
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-08-06 14:10:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Panic 2001-08-04 18:40:31 UTC
Description of Problem:

redhat-config-network-cmd does not find any profiles to work on.  My
assumption is that the profiles are the files stored in
/etc/sysconfig/networking/profiles or
/etc/sysconfig/networking/profiles/defaults, but none of those filenames
work for the -p option.

The section of code that doesn't find the profile is on line 66 of
netconf.py, here:

            for opt, val in opts:
                if opt == '-p ' or opt == '--profile':
                    profilelist = getProfileList()
                    profilelist.switchToProfile(val)
                    sys.exit(0)

trying to run -cmd with a profile specified (from the profiles/default dir)
always results in the "No profile with name" error from NCProfileList.py on
line 246:


    def switchToProfile(self, val):
        devicelist = NCDeviceList.getDeviceList()
        hardwarelist = NCHardwareList.getHardwareList()
        profilelist = getProfileList()

        found = false
        for prof in profilelist:
            if prof.ProfileName == val:
                found = true
                break

        if found == false:
            print "No Profile with name "+val+" could be found."
            return

Apparently, "prof.ProfileName == val:" never tests as true, or I'm confused
as to what a profile is, because the break is never reached and the error
is always returned.

How Reproducible:

Always

Steps to Reproduce:
1. attempt to run redhat-config-network-cmd with any profile that is
configured.
2. Note the error message returned.
3. 

Actual Results:

redhat-config-network-cmd does not seem to work

Expected Results:

redhat-config-network-cmd should do whatever it is supposed to do.

Additional Information:

Comment 1 Trond Eivind Glomsrxd 2001-08-05 19:56:19 UTC
The profile system is currently being adjusted.

Comment 2 Panic 2001-08-06 14:24:25 UTC
I realized how this worked after I submitted this -- I'm going to close it
NOTABUG since I didn't know what I was doing.