mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 17:52:28 +00:00
Adding Signup Table
This commit is contained in:
@@ -72,6 +72,9 @@ namespace OpenWifi {
|
||||
SecurityObjects::UserInfo UI;
|
||||
|
||||
UI.from_json(Answer);
|
||||
std::ostringstream os;
|
||||
Answer->stringify(os);
|
||||
std::cout << "Create user: " << std::endl << os.str() << std::endl;
|
||||
|
||||
// so create the Signup entry and modify the inventory
|
||||
ProvObjects::SignupEntry SE;
|
||||
|
||||
@@ -461,6 +461,14 @@ affecteddevices() {
|
||||
jq < ${result_file}
|
||||
}
|
||||
|
||||
signup() {
|
||||
curl ${FLAGS} -X POST "https://${OWPROV}/api/v1/signup?email=stehane.bourque@gmail.com&serialNumber=112233445566" \
|
||||
-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 ;;
|
||||
@@ -504,6 +512,7 @@ case "$1" in
|
||||
"systeminfo") login; systeminfo ; logout;;
|
||||
"addresscheck") login; addresscheck; logout ;;
|
||||
"affecteddevices") login; affecteddevices "$2"; logout;;
|
||||
"signup") login; signup ; logout;;
|
||||
*) help ;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user