Skip to content

Information model

MKV21 edited this page Nov 13, 2014 · 9 revisions

Outdated

Timing Information

timing-obj, one of

  • "timing_periodic"
  • "timing_calendar"
  • "timing_one_off"
  • "timing_immediate"
  • "timing_ondemand"
"timing-periodic" : 
{
	"start" : "datetime", // optional
	"end" : "datetime", // optional
	"interval" : "int"
}

"timing-calendar" : 
{
	"start" : "datetime", // optional
	"end" : "datetime", // optional
	"months" : ["int"], // optional, default 1..12
	"weekdays" : [""], // optional, default Mon-Sun, possible values: Mon, Tue, Wed, Thu, Fri, Sat Sun
	"days" : ["int"], // optional, default 1..31
	"hours" : ["int"], // optional, default 1..24
	"minutes" : ["int"], // optional, default 0..59
	"seconds" : ["int"], // optional, default 0..59
}

"timing-one-off" : 
{
	"time" : "datetime"
}

"timing-immediate"

"timing-ondemand"

Randomness: TBD

Pre-Configuration

preconfig-obj : 
{
	"instruction_channel" : {
		"name" : "config-server",
		"target" : "ip:port",
		"certificate" : "xx",
		"timing" : timing-obj
	},
	"agent_id" : "uuid"
}

Configuration

get_config request
{
	"session_id" : ""
}

get_config response
{
	"instruction_channel" : channel-obj,
	"keepalive_channel" : channel-obj,
	"config_channel" : channel-obj
}

channel_obj :
{
	"id" : "id",
	"target" : "url",
	"certificate" : "",
	"timing" : timing-obj
}

Registration / Login

register_user request
{
	"user_id" : "",
	"password" : "",
	"xp_level" : "",
	"home_country" : ""
}

register_user response (success)
{
	"session_id" : "",
	"registered_device" : "bool"
}

register_device request
{
	"session_id" : "",
	"user_id" : "",
	"device_id" : "",
}

register_device response (success)
{}

login request
{
	"user_id" : "",
	"device_id" : "",
	"password" : ""
}

login response (success)
{
	"session_id" : ""
}


Response on error
{
	"error" : ""
}

Instruction

https://github.com/elnappo/glimpse_supervisor/blob/master/supervisor/command/models.py

instruction GET request
{
	"session_id" : ""
}

instruction GET response
{
	"tasks" : [ task_obj_id ],
	"report_channels" : [ channel_obj_id ],
	"schedules" : [ schedule_obj_id ]
}

task_obj : 
{
	"id" : "id",
	"method" : "",
	"options" : {}
}

channel_obj :
{
	"id" : "id",
	"target" : "url",
	"certificate" : "",
	"timing" : timing-obj
}

schedule_obj :
{
	"id" : "id",
	"timing" : timing-obj,
	"task_id" : "id",
	"report_channel_id" : "id",
	"expected_results" : "",
	"on_success" : "",
	"on_failure" : "",
	"on_error" : "",
	"schedule_on_receive" : "bool",
	"preconditions" :
	{
		"on_cellular" : "bool",
		"on_wire" : "bool",
		"on_wireless" : "bool",
		"on_location" : "",
		"on_location_radius" : "int"
	}
} 

Suppressions: TBD

Keepalive

keepalive
{
	"type" : "keepalive",
	"session_id" : "uuid",
	"src_port" : "int"
}

MA to Controller

Logging information: TBD

Capability and Status Information

TBD

Reporting Information

results request
{
	"objects": [result_obj,]

}


result_obj :
{
	"start_date_time" : "datetime",
	"end_date_time" : "datetime",
        "ips" : [""],
        "cpu_usage" : "float",
	"results" : {}
}

Measurements

https://github.com/HSAnet/glimpse_repository/blob/master/repository/reports/models.py

Ping

{
	[ms]
}

UDP Ping

{
	[us]
}

BTC

{
	"download" : [kbyte/s],
	"upload" : [kbyte/s]
}

HTTP Download

{
	[kbyte/s]
}

UPnP

{
	["" : ""]
}

PacketTrains

{
	"sending_speed" : int,
	"receiving_speed" : int
}

Traceroute

{
	"hop": string,
	"pings":
	[
		{
			"response": int,
			"rtt": int
		},
	...
	],
	"ttl": int
}

Clone this wiki locally