mirror of
				https://github.com/Telecominfraproject/wlan-cloud-owprov.git
				synced 2025-10-31 18:48:09 +00:00 
			
		
		
		
	Added ability to reboot a venue.
This commit is contained in:
		| @@ -13,6 +13,7 @@ | ||||
| #include "StorageService.h" | ||||
| #include "RESTAPI/RESTAPI_db_helpers.h" | ||||
| #include "Tasks/VenueConfigUpdater.h" | ||||
| #include "Tasks/VenueRebooter.h" | ||||
|  | ||||
| #include "Kafka_ProvUpdater.h" | ||||
|  | ||||
| @@ -231,6 +232,21 @@ namespace OpenWifi{ | ||||
|             return ReturnObject(Answer); | ||||
|         } | ||||
|  | ||||
|         auto rebootAllDevices = GetBoolParameter("rebootAllDevices"); | ||||
|         if(rebootAllDevices) { | ||||
|             ProvObjects::SerialNumberList   SNL; | ||||
|  | ||||
|             Poco::JSON::Object  Answer; | ||||
|             SNL.serialNumbers = Existing.devices; | ||||
|  | ||||
|             auto Task = new VenueRebooter(UUID,UserInfo_.userinfo,0,Logger()); | ||||
|             auto JobId = Task->Start(); | ||||
|  | ||||
|             SNL.to_json(Answer); | ||||
|             Answer.set("jobId",JobId); | ||||
|             return ReturnObject(Answer); | ||||
|         } | ||||
|  | ||||
|         auto RawObject = ParseStream(); | ||||
|         ProvObjects::Venue NewObject; | ||||
|         if (!NewObject.from_json(RawObject)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959