mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-03 21:02:34 +00:00 
			
		
		
		
	Give error message if invalid osimage is provided to rmnimimage.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6855 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -3984,6 +3984,22 @@ sub prermnimimage
 | 
			
		||||
        return (1);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #
 | 
			
		||||
    #  get list of defined xCAT osimage objects
 | 
			
		||||
    #
 | 
			
		||||
    my @deflist = undef;
 | 
			
		||||
    @deflist = xCAT::DBobjUtils->getObjectsOfType("osimage");
 | 
			
		||||
 | 
			
		||||
    # check if the provided image is valid.
 | 
			
		||||
    #
 | 
			
		||||
    if (!grep(/^$image_name$/, @deflist))
 | 
			
		||||
    {
 | 
			
		||||
        my $rsp;
 | 
			
		||||
        push @{$rsp->{data}}, "\'$image_name\' is not a valid xCAT image name.\n";
 | 
			
		||||
        xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
        return (1);
 | 
			
		||||
    } 
 | 
			
		||||
 | 
			
		||||
    # get the xCAT image definition
 | 
			
		||||
    my %objtype;
 | 
			
		||||
    $objtype{$image_name} = 'osimage';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user