Skip to content

Commit

Permalink
Develop merging to v5.4.1 (#1160)
Browse files Browse the repository at this point in the history
* removing some sample/test data

* adjust dev docu

* adding some audit logging

* prevent audit_user pwd setting in upgrade mode
to avoid upgrade error when audit_user is not defined yet
closes #918

* typo

* fixing bug with long / int change
closes #1100

* redesign add user first steps (#1115)

* redesign add user first steps

* user setting fixes + help window size

* doc changes

* docker proxy cleanup

* doku

* handler

* handler

* hjandler

* Add user with groups and roles + fixes (#1118)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* add test-install workflow for develop branch

* api help pages start

* text review

* some changes for fortinet vdom settings

* some improvements group/role/user handling (#1122)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* some improvements group/role/user handling

* handlers final

* directory copy bug

* minor fixes, webhook develop

* minor fixes, webhook develop (#1126)

* typo

* syncronize for fast copy

* formating

* handler backup

* delegate to middleware servers

* server syntax

* api handler

* importer handler

* database handler

* ui handler

* lib handler

* remove dir in case of upgrade

* error message for upgrade handler

* error msg conditional

* adding get rules API query

* Develop adding get rules API query to help page (#1129)

* minor fixes, webhook develop

* adding get rules API query

* api v2 upgrade v1

* upgrade v2

* removing yaml

* removing api dir again

* adding dbname for force option

* metadata ok

* importing metadata via new api

* fixes

* more fixes

* working install

but issues with null queries:

expected a list, but found null

* HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE true

* cleanup & documentation

* minor doc fix

* revert metadata version from 3 to 2

* Develop migrating to hasura 2.0 (#1131)

- updating graphql from 1.3.1 to 2.03
- now importing metadata via new metadata api
- setting HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE true

* reading pwd from file

* fixes

* changing name of secret file

* Develop moving CPR8x import user password to file (#1135)

* minor fixes, webhook develop

* adding get rules API query

* Develop weekly merge to main - minor enhancements (#1130)

* removing some sample/test data

* adjust dev docu

* adding some audit logging

* prevent audit_user pwd setting in upgrade mode
to avoid upgrade error when audit_user is not defined yet
closes #918

* typo

* fixing bug with long / int change
closes #1100

* redesign add user first steps (#1115)

* redesign add user first steps

* user setting fixes + help window size

* doc changes

* docker proxy cleanup

* doku

* handler

* handler

* hjandler

* Add user with groups and roles + fixes (#1118)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* add test-install workflow for develop branch

* api help pages start

* text review

* some changes for fortinet vdom settings

* some improvements group/role/user handling (#1122)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* some improvements group/role/user handling

* handlers final

* directory copy bug

* minor fixes, webhook develop (#1126)

* typo

* syncronize for fast copy

* formating

* handler backup

* delegate to middleware servers

* server syntax

* api handler

* importer handler

* database handler

* ui handler

* lib handler

* remove dir in case of upgrade

* error message for upgrade handler

* error msg conditional

* Develop adding get rules API query to help page (#1129)

* minor fixes, webhook develop

* adding get rules API query

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>

* api v2 upgrade v1

* upgrade v2

* removing yaml

* removing api dir again

* adding dbname for force option

* metadata ok

* importing metadata via new api

* fixes

* more fixes

* working install

but issues with null queries:

expected a list, but found null

* HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE true

* cleanup & documentation

* minor doc fix

* revert metadata version from 3 to 2

* reading pwd from file

* fixes

* changing name of secret file

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>

* generating ui_admin pwd only once
do not re-generate admin pwd during upgrades
closes UI installer do not set admin password during upgrade
closes #1133

* move importer to end

* backup of importer changes

* import-test debug

* typo

* more imorter testing

* comments

* Db testing first database unit tests (#1139)

* minor fixes, webhook develop

* adding get rules API query

* Develop weekly merge to main - minor enhancements (#1130)

* removing some sample/test data

* adjust dev docu

* adding some audit logging

* prevent audit_user pwd setting in upgrade mode
to avoid upgrade error when audit_user is not defined yet
closes #918

* typo

* fixing bug with long / int change
closes #1100

* redesign add user first steps (#1115)

* redesign add user first steps

* user setting fixes + help window size

* doc changes

* docker proxy cleanup

* doku

* handler

* handler

* hjandler

* Add user with groups and roles + fixes (#1118)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* add test-install workflow for develop branch

* api help pages start

* text review

* some changes for fortinet vdom settings

* some improvements group/role/user handling (#1122)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* some improvements group/role/user handling

* handlers final

* directory copy bug

* minor fixes, webhook develop (#1126)

* typo

* syncronize for fast copy

* formating

* handler backup

* delegate to middleware servers

* server syntax

* api handler

* importer handler

* database handler

* ui handler

* lib handler

* remove dir in case of upgrade

* error message for upgrade handler

* error msg conditional

* Develop adding get rules API query to help page (#1129)

* minor fixes, webhook develop

* adding get rules API query

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>

* api v2 upgrade v1

* upgrade v2

* removing yaml

* removing api dir again

* adding dbname for force option

* metadata ok

* importing metadata via new api

* fixes

* more fixes

* working install

but issues with null queries:

expected a list, but found null

* HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE true

* cleanup & documentation

* minor doc fix

* revert metadata version from 3 to 2

* start db-testing

* fix

* more unit testing

* f

* .

* .

* reading pwd from file

* fixes

* changing name of secret file

* generating ui_admin pwd only once
do not re-generate admin pwd during upgrades
closes UI installer do not set admin password during upgrade
closes #1133

* unittest db

* fix

* fix

* fix

* .

* .

* .

* unit testing cont.

* .

* .

* .

* final fixes

* adding working hasura unit test

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>

* permissions

* remove debug

* use sample-data role for test role

* starting api business palo & forti

* test import debug

* no extra file copying

* v9.1 with working apps

* remove test data

* test import

* typo

* permissions

* syntax

* ansible 2.10 support for postgresql_query
needed for debian 11

* Develop debian 11 preps and fortiManager start (#1145)

* minor fixes, webhook develop

* adding get rules API query

* Develop weekly merge to main - minor enhancements (#1130)

* removing some sample/test data

* adjust dev docu

* adding some audit logging

* prevent audit_user pwd setting in upgrade mode
to avoid upgrade error when audit_user is not defined yet
closes #918

* typo

* fixing bug with long / int change
closes #1100

* redesign add user first steps (#1115)

* redesign add user first steps

* user setting fixes + help window size

* doc changes

* docker proxy cleanup

* doku

* handler

* handler

* hjandler

* Add user with groups and roles + fixes (#1118)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* add test-install workflow for develop branch

* api help pages start

* text review

* some changes for fortinet vdom settings

* some improvements group/role/user handling (#1122)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* some improvements group/role/user handling

* handlers final

* directory copy bug

* minor fixes, webhook develop (#1126)

* typo

* syncronize for fast copy

* formating

* handler backup

* delegate to middleware servers

* server syntax

* api handler

* importer handler

* database handler

* ui handler

* lib handler

* remove dir in case of upgrade

* error message for upgrade handler

* error msg conditional

* Develop adding get rules API query to help page (#1129)

* minor fixes, webhook develop

* adding get rules API query

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>

* api v2 upgrade v1

* upgrade v2

* removing yaml

* removing api dir again

* adding dbname for force option

* metadata ok

* importing metadata via new api

* fixes

* more fixes

* working install

but issues with null queries:

expected a list, but found null

* HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE true

* cleanup & documentation

* minor doc fix

* revert metadata version from 3 to 2

* reading pwd from file

* fixes

* changing name of secret file

* generating ui_admin pwd only once
do not re-generate admin pwd during upgrades
closes UI installer do not set admin password during upgrade
closes #1133

* starting api business palo & forti

* v9.1 with working apps

* ansible 2.10 support for postgresql_query
needed for debian 11

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>

* debug output fixes

* updating to hasura 2.0.7

* fix typo on German start page

* fortiManager cont.

* adding csv escaping of "
also starting common python module for all importers

* get basics ok

* starting 5.4.1 api importer

* fix importer ldap entry

* fixing metadata for importer role

* ldap and common
-  splitting common module
- removing old ldap stuff from importer

* last tuning for import test

* adding upgrade 5.4.1 code

* ansible cfg change to allow tmpfiles for unpriveledeged users

* fixing cpcommon

* removing  " instead of escaping

* debug

* config path

* cleanup

* fix svc negate

* fix range

* cont. python parsing

* deleting dpulicated files fortimanager

* ansible.cfg piplineing

* Test Importer (#1140)

* move importer to end

* backup of importer changes

* import-test debug

* typo

* more imorter testing

* comments

* permissions

* remove debug

* use sample-data role for test role

* test import debug

* no extra file copying

* remove test data

* test import

* typo

* permissions

* syntax

* last tuning for import test

* ansible cfg change to allow tmpfiles for unpriveledeged users

* debug

* config path

* cleanup

* ansible.cfg piplineing

* fixing version number

* 5.4.1 cont.

* upgrade role importer

* services & users working

* working without rules

* before adding rule import

* fixed typo

* .

* rules working
but no changes found

* import working api2api

* fixing unlock issue

* final touches

* v5.4.1 - Develop importer python & api version plus various others (#1150)

* minor fixes, webhook develop

* adding get rules API query

* Develop weekly merge to main - minor enhancements (#1130)

* removing some sample/test data

* adjust dev docu

* adding some audit logging

* prevent audit_user pwd setting in upgrade mode
to avoid upgrade error when audit_user is not defined yet
closes #918

* typo

* fixing bug with long / int change
closes #1100

* redesign add user first steps (#1115)

* redesign add user first steps

* user setting fixes + help window size

* doc changes

* docker proxy cleanup

* doku

* handler

* handler

* hjandler

* Add user with groups and roles + fixes (#1118)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* add test-install workflow for develop branch

* api help pages start

* text review

* some changes for fortinet vdom settings

* some improvements group/role/user handling (#1122)

* redesign add user first steps

* user setting fixes + help window size

* small improvements request handlers

* add role with user creation + small fixes

* assign group with user creation

* some improvements group/role/user handling

* handlers final

* directory copy bug

* minor fixes, webhook develop (#1126)

* typo

* syncronize for fast copy

* formating

* handler backup

* delegate to middleware servers

* server syntax

* api handler

* importer handler

* database handler

* ui handler

* lib handler

* remove dir in case of upgrade

* error message for upgrade handler

* error msg conditional

* Develop adding get rules API query to help page (#1129)

* minor fixes, webhook develop

* adding get rules API query

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>

* api v2 upgrade v1

* upgrade v2

* removing yaml

* removing api dir again

* adding dbname for force option

* metadata ok

* importing metadata via new api

* fixes

* more fixes

* working install

but issues with null queries:

expected a list, but found null

* HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE true

* cleanup & documentation

* minor doc fix

* revert metadata version from 3 to 2

* reading pwd from file

* fixes

* changing name of secret file

* Develop (#1136)

* generating ui_admin pwd only once
do not re-generate admin pwd during upgrades
closes UI installer do not set admin password during upgrade
closes #1133

* starting api business palo & forti

* v9.1 with working apps

* Bump Microsoft.NET.Test.Sdk from 16.10.0 to 16.11.0 in /roles (#1143)

Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.10.0 to 16.11.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](microsoft/vstest@v16.10.0...v16.11.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump System.IdentityModel.Tokens.Jwt from 6.12.0 to 6.12.1 in /roles (#1142)

Bumps [System.IdentityModel.Tokens.Jwt](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) from 6.12.0 to 6.12.1.
- [Release notes](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases)
- [Changelog](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/commits)

---
updated-dependencies:
- dependency-name: System.IdentityModel.Tokens.Jwt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump BlazorTable from 1.15.0 to 1.16.0 in /roles (#1144)

Bumps [BlazorTable](https://github.com/IvanJosipovic/BlazorTable) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/IvanJosipovic/BlazorTable/releases)
- [Changelog](https://github.com/IvanJosipovic/BlazorTable/blob/master/.releaserc)
- [Commits](IvanJosipovic/BlazorTable@v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: BlazorTable
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ansible 2.10 support for postgresql_query
needed for debian 11

* Bump System.IdentityModel.Tokens.Jwt from 6.12.1 to 6.12.2 in /roles (#1146)

Bumps [System.IdentityModel.Tokens.Jwt](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) from 6.12.1 to 6.12.2.
- [Release notes](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases)
- [Changelog](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/CHANGELOG.md)
- [Commits](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet@6.12.1...6.12.2)

---
updated-dependencies:
- dependency-name: System.IdentityModel.Tokens.Jwt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* debug output fixes

* updating to hasura 2.0.7

* fix typo on German start page

* fortiManager cont.

* adding csv escaping of "
also starting common python module for all importers

* get basics ok

* starting 5.4.1 api importer

* fix importer ldap entry

* Bump BlazorTable from 1.16.0 to 1.17.0 in /roles (#1147)

Bumps [BlazorTable](https://github.com/IvanJosipovic/BlazorTable) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/IvanJosipovic/BlazorTable/releases)
- [Changelog](https://github.com/IvanJosipovic/BlazorTable/blob/master/.releaserc)
- [Commits](IvanJosipovic/BlazorTable@v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: BlazorTable
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fixing metadata for importer role

* ldap and common
-  splitting common module
- removing old ldap stuff from importer

* adding upgrade 5.4.1 code

* fixing cpcommon

* removing  " instead of escaping

* fix svc negate

* fix range

* cont. python parsing

* deleting dpulicated files fortimanager

* fixing version number

* 5.4.1 cont.

* upgrade role importer

* services & users working

* working without rules

* before adding rule import

* fixed typo

* .

* rules working
but no changes found

* import working api2api

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fixing merge conflicts (#1158)

Co-authored-by: abarz722 <[email protected]>
Co-authored-by: Valentin Hofmaier <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 10, 2021
1 parent 75c4bec commit 036d762
Show file tree
Hide file tree
Showing 89 changed files with 3,922 additions and 837 deletions.
60 changes: 0 additions & 60 deletions .vscode/launch-csharp.json

This file was deleted.

66 changes: 0 additions & 66 deletions .vscode/launch-python-compat.json

This file was deleted.

108 changes: 94 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,101 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
"version": "0.2.0",
"configurations": [
{
"name": ".NET FWO Test",
"name": "py-cpr8x-get-config",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
},
"args": [
"-asting-mgmt",
"-uitsecorg",
"-w/home/tim/tmp/passwd",
"-lFirstLayer shared with inline layer",
"-o/home/tim/tmp/sting.cfg"
]
},
{
"name": "py-cpr8x-enrich-config",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
},
"args": [
"-asting-mgmt",
"-uitsecorg",
"-w/home/tim/tmp/passwd",
"-lFirstLayer shared with inline layer",
"-c/home/tim/tmp/sting.cfg"
]
},
{
"name": "py-cpr8x-parse-config",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
},
"args": [
"-f/home/tim/tmp/sting.cfg",
"-rFirstLayer shared with inline layer"
]
},
{
"name": "py-fortimanager",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
},
"args": [
"-a10.5.1.55",
"-uapiuser",
"-w/home/tim/tmp/passwd",
"-llayer1",
"-d1",
"-o/tmp/outfile"
]
},
{
"name": "py-import_mgm",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
},
"args": [
"-m4",
"-d1"
]
},
{
"name": "c#-FWO Test",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_test",
"program": "/usr/bin/dotnet",
// "program": "${workspaceFolder}/roles/test/files/FWO_Test/bin/Debug/net5.0/FWO.Test.dll",
"args": ["test"],
"args": [
"test"
],
"cwd": "${workspaceFolder}/roles/test/files/FWO_Test",
"stopAtEntry": false,
"console": "internalConsole"
},
{
"name": "Blazor (web)",
"name": "c#-Blazor UI",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_UI",
Expand All @@ -37,24 +115,26 @@
}
},
{
"name": ".NET Core Attach ",
"name": "c#-.NET Core Attach ",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"name": "MiddlewareServer",
"name": "c#-MiddlewareServer",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build_middleware",
"enableStepFiltering": false,
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/roles/middleware/files/FWO.Middleware.Server/bin/Debug/net5.0/FWO.Middleware.Server.dll",
"args": [],
"cwd": "${workspaceFolder}/roles/middleware/files/FWO.Middleware.Server",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
}
}
]
}
1 change: 1 addition & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
inventory = inventory
#timeout = 60
force_handlers = True
stdout_callback = yaml

[ssh_connection]
pipelining = True
17 changes: 17 additions & 0 deletions documentation/api/api_handling_documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Common API Helpers

## How to convert file from json to yaml

python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)' < file.json > file.yaml

## How to convert a yaml file to json

python -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout)' < meta.yaml >meta.json

## How to convert JSON pretty print

from pp to compact:
python -c 'import sys, json; json.dump(json.load(sys.stdin), sys.stdout)' < file.json > file.json

from compact to pp:
python -c 'import sys, json; json.dump(json.load(sys.stdin), sys.stdout, indent=3)' < file.json > file.json
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,20 @@ mutation deleteIncompleteImport($mgmId: Int!) {
}
}
```

## common helper doc
### How to convert file from json to yaml

python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)' < file.json > file.yaml

### How to convert a yaml file to json

python -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout)' < meta.yaml >meta.json

### How to convert JSON pretty print

from pp to compact:
python -c 'import sys, json; json.dump(json.load(sys.stdin), sys.stdout)' < file.json > file.json

from compact to pp:
python -c 'import sys, json; json.dump(json.load(sys.stdin), sys.stdout, indent=3)' < file.json > file.json
8 changes: 0 additions & 8 deletions documentation/api/hasura-howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
## debugging hasura using docker ps
docker logs c37388157052

## How to convert hasura metadata file from json to yaml (for re-import)

python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)' < file.json > file.yaml

## How to convert a yaml file to json

python -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout)' < meta.yaml >meta.json

## Sending graphql queries

Method: POST
Expand Down
14 changes: 9 additions & 5 deletions documentation/developer-docs/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ Edit architecture diagram (internal only) at https://xfer.cactus.de/index.php/f/

To manually rollback a hanging import of management with ID 1:

`sudo -u postgres psql -d fworchdb -c "select * from rollback_import_of_mgm(1)"`
`sudo -u postgres psql -d fworchdb -c "select * from rollback_import_of_mgm(<management id>)"`

old, more invasive version:

`select * from rollback_import_of_mgm_without_cascade(<management id>);`

## clean code

Expand Down Expand Up @@ -58,7 +62,7 @@ Code blocks must contain language in first line. Either use three ~ or ` chars,

- Only one top level header in the same document

```
```console
# Title

text
Expand All @@ -72,7 +76,7 @@ Code blocks must contain language in first line. Either use three ~ or ` chars,

- One or zero whitespaces after list marker

```
```console
- List Item
- List Item
```
Expand All @@ -81,13 +85,13 @@ Code blocks must contain language in first line. Either use three ~ or ` chars,

- Example without text

```
```console
<https://www.apollographql.com/>
```

- Example with text:

```
```console
[Link to whatever](https://github.com/CactuseSecurity/firewall-orchestrator/blob/master/whatever/whatever.md)
```

Expand Down
Loading

0 comments on commit 036d762

Please sign in to comment.