mirror of
				https://github.com/Telecominfraproject/wlan-cloud-owprov.git
				synced 2025-10-29 09:42:38 +00:00 
			
		
		
		
	DeviceRules validation fix.
This commit is contained in:
		| @@ -526,9 +526,9 @@ namespace OpenWifi { | ||||
|     } | ||||
|  | ||||
|     inline bool ValidDeviceRules(const ProvObjects::DeviceRules & DR) { | ||||
|         return  (DR.rrm=="on" || DR.rrm=="off" || DR.rrm=="inherit") && | ||||
|                 (DR.firmwareUpgrade=="on" || DR.firmwareUpgrade=="off" || DR.firmwareUpgrade=="inherit") && | ||||
|                 (DR.rcOnly=="on" || DR.rcOnly=="off" || DR.rcOnly=="inherit"); | ||||
|         return  (DR.rrm=="yes" || DR.rrm=="no" || DR.rrm=="inherit") && | ||||
|                 (DR.firmwareUpgrade=="yes" || DR.firmwareUpgrade=="no" || DR.firmwareUpgrade=="inherit") && | ||||
|                 (DR.rcOnly=="yes" || DR.rcOnly=="no" || DR.rcOnly=="inherit"); | ||||
|     } | ||||
|  | ||||
|     inline bool ValidDeviceRules(const ProvObjects::DeviceRules & DR, RESTAPIHandler &H) { | ||||
|   | ||||
| @@ -491,6 +491,14 @@ getsignup() { | ||||
|     jq < ${result_file} | ||||
| } | ||||
|  | ||||
| listvenues() { | ||||
|     curl    ${FLAGS} -X GET "https://${OWPROV}/api/v1/venue" \ | ||||
|         -H "Content-Type: application/json" \ | ||||
|         -H "Authorization: Bearer ${token}" \ | ||||
|         -H "Accept: application/json" > ${result_file} | ||||
|     jq < ${result_file} | ||||
| } | ||||
|  | ||||
| shopt -s nocasematch | ||||
| case "$1" in | ||||
|     "login") login; echo "You are logged in..."  ; logout ;; | ||||
| @@ -537,6 +545,7 @@ case "$1" in | ||||
|     "signup") login; signup ; logout;; | ||||
|     "getsignup") login; getsignup $2; logout;; | ||||
|     "getsubdevs") login; getsubdevs $2; logout;; | ||||
|     "listvenues") login; listvenues $2; logout;; | ||||
|     *) help ;; | ||||
| esac | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959