Move console scripts to entrypoints.
As part of the move of plugins to entrypoints, take advantage of the entrypoints based console scripts, which will make our command line scripts available for unittesting. Part of blueprint entrypoints-plugins Co-authored-by: Michael Still <mikal@stillhq.com> Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
This commit is contained in:
		
				
					committed by
					
						
						Michael Still
					
				
			
			
				
	
			
			
			
						parent
						
							fc2dd7ba05
						
					
				
				
					commit
					34bf93e4ae
				
			@@ -16,29 +16,17 @@
 | 
			
		||||
#    License for the specific language governing permissions and limitations
 | 
			
		||||
#    under the License.
 | 
			
		||||
 | 
			
		||||
import imp
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
import tempfile
 | 
			
		||||
import time
 | 
			
		||||
 | 
			
		||||
import mox
 | 
			
		||||
 | 
			
		||||
from nova.cmd import baremetal_deploy_helper as bmdh
 | 
			
		||||
from nova import test
 | 
			
		||||
from nova.tests.baremetal.db import base as bm_db_base
 | 
			
		||||
from nova.virt.baremetal import db as bm_db
 | 
			
		||||
 | 
			
		||||
TOPDIR = os.path.normpath(os.path.join(
 | 
			
		||||
                            os.path.dirname(os.path.abspath(__file__)),
 | 
			
		||||
                            os.pardir,
 | 
			
		||||
                            os.pardir,
 | 
			
		||||
                            os.pardir))
 | 
			
		||||
BMDH_PATH = os.path.join(TOPDIR, 'bin', 'nova-baremetal-deploy-helper')
 | 
			
		||||
 | 
			
		||||
sys.dont_write_bytecode = True
 | 
			
		||||
bmdh = imp.load_source('bmdh', BMDH_PATH)
 | 
			
		||||
sys.dont_write_bytecode = False
 | 
			
		||||
 | 
			
		||||
_PXECONF_DEPLOY = """
 | 
			
		||||
default deploy
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,23 +16,9 @@
 | 
			
		||||
#    License for the specific language governing permissions and limitations
 | 
			
		||||
#    under the License.
 | 
			
		||||
 | 
			
		||||
import imp
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
from nova.cmd import baremetal_manage as bm_man
 | 
			
		||||
from nova.tests.baremetal.db import base as bm_db_base
 | 
			
		||||
 | 
			
		||||
TOPDIR = os.path.normpath(os.path.join(
 | 
			
		||||
                            os.path.dirname(os.path.abspath(__file__)),
 | 
			
		||||
                            os.pardir,
 | 
			
		||||
                            os.pardir,
 | 
			
		||||
                            os.pardir))
 | 
			
		||||
BM_MAN_PATH = os.path.join(TOPDIR, 'bin', 'nova-baremetal-manage')
 | 
			
		||||
 | 
			
		||||
sys.dont_write_bytecode = True
 | 
			
		||||
bm_man = imp.load_source('bm_man', BM_MAN_PATH)
 | 
			
		||||
sys.dont_write_bytecode = False
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class BareMetalDbCommandsTestCase(bm_db_base.BMDBTestCase):
 | 
			
		||||
    def setUp(self):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user