-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from Sanji-IO/develop
Release ThingsPro_V2.0
- Loading branch information
Showing
12 changed files
with
413 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,54 @@ | ||
sanji-bundle-time (2.1.1-1) unstable; urgency=low | ||
|
||
* fix: Sync time at startup. | ||
|
||
-- Aeluin Chen <[email protected]> Fri, 31 Mar 2017 11:39:38 +0800 | ||
|
||
sanji-bundle-time (2.1.0-1) unstable; urgency=low | ||
|
||
* fix: Use "UTC" instead of local time. | ||
* feat: Provide timezone offset in zoneinfo. | ||
|
||
-- Aeluin Chen <[email protected]> Fri, 24 Mar 2017 17:38:47 +0800 | ||
|
||
sanji-bundle-time (2.0.1-1) unstable; urgency=low | ||
|
||
* fix: Pass local time instead of UTC. | ||
|
||
-- Aeluin Chen <[email protected]> Wed, 22 Mar 2017 14:07:03 +0800 | ||
|
||
sanji-bundle-time (2.0.0-1) unstable; urgency=low | ||
|
||
* BugFix: Wrong timezone list. | ||
|
||
-- Aeluin Chen <[email protected]> Fri, 21 Oct 2016 14:32:27 +0800 | ||
|
||
sanji-bundle-time (1.0.3-1) unstable; urgency=low | ||
|
||
* Enhance error message. | ||
|
||
-- Zack YL Shih <[email protected]> Tue, 19 Apr 2016 17:09:14 +0800 | ||
|
||
sanji-bundle-time (1.0.2-1) unstable; urgency=low | ||
|
||
* Use sh instead of subprocess.call. | ||
* Fix buggy sync. | ||
|
||
|
||
-- Zack YL Shih <[email protected]> Tue, 19 Apr 2016 16:28:12 +0800 | ||
|
||
sanji-bundle-time (1.0.1-1) unstable; urgency=low | ||
|
||
* Fix wrong schema. | ||
|
||
-- Zack YL Shih <[email protected]> Tue, 15 Mar 2016 16:34:52 +0800 | ||
|
||
sanji-bundle-time (1.0.0-1) unstable; urgency=low | ||
|
||
* Update API. | ||
|
||
-- Zack YL Shih <[email protected]> Tue, 01 Mar 2016 14:31:22 +0800 | ||
|
||
sanji-bundle-time (0.9.4-1) unstable; urgency=low | ||
|
||
* Sync to RTC while using NTP. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"name": "time", | ||
"version": "0.9.4", | ||
"version": "2.1.1", | ||
"author": "Zack YL Shih", | ||
"email": "[email protected]", | ||
"description": "System time management.", | ||
"description": "Provides the system-time management function", | ||
"license": "MOXA", | ||
"main": "index.py", | ||
"argument": "", | ||
|
@@ -17,6 +17,10 @@ | |
{ | ||
"methods": ["get", "put"], | ||
"resource": "/system/time" | ||
}, | ||
{ | ||
"methods": ["get"], | ||
"resource": "/system/zoneinfo" | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
paho-mqtt | ||
sanji | ||
sh | ||
python-dateutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
swagger: '2.0' | ||
|
||
info: | ||
title: System Time API | ||
description: System Time management | ||
version: '1.1.0' | ||
|
||
schemes: | ||
- http | ||
- https | ||
|
||
produces: | ||
- application/json | ||
|
||
paths: | ||
/system/time: | ||
get: | ||
description: Get current time settings | ||
responses: | ||
200: | ||
description: success | ||
schema: | ||
$ref: '#/definitions/Time' | ||
examples: | ||
{ | ||
"application/json": { | ||
$ref: '#/externalDocs/x-mocks/TimeExample' | ||
} | ||
} | ||
|
||
put: | ||
parameters: | ||
- name: body | ||
in: body | ||
required: true | ||
schema: | ||
$ref: '#/definitions/Time' | ||
description: Update time settings | ||
responses: | ||
200: | ||
description: success | ||
schema: | ||
$ref: '#/definitions/Time' | ||
examples: | ||
{ | ||
"application/json": { | ||
$ref: '#/externalDocs/x-mocks/TimeExample' | ||
} | ||
} | ||
|
||
/system/zoneinfo: | ||
get: | ||
description: Get current timezone information | ||
responses: | ||
200: | ||
description: success | ||
schema: | ||
$ref: '#/definitions/Timezone' | ||
examples: | ||
{ | ||
"application/json": { | ||
$ref: '#/externalDocs/x-mocks/TimezoneInfoExample' | ||
} | ||
} | ||
|
||
post: | ||
description: Update timezone information from internet | ||
responses: | ||
200: | ||
description: success | ||
|
||
definitions: | ||
Time: | ||
description: Time configuration | ||
type: object | ||
properties: | ||
time: | ||
description: 'Current system time (format: iso 8601)' | ||
type: string | ||
timezone: | ||
description: Current timezone | ||
type: string | ||
ntp: | ||
$ref: '#/definitions/NTP' | ||
example: | ||
$ref: '#/externalDocs/x-mocks/TimeExample' | ||
|
||
NTP: | ||
description: NTP configuration | ||
type: object | ||
required: | ||
- enable | ||
- server | ||
- interval | ||
properties: | ||
enable: | ||
description: Enable NTP client | ||
type: boolean | ||
server: | ||
description: Target NTP server | ||
type: string | ||
minLength: 1 | ||
maxLength: 2048 | ||
interval: | ||
description: 'Time sync interval in seconds (at least: 60 seconds.)' | ||
type: integer | ||
minimum: 60 | ||
maximum: 2592000 | ||
example: | ||
$ref: '#/externalDocs/x-mocks/NTPExample' | ||
|
||
Timezone: | ||
description: Timezone information | ||
type: object | ||
required: | ||
- zone | ||
- iso3166 | ||
properties: | ||
zone: | ||
description: TZ zone list with cca2 and TZ | ||
readOnly: true | ||
type: array | ||
items: | ||
$ref: '#/definitions/TimezoneZone' | ||
iso3166: | ||
description: ISO 3166 alpha-2 country codes | ||
readOnly: true | ||
type: array | ||
items: | ||
$ref: '#/definitions/TimezoneIso3166' | ||
example: | ||
$ref: '#/externalDocs/x-mocks/TimezoneInfoExample' | ||
|
||
TimezoneZone: | ||
description: ISO 3166 alpha-2 country code and zone name | ||
type: object | ||
required: | ||
- cca2 | ||
- name | ||
- offset | ||
properties: | ||
cca2: | ||
description: ISO 3166 alpha-2 country code | ||
type: string | ||
pattern: '[A-Z]{2}' | ||
name: | ||
description: zone name | ||
type: string | ||
offset: | ||
description: zone offset (format should be "+0800", etc) | ||
type: string | ||
|
||
TimezoneIso3166: | ||
description: ISO 3166 alpha-2 country code and country name | ||
type: object | ||
required: | ||
- cca2 | ||
- name | ||
properties: | ||
cca2: | ||
description: ISO 3166 alpha-2 country code | ||
type: string | ||
pattern: '[A-Z]{2}' | ||
name: | ||
description: The usual English name for the coded region | ||
type: string | ||
|
||
externalDocs: | ||
url: '#' | ||
x-mocks: | ||
TimeExample: | ||
{ | ||
"time": "2015-03-26T16:27:48.611441Z", | ||
"timezone": "Asia/Taipei", | ||
"ntp": { | ||
"enable": true, | ||
"server": "pool.ntp.org", | ||
"interval": 86400 | ||
} | ||
} | ||
NTPExample: | ||
{ | ||
"enable": false, | ||
"server": "pool.ntp.org", | ||
"interval": 86400 | ||
} | ||
TimezoneInfoExample: | ||
{ | ||
"zone": [ | ||
{ | ||
"cca2": "AD", | ||
"name": "Europe/Andorra", | ||
"offset": "+0100" | ||
}, | ||
{ | ||
"cca2": "AE", | ||
"name": "Asia/Dubai", | ||
"offset": "+0400" | ||
}, | ||
{ | ||
"cca2": "AF", | ||
"name": "Asia/Kabul", | ||
"offset": "+0430" | ||
} | ||
], | ||
"iso3166": [ | ||
{ | ||
"cca2": "AD", | ||
"name": "Andorra" | ||
}, | ||
{ | ||
"cca2": "AE", | ||
"name": "United Arab Emirates" | ||
}, | ||
{ | ||
"cca2": "AF", | ||
"name": "Afghanistan" | ||
} | ||
] | ||
} |
Oops, something went wrong.