Renamed definenet.py to addnetwork.py and updated all affected modules.

This moves the command name to be in line with other commands.
This commit is contained in:
Darryl L. Pierce 2011-07-15 10:02:25 -04:00 committed by Cole Robinson
parent 93ce57a69f
commit 51985f0d40
2 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# definenet.py - Copyright (C) 2009 Red Hat, Inc.
# addnetwork.py - Copyright (C) 2009 Red Hat, Inc.
# Written by Darryl L. Pierce <dpierce@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
@ -37,7 +37,7 @@ NETWORK_TYPE_PAGE = 6
SELECT_PHYSICAL_NETWORK_PAGE = 7
SUMMARY_PAGE = 8
class DefineNetworkConfigScreen(VmmTuiConfigScreen):
class AddNetworkConfigScreen(VmmTuiConfigScreen):
def __init__(self):
VmmTuiConfigScreen.__init__(self, "Create A Virtual Network Interface")
self.__config = NetworkConfig()
@ -256,6 +256,6 @@ class DefineNetworkConfigScreen(VmmTuiConfigScreen):
return [Label("Ready To Create Network"),
self.create_grid_from_fields(fields)]
def DefineNetwork():
screen = DefineNetworkConfigScreen()
def AddNetwork():
screen = AddNetworkConfigScreen()
screen.start()

View File

@ -18,13 +18,13 @@
from newt_syrup.menuscreen import MenuScreen
from definenet import DefineNetwork
from addnetwork import AddNetwork
from startnetwork import StartNetwork
from stopnetwork import StopNetwork
from undefinenetwork import UndefineNetwork
from listnetworks import ListNetworks
DEFINE_NETWORK = 1
ADD_NETWORK = 1
START_NETWORK = 2
STOP_NETWORK = 3
UNDEFINE_NETWORK = 4
@ -35,15 +35,15 @@ class NetworkMenuScreen(MenuScreen):
MenuScreen.__init__(self, "Network Administration")
def get_menu_items(self):
return (("Define A Network", DEFINE_NETWORK),
return (("Add A Network", ADD_NETWORK),
("Start A Network", START_NETWORK),
("Stop A Network", STOP_NETWORK),
("Undefine A Network", UNDEFINE_NETWORK),
("List Networks", LIST_NETWORKS))
def handle_selection(self, item):
if item is DEFINE_NETWORK:
DefineNetwork()
if item is ADD_NETWORK:
AddNetwork()
elif item is START_NETWORK:
StartNetwork()
elif item is STOP_NETWORK: