mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-30 19:02:27 +00:00 
			
		
		
		
	remove unused updatenodeupdatestat
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14848 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -61,7 +61,6 @@ sub handled_commands | ||||
|             updatenodestat       => "updatenode", | ||||
|             updatemynodestat     => "updatenode", | ||||
|             updatenodeappstat    => "updatenode", | ||||
|             updatenodeupdatestat => "updatenode" | ||||
|             }; | ||||
| } | ||||
|  | ||||
| @@ -102,10 +101,6 @@ sub preprocess_request | ||||
|     { | ||||
|         return [$request]; | ||||
|     } | ||||
|     elsif ($command eq "updatenodeupdatestat") | ||||
|     { | ||||
|         return [$request]; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         my $rsp = {}; | ||||
| @@ -159,10 +154,6 @@ sub process_request | ||||
|     { | ||||
|         return updatenodeappstat($request, $callback); | ||||
|     } | ||||
|     elsif ($command eq "updatenodeupdatestat") | ||||
|     { | ||||
|         return updatenodeupdatestat($request, $callback); | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         my $rsp = {}; | ||||
| @@ -1775,64 +1766,6 @@ sub updatenodestat | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
| #------------------------------------------------------------------------------- | ||||
|  | ||||
| =head3   updatenodeupdatestat | ||||
|  | ||||
| update the nodelist.updatestatus and nodelist.updatestatustime during updatenode | ||||
|  | ||||
|     Arguments: | ||||
|     Returns: | ||||
|         0 - for success. | ||||
|         1 - for error. | ||||
|  | ||||
| =cut | ||||
|  | ||||
| #----------------------------------------------------------------------------- | ||||
| sub updatenodeupdatestat | ||||
| { | ||||
|     my $request  = shift; | ||||
|     my $callback = shift; | ||||
|     my @nodes    = (); | ||||
|     my @args     = (); | ||||
|     if (ref($request->{node})) | ||||
|     { | ||||
|         @nodes = @{$request->{node}}; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         if ($request->{node}) { @nodes = ($request->{node}); } | ||||
|         else | ||||
|         {    #client asking to update its own status... | ||||
|             unless (ref $request->{username}) | ||||
|             { | ||||
|                 return; | ||||
|             }    #TODO: log an attempt without credentials? | ||||
|             @nodes = @{$request->{username}}; | ||||
|         } | ||||
|     } | ||||
|     if (ref($request->{arg})) | ||||
|     { | ||||
|         @args = @{$request->{arg}}; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         @args = ($request->{arg}); | ||||
|     } | ||||
|  | ||||
|     if ((@nodes > 0) && (@args > 0)) | ||||
|     { | ||||
|         my $stat = $args[0]; | ||||
|         unless ($::VALID_STATUS_VALUES{$stat}) | ||||
|         { | ||||
|             return; | ||||
|         }    #don't accept just any string, see GlobalDef for updates | ||||
|  | ||||
|         xCAT::TableUtils->setUpdateStatus(\@nodes, $stat); | ||||
|     } | ||||
|  | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
| #------------------------------------------------------------------------------- | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user