Skip to content

Commit

Permalink
Release merge (#479)
Browse files Browse the repository at this point in the history
* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Update package.json

* Update package.json

* remove automated release

* bug(fix) strace feature bug (EWC-421)

* bug(fix) fixed deprecation warnings (EWC-422) (#438)

* bug(fix) CLI diagnostics ftp: invalid microservice uuid

* bug(fix) CLI diagnostics ftp: invalid microservice id (update) (#440)

* bug(fix) CLI diagnostics ftp: invalid microservice id (update)

* bug(fix): update id to uuid

* bug(fix) iofog agent API: core network containers are returned when flow isn't active (EWC-424)

* test(core) unit tests progress for agent & access-token services (EWC-383) (#442)

* feat(npm-scripts): npm scripts improvements (EWC-358 EWC-430)

1. save configs during releases
2. migrate to new encryption algorithm

* bug(fix): microservices are shown after deleting user, new error message



* bug(fix): microservices are shown after deleting user, new error message (up test)

* bug(fix): microservices are shown after deleting user, new error message (up test2)

* feat(microservice): update change tracking on delete port mapping (#445)

Closes EWC-441

* version 1.0.31

* 1.0.31 Release

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release (#434)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Release (#435)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Update package.json

* Merge (#436)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release 1.1.0 [skip ci]

* Update package.json

* Release 1.1.0 [skip ci]

* Update package.json

* remove automated release

* bug(fix) strace feature bug (EWC-421)

* bug(fix) fixed deprecation warnings (EWC-422) (#438)

* bug(fix) CLI diagnostics ftp: invalid microservice uuid

* bug(fix) CLI diagnostics ftp: invalid microservice id (update) (#440)

* bug(fix) CLI diagnostics ftp: invalid microservice id (update)

* bug(fix): update id to uuid

* bug(fix) iofog agent API: core network containers are returned when flow isn't active (EWC-424)

* test(core) unit tests progress for agent & access-token services (EWC-383) (#442)

* feat(npm-scripts): npm scripts improvements (EWC-358 EWC-430)

1. save configs during releases
2. migrate to new encryption algorithm

* bug(fix): microservices are shown after deleting user, new error message



* bug(fix): microservices are shown after deleting user, new error message (up test)

* bug(fix): microservices are shown after deleting user, new error message (up test2)

* feat(microservice): update change tracking on delete port mapping (#445)

Closes EWC-441

* version 1.0.31

* 1.0.31 Release (#448)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release (#434)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Release (#435)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Update package.json

* Merge (#436)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release 1.1.0 [skip ci]

* Update package.json

* Release 1.1.0 [skip ci]

* Update package.json

* remove automated release

* bug(fix) strace feature bug (EWC-421)

* bug(fix) fixed deprecation warnings (EWC-422) (#438)

* bug(fix) CLI diagnostics ftp: invalid microservice uuid

* bug(fix) CLI diagnostics ftp: invalid microservice id (update) (#440)

* bug(fix) CLI diagnostics ftp: invalid microservice id (update)

* bug(fix): update id to uuid

* bug(fix) iofog agent API: core network containers are returned when flow isn't active (EWC-424)

* test(core) unit tests progress for agent & access-token services (EWC-383) (#442)

* feat(npm-scripts): npm scripts improvements (EWC-358 EWC-430)

1. save configs during releases
2. migrate to new encryption algorithm

* bug(fix): microservices are shown after deleting user, new error message



* bug(fix): microservices are shown after deleting user, new error message (up test)

* bug(fix): microservices are shown after deleting user, new error message (up test2)

* feat(microservice): update change tracking on delete port mapping (#445)

Closes EWC-441

* version 1.0.31

* Release merge (#449)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release (#434)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Release (#435)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Update package.json

* Merge (#436)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release 1.1.0 [skip ci]

* Update package.json

* Release 1.1.0 [skip ci]

* Update package.json

* remove automated release

* bug(fix) strace feature bug (EWC-421)

* bug(fix) fixed deprecation warnings (EWC-422) (#438)

* bug(fix) CLI diagnostics ftp: invalid microservice uuid

* bug(fix) CLI diagnostics ftp: invalid microservice id (update) (#440)

* bug(fix) CLI diagnostics ftp: invalid microservice id (update)

* bug(fix): update id to uuid

* bug(fix) iofog agent API: core network containers are returned when flow isn't active (EWC-424)

* test(core) unit tests progress for agent & access-token services (EWC-383) (#442)

* feat(npm-scripts): npm scripts improvements (EWC-358 EWC-430)

1. save configs during releases
2. migrate to new encryption algorithm

* bug(fix): microservices are shown after deleting user, new error message



* bug(fix): microservices are shown after deleting user, new error message (up test)

* bug(fix): microservices are shown after deleting user, new error message (up test2)

* feat(microservice): update change tracking on delete port mapping (#445)

Closes EWC-441

* version 1.0.31

* 1.0.31 Release (#448)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release (#434)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Release (#435)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

* Release 1.1.0 [skip ci]

* Update package.json

* Update CHANGELOG.md

* Update package.json

* Merge (#436)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release 1.1.0 [skip ci]

* Update package.json

* Release 1.1.0 [skip ci]

* Update package.json

* remove automated release

* bug(fix) strace feature bug (EWC-421)

* bug(fix) fixed deprecation warnings (EWC-422) (#438)

* bug(fix) CLI diagnostics ftp: invalid microservice uuid

* bug(fix) CLI diagnostics ftp: invalid microservice id (update) (#440)

* bug(fix) CLI diagnostics ftp: invalid microservice id (update)

* bug(fix): update id to uuid

* bug(fix) iofog agent API: core network containers are returned when flow isn't active (EWC-424)

* test(core) unit tests progress for agent & access-token services (EWC-383) (#442)

* feat(npm-scripts): npm scripts improvements (EWC-358 EWC-430)

1. save configs during releases
2. migrate to new encryption algorithm

* bug(fix): microservices are shown after deleting user, new error message



* bug(fix): microservices are shown after deleting user, new error message (up test)

* bug(fix): microservices are shown after deleting user, new error message (up test2)

* feat(microservice): update change tracking on delete port mapping (#445)

Closes EWC-441

* version 1.0.31

* Epankou/bug network containers not removed ewc 424 (#450)

* EWC-418 added registry email validation

* EWC-421 strace feature bug

* EWC-421 strace feature bug fix

* bug(fix) iofog agent API: core network containers are returned when flow isn't active (EWC-424)

* bug(fix) microservice removal: port mapping removal (EWC-424)

* bug(fix) microservice removal: switched to const (EWC-424)

* test(core) unit tests for agent service progress (EWC-383) (#452)

* fix(cli): fix bug with generating access token for user in cli (#453)

Closes EWC-443

* fix(cli): fix bug with generating access token for user in cli (EWC-453)

* test(core) unit tests for agent-service (EWC-383) (#455)

* bug(fix) fixed deprecated warning about Buffer constructor (EWC-422)

* test(core) unit tests for catalog service (EWC-383) (#458)

* Maksimchepelev/bugs (#457)

* fix(cli): fix validation on delete connector

Closes EWC-447

* fix(cli): fix data types and descriptions in help

'... settings JSON file' -> 'Path to ... settings JSON file'
flowId and
catalogId type 'string' -> 'number' in help

Closes EWC-445 EWC-446

* Maksimchepelev/bugs (#459)

* fix(iofog): add validation for version command

compare version command with isReadyToUpgrade and isReadyToRollback
fields

Closes EWC-448

* fix(code): fix logger is not defined error in app-helper

Closes EWC-397

* test(core) unit tests for change-tracking service (EWC-383) (#460)

* version 1.0.32 (#461)

* Release 1.0.32 (#462)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Update package.json

* remove automated release

* bug(fix) strace feature bug (EWC-421)

* bug(fix) fixed deprecation warnings (EWC-422) (#438)

* bug(fix) CLI diagnostics ftp: invalid microservice uuid

* bug(fix) CLI diagnostics ftp: invalid microservice id (update) (#440)

* bug(fix) CLI diagnostics ftp: invalid microservice id (update)

* bug(fix): update id to uuid

* bug(fix) iofog agent API: core network containers are returned when flow isn't active (EWC-424)

* test(core) unit tests progress for agent & access-token services (EWC-383) (#442)

* feat(npm-scripts): npm scripts improvements (EWC-358 EWC-430)

1. save configs during releases
2. migrate to new encryption algorithm

* bug(fix): microservices are shown after deleting user, new error message



* bug(fix): microservices are shown after deleting user, new error message (up test)

* bug(fix): microservices are shown after deleting user, new error message (up test2)

* feat(microservice): update change tracking on delete port mapping (#445)

Closes EWC-441

* version 1.0.31

* 1.0.31 Release (#448)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* test(core) unit tests for catalog, controller and agent controllers (EWC-382) (#430)

* bug(fix) CLI diagnostics ftp: Incorrect error message is displayed when user try to get strace-info (EWC-431)

* Release (#434)

* release merge (#433)

* Release 1.0.28

* EWC-379 migrations between versions (#410)

* Maksimchepelev/bugs (#411)

* EWC-385 cli helps' outputs

* EWC-395 cli `microservice port-mapping-remove` error message fix

* EWC-389 cli `diagnostics strace-update` correct parsing of boolean

* EWC-390 cli `diagnostics strace-...` correct validation error messages

* EWC-392 cli `diagnostics strace-info` microservice validation

* EWC-394 sequelize (deprecated)find -> findOne

* EWC-388 validation of flowId in delete flow service

* EWC-393 validation of microserviceUuid in image snapshot services

* Maksimchepelev/bugs (#412)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* Maksimchepelev/bugs (#417)

* fix(code): delete routes on microservice deletion

Closes EWC-362

* update version 1.0.27 (#418)

* Merge versions (#420)

* release 1.0.27 version (#419)

* feat(core): add migration between versions (EWC-379)

* feat(core): add cli help output (EWC-385)

* fix(bug): fix cli `microservice port-mapping-remove` error message (EWC-395)

* fix(bug): fix cli `diagnostics strace-update` parsing of boolean (EWC-389)

* fix(bug): fix cli `diagnostics strace-...` validation error messages (EWC-390)

* feat(core): add cli `diagnostics strace-info` microservice validation (EWC-392)

* refactor(core): replace sequelize (deprecated)find -> findOne (EWC-394)

* refactor(core): edit validation of flowId in delete flow service (EWC-388)

* feat(core): add validation of microserviceUuid in image snapshot services (EWC-393)

* fix(help): Fix rsa-key description in cli tunnel help

need to update description for parameter -k, --rsa-key in help for tunnel from 'Tunnel RSA key' to 'Path to tunnel RSA key'

Closes EWC-396

* fix(tunnel): if port range not provided in config use default values

default range: 2000-10000

Closes EWC-397

* fix(tests): rename logLimit -> logSize (#416)

create microservice request in Postman Collection diagnostics block

Closes EWC-401

* feat(npm-scripts): allow to use only one image on catalog item creation (#415)

Closes EWC-399

* fix(transactions): fix transaction validation if last method's arg is undefined (#414)

Closes EWC-400

* feat(npm-scripts): init db automatically after installation (#413)

Closes EWC-368

* fix(code): delete routes on microservice deletion

Closes EWC-362

* Update CHANGELOG.md

* Release of version 1.0.27

* test(core) unit tests for user-controller (EWC-382)

* docs(core) Remove swagger.yml, remove CLI docs in README, add PULL_REQUEST_TEMPLATE.md (#422)

* remove swagger.yml - its content moved to https://github.com/ioFog/iofog.org/blob/master/content/docs/1.0.0/controllers/rest-api.md

* Add PULL_REQUEST_TEMPLATE.md

* remove docs from README, instead use https://iofog.org/

* Maksimchepelev/bugs (#421)

* fix(cli): user can't update deviceScanFrequency via cli

deviceScanFrequency -> deviceFrequency in build cli data object

Closes EWC-350

* fix(catalog): forbid to create system microservices

Closes EWC-409

* fix(cli): forbid to delete connector when it used

Closes EWC-364

* fix(connector): add certificates on close port request

Closes EWC-411 EWC-406

* fix(cli): fix messages on incorrect requests

Closes EWC-403

* fix(catalog): add validation in catalog service

registryId validation
empty update object validation

Closes EWC-417

* changed connector error message variable

* test(core) unit tests for microservices & registry controllers (EWC-382) (#423)

* add build stage for release branch

* Pre-release 1.0.28 (#429)

* fix(bug) fixed system microservices (HAL, bluetooth) launch (EWC-413) (#424)

* fix(bug) added registry email validation (EWC-418)

* test(core) unit tests for iofog-controller (EWC-382) (#426)

* test(core) unit tests for flow & diagnostics controllers, updated postman collection & refactored diagnostics (EWC-382) (#427)

* bug(fix) CLI diagnostics: Incorrect error message is displayed when user try to get strace-info (#428)

* Release 1.0.28 [skip ci]

*…
  • Loading branch information
Railag authored Jan 4, 2019
1 parent 36a65cd commit 0056201
Show file tree
Hide file tree
Showing 30 changed files with 6,980 additions and 809 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iofogcontroller",
"version": "1.0.32",
"version": "1.0.33",
"description": "ioFog Controller project for Eclipse IoFog @ iofog.org \\nCopyright (c) 2018 Edgeworx, Inc.",
"main": "./src/main.js",
"author": "Saeid Baghbidi",
Expand Down
16 changes: 11 additions & 5 deletions src/cli/iofog.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ async function _deleteFog(obj, user) {
}

async function _getFogList(obj, user) {
const emptyFilters = []
const emptyFilters = [];
const list = await FogService.getFogList(emptyFilters, user, true);
logger.info(JSON.stringify(list, null, 2));
logger.info('Fog list has been gotten successfully.');
Expand Down Expand Up @@ -359,8 +359,11 @@ async function _getHalHardwareInfo(obj) {

logger.info("Parameters" + JSON.stringify(uuidObj));

const info = await FogService.getHalHardwareInfo(uuidObj, {}, true);
logger.info(JSON.stringify(info, null, 2));
const data = await FogService.getHalHardwareInfo(uuidObj, {}, true);
if (data.info) {
data.info = JSON.parse(data.info);
}
logger.info(JSON.stringify(data, null, 2));
logger.info('Hardware info has been retrieved successfully.')
}

Expand All @@ -371,8 +374,11 @@ async function _getHalUsbInfo(obj) {

logger.info("Parameters" + JSON.stringify(uuidObj));

const info = await FogService.getHalHardwareInfo(uuidObj, {}, true);
logger.info(JSON.stringify(info, null, 2));
const data = await FogService.getHalUsbInfo(uuidObj, {}, true);
if (data.info) {
data.info = JSON.parse(data.info);
}
logger.info(JSON.stringify(data, null, 2));
logger.info('Usb info has been retrieved successfully.')
}

Expand Down
2 changes: 1 addition & 1 deletion src/cli/microservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ const _createMicroservice = async function (obj, user) {

logger.info(JSON.stringify(microservice));

const result = await MicroserviceService.createMicroserviceOnFog(microservice, user, true);
const result = await MicroserviceService.createMicroservice(microservice, user, true);
logger.info(JSON.stringify(result));
logger.info('Microservice has been created successfully.');
};
Expand Down
3 changes: 1 addition & 2 deletions src/config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@
"Diagnostics": {
"DiagnosticDir": "diagnostic"
}
}

}
2 changes: 1 addition & 1 deletion src/controllers/microservices-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const createMicroserviceOnFogEndPoint = async function (req, user) {

logger.info("Parameters:" + JSON.stringify(microservice));

return await MicroservicesService.createMicroserviceOnFog(microservice, user, false)
return await MicroservicesService.createMicroservice(microservice, user, false)
};

const getMicroserviceEndPoint = async function (req, user) {
Expand Down
21 changes: 7 additions & 14 deletions src/helpers/app-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,7 @@ const findAvailablePort = async function (hostname) {
}
let portBounds = portRange.split("-").map(i => parseInt(i));
return await portscanner.findAPortNotInUse(portBounds[0], portBounds[1], hostname);
}

/**
* @desc generates a random String of the size specified by the input param
* @param Integer - size
* @return String - returns random string
*/
};

function isFileExists(filePath) {
if (path.extname(filePath).indexOf(".") >= 0) {
Expand All @@ -109,7 +103,7 @@ function isValidDomain(domain) {
}

const isValidPublicIP = function (publicIP) {
let re = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
const re = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
return re.test(publicIP);
};

Expand Down Expand Up @@ -142,7 +136,7 @@ function deleteUndefinedFields(obj) {
} else if (obj[fld] instanceof Object) {
obj[fld] = deleteUndefinedFields(obj[fld])
}
})
});

return obj
}
Expand Down Expand Up @@ -191,11 +185,11 @@ function trimCertificate(cert) {
function validateParameters(command, commandDefinitions, args) {
// 1st argument = command
args.shift();

const possibleAliasesList = _getPossibleAliasesList(command, commandDefinitions);
const possibleArgsList = _getPossibleArgsList(command, commandDefinitions);

for (let arg of args) {
for (const arg of args) {
// arg is [argument, alias, value]

if (arg.startsWith("--")) { // argument
Expand Down Expand Up @@ -272,14 +266,13 @@ function isTest() {
}

function isEmpty(obj) {
for(let key in obj) {
if(obj.hasOwnProperty(key))
for (const key in obj) {
if (obj.hasOwnProperty(key))
return false;
}
return true;
}


module.exports = {
encryptText,
decryptText,
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/error-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ module.exports = {
INVALID_ROUTE: 'Route parsing error. Please provide valid route.'
},
CONNECTOR_IS_IN_USE: 'You can\'t delete connector, because it is used for routing now.',
INVALID_VERSION_COMMAND: 'Can\'t {} version now.'
INVALID_VERSION_COMMAND_UPGRADE: 'Can\'t upgrade version now. Latest is already installed',
INVALID_VERSION_COMMAND_ROLLBACK: 'Can\'t rollback version now. There are no backups on agent'
};
18 changes: 17 additions & 1 deletion src/sequelize/managers/microservice-public-mode-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,28 @@

const BaseManager = require('../managers/base-manager')
const models = require('./../models');
const MicroservicePublicMode = models.MicroservicePublicMode
const MicroservicePublicMode = models.MicroservicePublicMode;
const ConnectorPort = models.ConnectorPort;

class MicroservicePublicModeManager extends BaseManager {
getEntity() {
return MicroservicePublicMode
}

findAllMicroservicePublicModesByConnectorId(connectorId, transaction) {
return MicroservicePublicMode.findAll({
include: [
{
model: ConnectorPort,
as: 'connectorPort',
required: true
}
],
where: {
'$connectorPort.connector_id$': connectorId
}
}, {transaction: transaction})
}
}

const instance = new MicroservicePublicModeManager()
Expand Down
16 changes: 16 additions & 0 deletions src/sequelize/managers/routing-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,27 @@
const BaseManager = require('./base-manager');
const models = require('./../models');
const Routing = models.Routing;
const ConnectorPort = models.ConnectorPort;

class RoutingManager extends BaseManager {
getEntity() {
return Routing;
}

findAllRoutesByConnectorId(connectorId, transaction) {
return Routing.findAll({
include: [
{
model: ConnectorPort,
as: 'connectorPort',
required: true
}
],
where: {
'$connectorPort.connector_id$': connectorId
}
}, {transaction: transaction})
}
}

const instance = new RoutingManager();
Expand Down
153 changes: 153 additions & 0 deletions src/services/connector-port-service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
/*
* *******************************************************************************
* * Copyright (c) 2018 Edgeworx, Inc.
* *
* * This program and the accompanying materials are made available under the
* * terms of the Eclipse Public License v. 2.0 which is available at
* * http://www.eclipse.org/legal/epl-2.0
* *
* * SPDX-License-Identifier: EPL-2.0
* *******************************************************************************
*
*/

const ConnectorManager = require('../sequelize/managers/connector-manager');
const https = require('https');
const http = require('http');
const constants = require('../helpers/constants');
const logger = require('../logger');
const qs = require('qs');
const fs = require('fs');

async function openPortOnRandomConnector(isPublicAccess, transaction) {
let isConnectorPortOpen = false;
let ports = null;
let connector = null;
const maxAttempts = 5;
for (let i = 0; i < maxAttempts; i++) {
try {
connector = await _getRandomConnector(transaction);
ports = await _openPortsOnConnector(connector, isPublicAccess);
if (ports) {
isConnectorPortOpen = true;
break;
}
} catch (e) {
logger.warn(`Failed to open ports on Connector. Attempts ${i + 1}/${maxAttempts}`)
}
}
if (!isConnectorPortOpen) {
throw new Error('Not able to open port on remote Connector. Gave up after 5 attempts.')
}
ports.connectorId = connector.id;
return {ports: ports, connector: connector}
}

async function _openPortsOnConnector(connector, isPublicAccess) {
let data = isPublicAccess
? await qs.stringify({
mapping: '{"type":"public","maxconnections":60,"heartbeatabsencethreshold":200000}'
})
: await qs.stringify({
mapping: '{"type":"private","maxconnectionsport1":1, "maxconnectionsport2":1, ' +
'"heartbeatabsencethresholdport1":200000, "heartbeatabsencethresholdport2":200000}'
});

let port = connector.devMode ? constants.CONNECTOR_HTTP_PORT : constants.CONNECTOR_HTTPS_PORT;

let options = {
host: connector.domain,
port: port,
path: '/api/v2/mapping/add',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(data)
}
};
if (!connector.devMode && connector.cert && connector.isSelfSignedCert === true) {
const ca = fs.readFileSync(connector.cert);
options.ca = new Buffer.from(ca);
}

const ports = await _makeRequest(connector, options, data);
return ports
}

async function _getRandomConnector(transaction) {
const connectors = await ConnectorManager.findAll({}, transaction);

if (connectors && connectors.length > 0) {
const randomNumber = Math.round((Math.random() * (connectors.length - 1)));
return connectors[randomNumber]
} else {
throw new Error('no connectors defined')
}
}

async function closePortOnConnector(connector, ports) {
let data = qs.stringify({
mappingid: ports.mappingId
});
console.log(data);

let port = connector.devMode ? constants.CONNECTOR_HTTP_PORT : constants.CONNECTOR_HTTPS_PORT;

let options = {
host: connector.domain,
port: port,
path: '/api/v2/mapping/remove',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(data)
}
};
if (!connector.devMode && connector.cert && connector.isSelfSignedCert === true) {
const ca = fs.readFileSync(connector.cert);
options.ca = new Buffer.from(ca);
}


await _makeRequest(connector, options, data)
}

async function _makeRequest(connector, options, data) {
return new Promise((resolve, reject) => {
let httpreq = (connector.devMode ? http : https).request(options, function (response) {
console.log(response.statusCode);
let output = '';
response.setEncoding('utf8');

response.on('data', function (chunk) {
output += chunk;
});

response.on('end', function () {
let responseObj = JSON.parse(output);
console.log(responseObj);
if (responseObj.errormessage) {
return reject(new Error(responseObj.errormessage));
} else {
return resolve(responseObj);
}
});
});

httpreq.on('error', function (err) {
console.log(err);
if (err instanceof Error)
return reject(new Error(err.message));
else
return reject(new Error(JSON.stringify(err)));
});

httpreq.write(data);
httpreq.end();
})
}

module.exports = {
openPortOnRandomConnector: openPortOnRandomConnector,
closePortOnConnector: closePortOnConnector
};
Loading

0 comments on commit 0056201

Please sign in to comment.