Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make swagger fields optional #512

Closed
wants to merge 1 commit into from

Conversation

Scott8440
Copy link
Contributor

Summary: Some swagger fields should be optional and marked as such

Differential Revision: D16631735

Summary:
Pull Request resolved: magma#512

Some swagger fields should be optional and marked as such

Differential Revision: D16631735

fbshipit-source-id: e8c9e967c194f41797b639493a6fa1603ba1131d
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 862d828.

facebook-github-bot pushed a commit that referenced this pull request Apr 27, 2020
Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/512

- Added `files` to TechnicianWorkOrderUploadDataMutation
- Updated `createAddedCheckListItemFiles` to use `mimeType` in the `ContentType`
- Updated unit test

Reviewed By: apbuteau

Differential Revision: D21100834

fbshipit-source-id: 51749d0b5283fb9c80e45528939cbbf5a512fc82
rsarwad pushed a commit to rsarwad/magma that referenced this pull request Jul 30, 2020
Summary: .

Reviewed By: dlvhdr

Differential Revision: D21118195

fbshipit-source-id: 490b629cc9ebc23c3b7b602514965745fe3d9299

Fixed memory leaks for attach-detach procedure
Fixed the memory leaks for mme_app timers

Using IconButton

Summary: .

Reviewed By: dlvhdr

Differential Revision: D21129609

fbshipit-source-id: 2ab7cc322f057074ac0d972e164a7169bcb5fffd

symphony: drop buck support for go tests in favor of utd

Summary:
- go builds are not used at all as the actual build runs from circleci.
- go tests have been moved to symphony-go-unit-tests utd job.

TARGETS files were removed by running the following from symphony root:
```
for file in $(find . -name TARGETS); do
    if grep -q 'File generated by gentargets' $file; then
        rm $file
    fi
done
```

Reviewed By: a8m

Differential Revision: D21132019

fbshipit-source-id: 6fb540904434b3396f767bf2fb162e80e7f57a07

symphony/inventory-service-detection/add discovery method field to schema (#520)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/520

added the field, with only one enum value.
in the future we'll add "atrinet" or "network" (didn't want to choose the name now as it might change).

Reviewed By: naor9991

Differential Revision: D21128953

fbshipit-source-id: 401c7ff78790053e7dde882453a3791d24633c46

symphomy/graph: update ent package to latest (#521)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/521

In addition update test code to use generated enttest package when creating clients

Reviewed By: a8m

Differential Revision: D21130009

fbshipit-source-id: d579081bcd9be061f026f5a445376fa802090887

Add conductor proxy skeleton (#1514)

Summary:
* Enable live code reloading in the workflows container
* Add utilities and dependencies for tenant-aware proxy to conductor
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1514

Reviewed By: Mokon

Differential Revision: D21053930

Pulled By: KenG98

fbshipit-source-id: 9097e27be685135513a479aa993933cd9f6f4616

Add variable template sorting option to grafana dashboards (#510)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/510

Variable names can be sorted, and when a dashboard has many networkIDs or GatewayIDs, this can become very useful. Add an option to sort these variable templates alphabetically ascending

Reviewed By: xjtian

Differential Revision: D21095512

fbshipit-source-id: 1b74ec9762cd62bc05bdf35948d51ec3467fcec6

Star precreated dashboards (#511)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/511

If a dashboard isn't starred, it will only show up on the homepage if it is recently viewed. Starring dashboards makes the first visit more user-friendly since they don't have to go anywhere to find the dashboards.

Reviewed By: xjtian

Differential Revision: D21097219

fbshipit-source-id: 205b92028d46c637d40df7675b400567a59cee76

symphony/graph: block delete operation on user ent

Summary: user ent can only be soft deleted (deactivated).

Reviewed By: naor9991

Differential Revision: D21133224

fbshipit-source-id: b21c199c4b8bf10b3e87cb7f36633aa71c289e9a

Magmad local service metrics collector/reporter (#1526)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1526

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2254

Go magmad local service metrics collector/reporter

Reviewed By: uri200

Differential Revision: D21087458

fbshipit-source-id: a352ee109bc023bb6d5966a87773dee70b06aa41

Pass mysql_dialect option in nms helm chart (#525)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/525

Pull Request resolved: https://github.com/facebookincubator/magma/pull/1538

mysql_dialect was added to the docker-compose, but not the helm chart. This allows use of the nms with mariadb.

Reviewed By: xjtian

Differential Revision: D21140730

fbshipit-source-id: c5138a6b51f10d41a158815d1cee7149e5f3eaad

Update orc8r-helm-aws terraform module for new grafana setup

Summary:
- Don't deploy cluster-wide grafana anymore
- Update user-grafana to use separate PVCs

Reviewed By: Scott8440

Differential Revision: D21142961

fbshipit-source-id: bf0ad7d1f87f8df5820034c3ad807a54d1d4e226

Add support for GTP control protocol and GTP echo handling

Summary:
Following patch adds support for GTP control protocol field match and action.
This allows us to handle GTP echo packets and respond it with GTP echo response packets.

Reviewed By: koolzz

Differential Revision: D20909582

fbshipit-source-id: 6cc599020f84e3aaa8c426282d972689122bd005

Fixed memory leaks for attach-detach procedure (#1535)

Summary:
Description:
1. Fixed memory leaks for attach-detach procedure
2. Fixed the memory leaks for mme_app timers
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1535

Test Plan: Executed s1ap tester test suite

Reviewed By: pshelar

Differential Revision: D21132330

Pulled By: ulaskozat

fbshipit-source-id: 4e0efedac6327d3e53e79bb31edfa5d047ff8b9c

Create graphql structure for policies (#526)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/526

based on px in:
https://our.intern.facebook.com/intern/px/p/133B7?artboard=50C45A8D-436F-4513-8EB1-1852756DEBF6

Reviewed By: AmitArbel

Differential Revision: D21112004

fbshipit-source-id: 6349f808036afc95a0ee0d3fabe53640ed53dc14

Define policy ent and add ability to add policy (#527)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/527

In Ent I store either `InventoryPolicyInput` or `WorkforcePolicyInput`.
I enforce in `addPolicy` that only one of them must exist

Reviewed By: AmitArbel

Differential Revision: D21112818

fbshipit-source-id: 5bced1eff2fed761f6013853b23f6a0bc3ae70f8

Add group connection to data model of policies (#528)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/528

This will be used to aggregate policies for user based on his group membership

Reviewed By: AmitArbel

Differential Revision: D21127174

fbshipit-source-id: 205c8329162b86d56ffb925e2709414f1a7508d6

Message Dialog

Summary:
A basic confirmation dialog.

Design: https://our.intern.facebook.com/intern/px/p/11Jz0

**TODO:**
1. Add hook for displaying a MessageDialog.
2. Add FormDialog

Reviewed By: AmitArbel

Differential Revision: D20814765

fbshipit-source-id: 48b64bd170573304ed968432844a603764d20c1c

Work Order property

Summary: A NamedNode property of type WorkOrder.

Reviewed By: naor9991

Differential Revision: D21132874

fbshipit-source-id: fb59cd5c3bec8ac6b02109a2afafd40d809279c6

symphony/graph: adding parent context argument to viewertest.NewContext

Summary: allow us to create viewertest.Context from middlewares

Reviewed By: a8m

Differential Revision: D21153343

fbshipit-source-id: 50ba30da04355af64f26a6b0d29bc204b9887ba0

IM/service types/adding 'isDeleted' bool field (#530)

Summary: Pull Request resolved: https://github.com/facebookincubator/symphony/pull/530

Reviewed By: naor9991

Differential Revision: D21143125

fbshipit-source-id: 0696d6fe16935068354a5c849c1da952cdcf5eba

fix property input sends string ID and fails

Summary:
https://fb.workplace.com/groups/499722490751106/permalink/601294677260553/

- When querying through graphql - there's a middleware to take ids and convert int to string.
- On direct rest calls (like the export) this does not happened. and therefore on properties Input (which by the models, requires an id) this failed.

**EDIT: I thought it might be better to remove the ID altogether, less confusing.**

Made the client send ints as IDs (the server ignores them, it's randomly generated either way)

Reviewed By: dlvhdr

Differential Revision: D21135789

fbshipit-source-id: 0ce36466737d6a73b1acbaba66509fae9740bd6b

symphony/graph: place viewer test files into viewer_test package

Summary: prevent circular dependency when privacy rules are used

Reviewed By: naor9991

Differential Revision: D21153726

fbshipit-source-id: aa039e51d080074a093c675bd9b8251a96ca1657

Supporting Delete

Summary: From GroupCard, admin can delete group.

Reviewed By: dlvhdr

Differential Revision: D21129620

fbshipit-source-id: 780ec9f226e80b2ed3fe143991820b781a7f6cff

symphony: upgrade gqlgen package to 0.11.3 (#503)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/503

- regenerated code
- updated resolver / test to use new apis
- updated txgen template
- updated pagination / node ent templates to new api
- rewrote ocsql to support metrics
- rewrite ocsql to support tracing

Reviewed By: a8m

Differential Revision: D21014305

fbshipit-source-id: d4256971fd30f8c42435a3938718c12724cbcf33

Include "Template" dashboard for nms grafana

Summary: The `networkID` and `gatewayID` variables are fairly difficult to set up correctly, and a user would have a hard time figuring out how to do this if they wanted that feature in a custom dashboard. By providing a template which has a single graph (for variable usage demo), users can simply copy this template then build their dashboard off of this base.

Reviewed By: rckclmbr

Differential Revision: D21145359

fbshipit-source-id: 32befb30c0b1a6d012ebe3f701f676c78f50960d

Cache user ent in viewer (#509)

Summary: Pull Request resolved: https://github.com/facebookincubator/symphony/pull/509

Reviewed By: alexsn

Differential Revision: D21088560

fbshipit-source-id: 441ea329c3472a7c0e97f8a19b0ad6436d6b4fe3

Client Side

Summary: Ability to set a work order property value.

Reviewed By: naor9991

Differential Revision: D21156035

fbshipit-source-id: cf044a1d09c4b3e5ea3323816c03edcb45e30919

Conductor metrics collection (#1523)

Summary:
conductor now pushes metrics into fluentD
fluentD processes the metrics and exposes them for prometheus
prometheus already collects metrics from fluentD

* add prometheus and grafana compose file for local deployment

Signed-off-by: Maros Marsalek <mmarsalek@frinx.io>
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1523

Reviewed By: Mokon

Differential Revision: D21098515

Pulled By: KenG98

fbshipit-source-id: d1124bc98abb03e3a3d4865f5094076d72d7504f

symphony/telemetry: suffix test files package with _test

Summary: https://tip.golang.org/cmd/go/#hdr-Test_packages

Reviewed By: naor9991

Differential Revision: D21154899

fbshipit-source-id: 915776c2c853f7e1b79242b60d326820fc7aa234

Add transformers to conductor tenant proxy (#1536)

Summary:
* Add metadata/taskdefs transformer
* Add metadata/workflow, workflow, workflow/bulk transformers
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1536

Test Plan:
Start docker compose in symphony/integration folder with following yaml files:
* docker-compose.yaml
* docker-compose.conductor.frinx.yaml
* docker-compose.workflows.yaml

Login to fb-test.localhost, obtain connect.sid cookie and call:
```
curl --cookie "connect.sid=<value here>" http://fb-test.localhost/workflows/metadata/taskdefs
```
This should return empty array `[]` and status code 200. Note that fb-test.localhost must be resolved to localhost.

Reviewed By: Mokon

Differential Revision: D21164962

Pulled By: KenG98

fbshipit-source-id: ad4c4e2c35e63c12fe525cc8e331c4d7b9844c51

symphony/deploy: install ca-certificates before running testim

Summary:
testim job currently fails with the following message:
```
Downloading workspace layers

Error downloading workspace layer for job e02b054c-e22f-4bc0-bb0b-38e2d8ee232a. If this is a re-run of an old job, the workspace may have expired.: RequestError: send request failed
caused by: Get https://circle-production-customer-artifacts.s3.amazonaws.com/?list-type=2&prefix=picard%2F5da633ddda1d4a7f21aa751d%2Fworkflows%2Fworkspaces%2F3f87ed8c-8fb0-4384-b1b1-82f0ea5626f1%2F0%2Fe02b054c-e22f-4bc0-bb0b-38e2d8ee232a: x509: certificate signed by unknown authority
```

Following [suggestion](https://support.circleci.com/hc/en-us/articles/360016505753-Resolve-Certificate-Signed-By-Unknown-Authority-error-in-Alpine-images) for resolution.

Reviewed By: hanle11

Differential Revision: D21178966

fbshipit-source-id: a4c714917ea4e697a0d298f5fe51a5e24e674d76

EZ/oncall/export&import /support date_time_local property type (#532)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/532

https://fb.workplace.com/groups/499722490751106/permalink/601294677260553/

Reviewed By: alexsn

Differential Revision: D21175332

fbshipit-source-id: a41fe77048949c8a0295ca1d8e08ae81c91647fe

Use hooks for role-based permissions (#533)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/533

Replace previous logic of using ReadOnly ent client
All rules logic are inside rules.go

The stack of rules for `User Ent`:
* DenyDeletingOfUsers
* AllowWriteForAdmin
* AllowWriteForOwnerOrInWriteGroup
* DenyWrite

The stack of rules for `UsersGroup Ent`:
* AllowWriteForAdmin
* AllowWriteForOwnerOrInWriteGroup
* DenyWrite

The stack of all `other ents`:
* AllowWriteForOwnerOrInWriteGroup
* DenyWrite

Reviewed By: alexsn

Differential Revision: D21065332

fbshipit-source-id: c5023646ae6b10805dd0e4f2ac10d00a8c76e02c

Multiple diameter (integ_test) (1/3) - main.go mockPCRF and mockOCS to support multiple configurations (#1527)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1527

Modified main.go at mockPCRF and mockOCS to support configuring multiple gx and gy connections

Reviewed By: xjtian

Differential Revision: D21094833

fbshipit-source-id: be8fc49bf2c6cb5d536ebd2d4c15223c3fdda423

Multiple diameter (integ_test) (2/3) - Add second scenario for integ_test for OCS2 and PCRF2 (#2296)

Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2296

Pull Request resolved: https://github.com/facebookincubator/magma/pull/1528

Added a second scenario to fab file to be able to run MultiSessionProxy tests.

Modified makefile:
- To prevent MultiSessionProxy when ```make integ_test``` is run we will use golang build tags: MultiSessionProxy tests files will include ```//build !main_integration``` at the top of the file that will prevent its execution when ```make integ_test``` is called.
- To run MultiSessionProxy tests we will have to call ```make multi_session_proxy``` (fab file will take care of set up the right environment for that that)

Modified fab file:
- Added new scenario after the main integ_test is done
- Modified ```_run_integ_tests``` not to clean up in case of success (```clean_up``` will be run at the very end, if we get there)
- Added conditions to run the test by name: MultiSessionProxy will be executed with proper scenario if we run```fab integ_test``` or ```fab integ_test:test_to_run=multi_session_proxy```

Reviewed By: themarwhal

Differential Revision: D21094862

fbshipit-source-id: a6017978dd5121056229c41180a853d42b6a7212

Multiple diameter (integ_test) (3/3) - service_wrapper.go support to select different PCRF and OCS (#1537)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1537

Modify service_wrapper.go and any other files to support selection of OCS/PCRF instance on integ_test

Reviewed By: themarwhal

Differential Revision: D21138579

fbshipit-source-id: 9c26b765bdaae6a84225d9442349f8c470060419

symphony/circleci: fix config file

Reviewed By: hanle11

Differential Revision: D21180460

fbshipit-source-id: 07bb04c8ff8f3eb9d2a94248a72e646a7ec8c2f6

symphony/authz: adding base privacy policy

Summary: authz policy implements ent.Policy interface and adds global pre/post policies wrapping actual policy execution.

Reviewed By: naor9991

Differential Revision: D21180319

fbshipit-source-id: 3588ccdb2f2a98c02307367e5cdf874ece043705

Adding const to format string for OAI logging (#1542)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1542

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2297

- Using `OAILOG_<LEVEL>_UE` macros on C++ throws a warning and stops compilation for `make build_oai`:
```
Warning: ISO C++11 does not allow conversion from string literal to 'char *'
```

- Adding `const` to format parameter fixes this

Reviewed By: uri200

Differential Revision: D21182393

fbshipit-source-id: 2ab14fe256ee548b0ceebb8f4f487aa7a4a78d46

symphony/circleci: downgrade testim docker base image to node:8.15-stretch-slim

Summary: Possible fix for https://github.com/testimio/docker-cli/issues/3

Reviewed By: naor9991

Differential Revision: D21182836

fbshipit-source-id: 8987e26353280b2499e789ee9ff4fbab977e2f0e

Fix errors in writing Auth Info Procedure to redis

Summary:
When `use_stateless` flag is set to true in mme.yml, `test_resync.py` fails as
the state is not written into redis correctly. This change fixes the conversion
of EMM CN procedures to proto messages. Other minor fixes:
- adds missing enb_s1ap_id_key field in the UE context
- replace strncpy with memcpy
- typos

Reviewed By: ardzoht

Differential Revision: D21189696

fbshipit-source-id: 0fb6f55455a8aea9e182ae6c62d7de1a1870b2e9

symphony/cli/pyinventory/api: replace `SearchQuery` by `LocationSearchQuery` in location module (#519)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/519

replace `SearchQuery` by `LocationSearchQuery` in location module for performance improvement

Reviewed By: naor9991

Differential Revision: D21127760

fbshipit-source-id: ac61825afa21c03b82eafc44805a740cb77253e5

symphony/cli/pyinventory: added common package for common data used in project (#522)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/522

added common package for common data used in project
added endpoint module to include existing endpoints

Reviewed By: naor9991

Differential Revision: D21131015

fbshipit-source-id: 1dc18ff0628513811f835f500415cb57ad14e43c

symphony/cli/pyinventory/common: added `data_enum` module (#523)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/523

added `data_enum` module to include existing enums

Reviewed By: naor9991

Differential Revision: D21132068

fbshipit-source-id: 08da6397b9497a0db3ec21a2423df60b35d9b832

symphony/cli/pyinventory/common: added `data_class` module (#524)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/524

added `data_class` module to include existing dataclass

Reviewed By: naor9991

Differential Revision: D21134619

fbshipit-source-id: f86c99eef0dfe6547a931c333cdadcff4b2a3f7b

symphony/cli/pyinventory/common: added constant module (#529)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/529

added constant module to include existing constant values

Reviewed By: naor9991

Differential Revision: D21152002

fbshipit-source-id: 992429124d00e9c7689ba3b83e4100cecccbe62a

Expand UE simulator service to allow for simulating multiple APs (#1544)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1544

Expand UE simulator service to allow for simulating multiple APs

Reviewed By: themarwhal

Differential Revision: D21151079

fbshipit-source-id: 47472ee14c95a361012c72480cd940d5612c7478

Allowing Admin (non Owner) edit admin settings

Summary:
Just need to not enforce edit permissions.
(since only those who allowed to edit are allowed to browse to the view)

Reviewed By: naor9991

Differential Revision: D21186208

fbshipit-source-id: 3ddd0794ccafe41d569bfc89f8d07a4ba64c6dc7

User property (#2294)

Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2294

Ability to set a user as a property value.
After discussing with Naor and Amit, we decided to add the `name` field to `User` and make it a `NamedNode`.

Reviewed By: naor9991

Differential Revision: D21176897

fbshipit-source-id: 5a82a1e1854a1c1580e30dbfbea6574861d31ba5

Mobile App documentation

Summary: Documenting the mobile app.

Reviewed By: apbuteau

Differential Revision: D21199652

fbshipit-source-id: 5a1760e7ffccc52c8328481d47ac400c118ec430

Fix mobile app flow documentation

Summary: ID of the page was incorrect

Reviewed By: idoshveki

Differential Revision: D21200016

fbshipit-source-id: 71aa8d2b2fa24e065d8be89d4804c9bd695e96b4

symphony/graph: adding authz privacy policy

Summary: authz.Policy adds a fixes set of rule to be executes before / after ent specific policy

Reviewed By: naor9991

Differential Revision: D21200140

fbshipit-source-id: fbac036a03326d88b44574628200d6a91242afce

symphony/graph: use atomic.Value to store viewer user

Summary:
current implementation uses a rwlock to protect viewer.user access which is:
- not required for a single pointer
- not taken on all accesses (e.g. viewer.MarshalLogObject, viewer.traceAttrs, etc ...)

Reviewed By: naor9991

Differential Revision: D21200228

fbshipit-source-id: 73026fef8f65e33cf5af153bde8cc86895c1b6d7

Fixing bug in menu item highliting

Summary:
Active menu item needs to be highlighted.
If some of the given views are lack of menu item, menu items might not get highlighted.

Reviewed By: dlvhdr

Differential Revision: D21185931

fbshipit-source-id: b52efbfbc1b1cef9973e6eb66e5c554a4353fe15

Multiple APs Authentication Integ TC (#1545)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1545

Multiple APs Authentication Integ TC

Reviewed By: themarwhal

Differential Revision: D21151979

fbshipit-source-id: 8d7c92e856a56a375c9c559ce435bf399d3fa096

Fix deprecated parser to deal with GraphQL Union type

Summary: As title

Reviewed By: vdorfman

Differential Revision: D21201571

fbshipit-source-id: edcbaea10207705cda12611691faf47388cadde0

Documentation for P0

Summary: {F235028243}

Reviewed By: vdorfman

Differential Revision: D21199260

fbshipit-source-id: 6d9dad5fee2a4aa91ba0a88b7333c06086202023

symphony/cli/pyinventory: bump PyInventory 2.6.1 version (#537)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/537

PyInventory 2.6.1 version

Reviewed By: naor9991

Differential Revision: D21202123

fbshipit-source-id: 4422b72994c78f2af3c739ddc76038c43abd6d5c

Fix doc

Summary:
N/A

Created from Diffusion's 'Open in Editor' feature.

Reviewed By: dlvhdr

Differential Revision: D21203503

fbshipit-source-id: 65486ec72c6497d34435b3477ada406de4a90134

symphony/cli/pyinventory/docs: update PyInventory release notes (#539)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/539

update PyInventory release notes

Reviewed By: naor9991

Differential Revision: D21208104

fbshipit-source-id: e9b6f164d238d22890f653eb92e101d7eadd25c9

Add more debugging tools to LTE AGW's generic command config

Summary:
This diffs adds OVS flows, subscriber table, and health status to
the set of commands that can be run as remote commands. This should aid in
debugging issues where VPN connectivity is not enabled.

Reviewed By: themarwhal

Differential Revision: D21200075

fbshipit-source-id: f4e31363b5b74ef269d361a97904e38daea8cc57

suppress errors in `fbc/symphony/cli`

Summary: Automatic run to suppress type errors.

Reviewed By: dkgi

Differential Revision: D21213724

fbshipit-source-id: 01a2be1a2804a8b4a3bb350409ca20ce2472ca5e

Add event handler API to conductor proxy (#1543)

Summary:
* Add /event API endpoint
* Add explicit list of allowed system task types.
* Change infix separator from '_' to '___'

Event handler proxy is currently not prefixing event names. This will be fixed later.
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1543

Reviewed By: Mokon

Differential Revision: D21191071

Pulled By: KenG98

fbshipit-source-id: d3b6750576e69828c3ed6d3208d8d23299f69633

Rearrange node table view

Summary:
Instead of listing out every node there should be collapsible subsections organized by site.

TODO:
* Add sorting/filtering toolbar at the top? Should the top level filter only filter by site name or also filter nodes?

Reviewed By: aclave1

Differential Revision: D21135831

fbshipit-source-id: 5507922608227b8cb0a6fc3f174d0978f301d1b5

Renaming state_imsi_ht to state_ue_ht (#1549)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1549

- For UE context hashtables, renaming from `state_imsi_ht` to `state_ue_ht`

Reviewed By: uri200

Differential Revision: D21191886

fbshipit-source-id: 9f1a7d35418fc39a4a47f5de08e60e9900ea1818

Add organization handling in react routes for magmalte (#531)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/531

With the addition of organizations, that data needs to be passed into the app at the top level from routes.js. Additionally, some routes needed to be registered for `/grafana` paths.

Reviewed By: murtadha

Differential Revision: D21160932

fbshipit-source-id: 4c8f3ddf8021ccfd17f1e76b7bfe5a527ed39b5b

strongly type renderAsync

Summary: Since now we have types for react-testing-library, renderAsync now returns Promise<RenderResult>.

Reviewed By: mahyali

Differential Revision: D21178878

fbshipit-source-id: d26c5f17b2075337bf9124c3d066ec161f092b00

Update cwf swagger config to not require gateway health

Summary:
CWAG creation shouldn't require configuration as these are only
running if active/standby is enabled. We can revisit this once NMS support
for these parameters is added.

Reviewed By: themarwhal

Differential Revision: D21219080

fbshipit-source-id: c820f11578bfb667bc3824324445ece232a68661

Add CWF Dashboards (#540)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/540

CWF Networks have a different set of useful metric queries than lte networks. This adds dashboards (replicating the existing nms dashboards) in Grafana for organizations that contain at least one CWF network.

Reviewed By: xjtian

Differential Revision: D21232817

fbshipit-source-id: 640b575cda7259b4c5bc87eb8424633a5789f75b

Add stop functionality to GRE probe for CWAG health service (#1557)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1557

When a CWAG is demoted, we block ICMP on the eth1
interface to ensure that traffic will properly be re-routed.
Due to this, the ICMP GRE probe will always fail when a gateway
is in standby. This causes the gateway to appear unhealthy.
To avoid this, we stop the probe on gateway demotion and start
the probe on gateway promotion.

Reviewed By: xjtian

Differential Revision: D21219399

fbshipit-source-id: 60e2a4a591710f99f5a72167c3d4d5008cc89832

Add reindex job queue for cross-controller coordination. (#1511)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1511

Unordered job queue for implemented using the `FOR UPDATE SKIP LOCKED` clause available in Postgres and Maria.

Populating the job queue is an exactly-once operation. We handle this in two parts

- <= 1 -- the job queue jobs are written as part of a tx that checks the "stored" indexer versions, and these stored versions are updated the the "desired" versions during the same tx, ensuring no more than one controller instance will write to the job queue per code push
- >= 1 -- this work is best suited for a future where we have a message broker in the orc8r, so for now each controller warning-logs either success or failure to write to the job queue, and manual inspection of the logs would be required (thankfully, we also have tests to ensure this doesn't happen in the expected case)

Reviewed By: xjtian

Differential Revision: D20242297

fbshipit-source-id: 50b85580cb8ab545a507613d33a85764a882907f

Add load criteria to Search in support of ListKeysByNetwork.

Summary:

State indexers' reindex method needs to pass all known state, independent of network, through the indexer to be reindexed. We currently have no way to get a list of all state/state IDs in a cross-network context. `ListKeysByNetwork` us the hook to get cross-network state IDs, which can then be converted to state on a per-network basis via the normal methods.

The easiest way to get all keys is to use the existing `Search` method, so we
- update `Search` to (a) allow nil network filters and (b) function correctly when all filters are nil (return all blobs)
- update `Search` to support a load criteria -- in this case, whether to load blob values
- add a default method `ListKeysByNetwork` as a wrapper around `Search` with nil filters and a "no values" load criteria

Reviewed By: xjtian

Differential Revision: D21027151

fbshipit-source-id: 8e66ce61bfcfebe9475bfbfd6fa897a583f3789f

Multi Diameter - Use Multi diameter type only when more than one server is configured (#1554)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1554

When only one server is configured, there is no need to use ```NewCentralSessionControllers``` (with an S)

With this diff when only  one server is configured (that s the most common casse), we will keep using the same type we were using ```NewCentralSessionController``` (no s).

Reviewed By: emakeev

Differential Revision: D21222677

fbshipit-source-id: cae820223f9db6ceab1398cd7e23531eae70516c

Add setup image to readme (#1558)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1558

Adding the cwf integ test setup image to the readme.

Reviewed By: mpgermano

Differential Revision: D21235328

fbshipit-source-id: 956e02f0664e3be1348d389c483db89093061f52

Fix for D21222677 (#1559)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1559

Fix for some code left over

Reviewed By: tmdzk

Differential Revision: D21242633

fbshipit-source-id: 7c780b3a46c3f7f6d7407198690758f562c70849

Add CircleCI config for transferring service logs (#1548)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1548

For cwf integ test, we will store service logs as built artifacts on test failure.

Reviewed By: xjtian

Differential Revision: D21029033

fbshipit-source-id: 4a14cc9dbf314341039c611174f687d3bd0ca257

Supporting spaces (#518)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/518

supporting searching in multiple fields using space (i.e. using term "John Doe" for user with firstName "John" and lastName "Doe").

Reviewed By: naor9991

Differential Revision: D21120798

fbshipit-source-id: 49b01c74c41057e71bf7696ec4bb2608b7d4d6e2

Filtering out Deactivated users (#517)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/517

When searching for users, Deactivated users should be ignored (as if deleted).
Yet, if for some reason, search including Deactivated would be required - it is supported (just need to pass `includeDeactivated: true`).

Reviewed By: naor9991

Differential Revision: D21121540

fbshipit-source-id: 02c5accfa0b34b52bda5cd30261ee0e78572ad29

CWF and XWF ansible use service instead of systemctl (#2308)

Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2308

Pull Request resolved: https://github.com/facebookincubator/magma/pull/1551

There is problem to run this ansible in machines without systemd. I hit this problem trying to run it on xwfm docker in circleci environment. In other systems where systemd is working, service is just wrapper to systemctl, so it shouldn't metter.

Reviewed By: mpgermano

Differential Revision: D21210098

fbshipit-source-id: d1851b4a1500cc2dfb382dca9400f033e7d6dedd

Add ability to run graphql compiler tests not via buck

Summary: For easier development of the graphql compiler

Reviewed By: vdorfman

Differential Revision: D21245534

fbshipit-source-id: b4b82818e5a1f5ce44d4b54aa40f0f1208558e52

Show all pyinventory versions in UI

Summary: This way when we release version 3.0.0. Partners can choose to install 2.*.* versions if they'd like

Reviewed By: vdorfman

Differential Revision: D21235166

fbshipit-source-id: 1a3a4fd092bf8bba705d57e507827bc4ea41f1e8

Small design fixes

Summary:
* Projects "No search results" wasn't centered
* Project template cards layout

Reviewed By: AmitArbel

Differential Revision: D21249540

fbshipit-source-id: 7e98345ff110f144be3cac74b5bda4181fd3b80c

Return aggregated permission policies (#535)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/535

Here I only return it in graphql resolver.
In next diffs, I'll set using it for ent privacy rules

Reviewed By: alexsn

Differential Revision: D21178210

fbshipit-source-id: 6f5a697e0ed66af4620d9ae3f2afd9716af62aec

Introduce build/deploy script

Summary: Introduce build/deploy script for embedded magma

Reviewed By: emakeev

Differential Revision: D21213624

fbshipit-source-id: ea7e19db05dcb2b1d917b3b12f0f984b8b15103b

Add logging inside generated code (#541)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/541

This simplifies our code significantly

Reviewed By: vdorfman

Differential Revision: D21227695

fbshipit-source-id: 09a42f281736aa4ee963766847364eadd40f7f54

sgw_handler: gtp: remove GTPv1u task handler

Summary: This unused code.

Reviewed By: ardzoht

Differential Revision: D21151373

fbshipit-source-id: 3da83224be5fc7e9ef6ee95d39e824c6ab1a35c9

Adding images to checklistitem (#512)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/512

- Added `files` to TechnicianWorkOrderUploadDataMutation
- Updated `createAddedCheckListItemFiles` to use `mimeType` in the `ContentType`
- Updated unit test

Reviewed By: apbuteau

Differential Revision: D21100834

fbshipit-source-id: 51749d0b5283fb9c80e45528939cbbf5a512fc82

Format label values properly (#1556)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1556

The label for "days" (e.g. 7 days indicating this data covers a week: https://pxl.cl/15FP0), was actually being formatted as `\u0007`. Convert the int to a string properly to fix this.

Reviewed By: xjtian

Differential Revision: D21232466

fbshipit-source-id: 30ff68978234215483735e346f592035eb23f773

SGW: remove dead code related SDF marking

Summary: This code was never enabled and it can not be used with OVS datapath.

Reviewed By: ssanadhya

Differential Revision: D21151135

fbshipit-source-id: b65919dbb40a3764df12cddbf05a84685bec65e6

organizations nms documentation

Summary: Documentation on the new organizations feature, including what steps to take to upgrade.

Reviewed By: xjtian

Differential Revision: D21159104

fbshipit-source-id: a0dad61b47fe59bf8a4c33d860d6b55fcc4d4415

Grafana nms documentation

Summary: Documentation on Grafana including how to access

Reviewed By: xjtian

Differential Revision: D21167170

fbshipit-source-id: 98faddc751181e116aa27a4e7d4885edb59114b4

Fix pipelined pylint error (#1565)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1565

resolved several lint errors

Reviewed By: andreilee

Differential Revision: D21255292

fbshipit-source-id: 7e4cf5c62a2169ab1cae909569ea54461259350b

Fix li_mirror radius fwd bug (#1555)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1555

li might not be setup, in that case don't mirror radius

Reviewed By: uri200

Differential Revision: D21225432

fbshipit-source-id: d498c37f791ac94224149529b6316fd2c97ef37d

Fix arp table restart recovery bug (#1561)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1561

We don't always have redis infromation for subscriber IP address(when there was no dhcp handshake), so check if IP is saved before insalling rules.

Reviewed By: karthiksubraveti, themarwhal

Differential Revision: D21246666

fbshipit-source-id: 8e75c97d5287e2790f64044563bf358c389e4ea5

Documentation for default APN

Summary: There is no clear documentation on which APN to use by the UEs to gain access to Magma AGW. This commit explicitly states the default APN supported out of the box.

Reviewed By: themarwhal

Differential Revision: D21233368

fbshipit-source-id: f85da09f12499ddfaeb9792e827492e29a6b5d22

S1sim testcase for multiple RARs (#1540)

Summary:
This PR has a new S1 SIM testcase to test multiple RARs
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1540

Test Plan:
1.Executed the new testcase on latest master
2. Verified S1 SIM sanity suite

Reviewed By: ardzoht

Differential Revision: D21232760

Pulled By: ulaskozat

fbshipit-source-id: 83d8c349e94a6b5ff595da10980600e34cface2b

Null check on axios response (#549)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/549

The axios error response is not guaranteed to have a "response" field, so we should check if it exists before referencing it.

Motivation: There's a weird error where axios is throwing during some call, however every call is in a try/catch block. My hunch is that the reference of `error.response.status` is throwing inside the error block because `error.response` doesn't exist.

Reviewed By: tcirstea

Differential Revision: D21269460

fbshipit-source-id: e0855dd3a9a53ccd577a8223cbb92684a9da9e59

use machine instead of private images for build

Summary: We were using private images hosted on jfrog to build. Rolling back to use classic CircleCI machine node

Reviewed By: uri200

Differential Revision: D21271187

fbshipit-source-id: 410e968604851b9be6d20a5d6705a2225adab405

Updating use_stateless check usages (#1550)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1550

- When writing UE context on MME tasks, we can save a function call to pull up the state pointer by preemptively using `persist_state_enabled` flag on SPGW and MME state managers.

Reviewed By: ssanadhya

Differential Revision: D21191885

fbshipit-source-id: 07ba8be34ccebed148d4835b61da462f8c64a21b

Magmad service implementation (#1560)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1560

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2313

Implementation of magmad service in magmad
with service start/stop, tail logs, etc.

Reviewed By: uri200

Differential Revision: D21244516

fbshipit-source-id: 83c38480195eebf136efcfc663408be32e68fa05

Cleanup enf stats state on restart (#1569)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1569

This would error out on some restart recovery cases

Reviewed By: mpgermano

Differential Revision: D21261991

fbshipit-source-id: 18706490401f00d2b0fc89fa045ab61887b26630

Table view skeleton

Summary:
No data yet.
Will be added in D21175017

Reviewed By: dlvhdr

Differential Revision: D21118136

fbshipit-source-id: 63047016e6be61aabd3b1b1d63ffb51e42254987

Adding permissionsPolicies query (#534)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/534

Allowing fetching all Policies in system.
For Policies table

Reviewed By: naor9991

Differential Revision: D21173878

fbshipit-source-id: 046f785715eec59f5b0ecd9319136d57592d7012

User property

Summary:
Option to set a user to a property.

**Note: there's a small downside to this approach. When you first select a user from the dropdown, its email is displayed. When you then refresh the work order you will see the user's name. This is because all the property related components are not using fragments. So I couldn't use them in order to fetch the email field just for the `User` `NamedNode`**

Reviewed By: AmitArbel

Differential Revision: D21177734

fbshipit-source-id: ee776118b830df4f992e5d6b695b9295c7c0a9d1

symphony/end-point-type/ jobs handler

Summary:
added a new handler + router
next diff the logic is added

Reviewed By: naor9991

Differential Revision: D21114269

fbshipit-source-id: 996a9bed9b3d8e833dabbf2d64674c7e123884cc

services/ move 'discover-method' filed from instance to type (#550)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/550

the deleted field is optional and is not written to (no prod ent should have value there) is it ok ? alexsn a8m

Reviewed By: naor9991

Differential Revision: D21275082

fbshipit-source-id: 31067983190ed16a5ba60e3cdaa1ac44dc9e9288

Delete user_management feature flag

Summary:
I opened the feature flag for our partners.
I'll wait until Tuesday to see no major issue reported and I'll ship it

Reviewed By: AmitArbel

Differential Revision: D21249210

fbshipit-source-id: 530f25a96900d5b236bf58a1d049df066fdc71ff

Fix event publishing in conductor proxy (#552)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/552

Fix various issues in conductor proxy, most notably:
* Event handler prefixing
* Workflow,taskdef deletion
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1563

Reviewed By: Mokon

Differential Revision: D21266463

Pulled By: KenG98

fbshipit-source-id: 9ab6775e830fea2e0bd99553d8caf4fdf870bd08

Transfer logs on error not success

Summary:
I made a dumb mistake... The return code is 0 on success and non-zero otherwise

fatfingertypo

Reviewed By: karthiksubraveti

Differential Revision: D21276767

fbshipit-source-id: 7fe50b5c3771e64fac32410871f53c32dcfe43ea

Cache permissions in context (#547)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/547

Permissions will be used by all rules so let's cache them

Reviewed By: vdorfman

Differential Revision: D21253958

fbshipit-source-id: d6ec64b5e9d1913a777e4957f3206393161bb92d

Permissions for equipment,location,etc. (#551)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/551

For each ent schema file that will be a corresponding `*_rule.go` file in `authz`
All policies here are based on permissions struct

Reviewed By: vdorfman

Differential Revision: D21257886

fbshipit-source-id: b2ef4c2ede9f198cad41ddcbe5fa3d6a192c9421

Handle nested tasks in workflow proxy (#553)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/553

For decisions and forks

Signed-off-by: Maros Marsalek <mmarsalek@frinx.io>
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1564

Reviewed By: Mokon

Differential Revision: D21267094

Pulled By: KenG98

fbshipit-source-id: cb7b4062ce2662b184e570eecd1681617df914a0

Add new test cases to sanity suite (#1541)

Summary:
Added test_attach_detach_nw_triggered_delete_secondary_pdn.py, test_attach_detach_nw_triggered_delete_last_pdn.py and test_attach_detach_rar_tcp_data.py test cases to sanity suite
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1541

Test Plan: Executed S1 SIM sanity suite

Reviewed By: ardzoht

Differential Revision: D21232764

Pulled By: ulaskozat

fbshipit-source-id: eb759c5a1ef888668b6d4c76ed065741e8ac66a7

Clean up Gx Client Test (#1567)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1567

- About to add a few gx unit tests so trying to clean up a few things
- Let the OS allocate the port by setting it as to 0 initially
- Moving seeding logic to outside of startServer

Reviewed By: uri200

Differential Revision: D21257280

fbshipit-source-id: e520f7c8c0f342d7542078deb848f433b2f2c123

Clean up Gy Client Test (#1568)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1568

Similar to the stack below, cleaning up a few things before adding a few more unit tests.
- Let the OS allocate the port by setting it as to 0 initially
- Moving seeding logic to outside of startServer

Reviewed By: uri200

Differential Revision: D21259629

fbshipit-source-id: a04cadf598df28a2c5d2e84f0af2f1812d55f673

change org name in magma dev setup script

Summary: Since the NMS is splitting with Symphony, fb-test is now created as default for inventory stuff, and magma-test is created as default for NMS stuff. This changes the setup script to reflect that

Reviewed By: karthiksubraveti

Differential Revision: D21282812

fbshipit-source-id: bee9fd41ac6618c27baf20cf0bf3aaf56db6db6c

Make GrafanaClient await axios requests

Summary: This is more idiomatic

Reviewed By: tcirstea

Differential Revision: D21270987

fbshipit-source-id: a051099378cd2b7e2ae10acd7750a97ba91db9df

Multiple diameter (integ_test) - Test to check UE control data flows through the right PCRF and OCS (#1553)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1553

This is a basic tests with the new set up of  2 PCRF and 2 OCS.
The UE gets configured only in one of those PCRF and OCS instances based on its IMSI.
The test consists on single UE sending 500k, reporting to PCRF and OCS and detaching.
The objective is to make sure the data flows through the right instances.

Some generic issues that may need further investigation:
- For some reason OCS and PCRF seems to get the subscribes accounts deleted even before we send the detach. This prevents the credit to be reported properly
- UESim uses only one MAC address, so it is not possible to send traffic from more than one UE. So any tests is currently limited to one single UE in data plane

Reviewed By: themarwhal

Differential Revision: D21147346

fbshipit-source-id: e04dd96bd59e4f9b290dc35a87ac478f7c64b371

Catch error from axios request while building dashboards

Summary: This call to the MagmaV1API wasn't wrapped in a try/catch block and could cause crashes if a 404 was received when trying to get network info.

Reviewed By: tcirstea

Differential Revision: D21287981

fbshipit-source-id: e47ffefe4b8a4f269cec13d4e835a22908b9d28a

symphony/graph/graphql/resolver: added editPermissionsPolicy functionality (#544)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/544

`symphony.graphql` - added `editPermissionsPolicyInput`
`permissions_policy.go` - added `editPermissionsPolicy`
`permissions_policy_test.go` - added `TestEditPermissionsPolicy`

Reviewed By: naor9991

Differential Revision: D21253395

fbshipit-source-id: dff13028dd3f480469f4375b1124ad94bd3daa8d

Transfer logs on failure! Last one

Summary: without the warn_only, it was just exiting the `run(_run_remote_cwf_integ_test)` fab command :o

Reviewed By: tmdzk

Differential Revision: D21286214

fbshipit-source-id: 8536941bf3f74e83345079943e65b5f1fa433066

Hiding behind feature flag

Summary: flag 'user_management_dev'

Reviewed By: naor9991

Differential Revision: D21299941

fbshipit-source-id: ed2cf02f6494f6a4a9cdb6668492c67dffdf5683

symphony/graph: added `usersGroupSearch` functionality (#548)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/548

added `UsersGroupSearchResult`, `UsersGroupFilterType` and `UsersGroupFilterInput` in symphony.graphql
added `users_group_filter` in resolverutil
added `UsersGroupSearch` in resolvers

Reviewed By: naor9991

Differential Revision: D21257077

fbshipit-source-id: c3e7e603c91fd6ba569acf437f81ad30bd8d4fbd

Adding missing mandatory notation (#554)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/554

In InventoryPolicy all attributes are not nullable (recursively).
In WorkforcePolicy, the data attribute is of WorkforceCUD whose all attributes are nullable.
WorkforcePolicy should be recursively not nullable as well.

Reviewed By: naor9991

Differential Revision: D21256486

fbshipit-source-id: c7de89271cfe4241b0adec758e0707a7d3e1a54a

Improve Error message for sending RaR (#1578)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1578

Return err if we have trouble sending a RaR (both OCS and PCRF)

Also just temporarily bump up pcrf/ocs log levels to get more info.

Reviewed By: ymasmoudi

Differential Revision: D21300554

fbshipit-source-id: 290a3d0710ca10ae75eb73b25f94d5e952912aa8

Fixing button's caption being truncated

Summary: See task

Reviewed By: dlvhdr

Differential Revision: D21259245

fbshipit-source-id: 8b7cf37caa21024af6345d42bb271b5e1a2c4218

Add Ingress to logs that get saved as artifacts on test failure

Summary: Ingress logs will probably be useful for debugging the no RAR error

Reviewed By: ymasmoudi

Differential Revision: D21300860

fbshipit-source-id: 9a98622fed2bfea9f2a253dc7f84e469f170974d

Adding of workflows User Interface (#2339)

Summary:
allow-large-files

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2339

Pull Request resolved: https://github.com/facebookincubator/symphony/pull/555

Adding Frinx Workflows User Interface - basic functionality taken from https://github.com/FRINXio/frinx-workflow-ui

Code is un-linted and not flow-ed. Code will be corrected in the next iteration.

![list](https://user-images.githubusercontent.com/4011326/80212832-82dc7d00-8638-11ea-80ab-690aaed6d6b4.png)
![builder](https://user-images.githubusercontent.com/4011326/80212837-84a64080-8638-11ea-90aa-fcce268e7a5d.png)
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1547

Reviewed By: Mokon

Differential Revision: D21286872

Pulled By: KenG98

fbshipit-source-id: 7d7a0a4716c6eda95736b0fc9a4cfc137347b117

Magmad Go extend generic command & network tests formatting options (#1583)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1583

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2340

Magmad Go extend generic command & network tests formatting options, also commands bug fixes

Reviewed By: themarwhal

Differential Revision: D21299121

fbshipit-source-id: 3b3b78270749148bbd60b004e80115f0ec6b5523

Updating mobilityd IP desc store per subscriber (#1574)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1574

This diff:

- Updates SID => IPs map to SID => IPDesc instead of SID => [IPDesc] as each <Subscriber,APN> composite key should allow only one IP allocated.
- Updates IP desc store persistance in redis as `IMSIxxx.<apn_name>:mobilityd_ip_desc_record` for stateless mobilityd
- Updates composite key for subscriber to `IMSIXXXX.<apn_name>` on ip_allocator

Reviewed By: xjtian

Differential Revision: D21262424

fbshipit-source-id: e24d6217047a10d12c7a0845d87495302a879749

Some log adjustments (#1585)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1585

- remove "IMSI" from some logs because the imsi variable already contains the prefix
- The log `MLOG(MDEBUG) << "Running update_sessions";` is slightly confusing because it sounds like it's talking about cloud updates when it is about session store
- Some ReAuthAnswer result conversion so that it's easier to understand

Reviewed By: andreilee

Differential Revision: D21301475

fbshipit-source-id: fd6517f0b50f2e67c1efcebe44931c89d2caa760

Use the same ReAuthResult message for both Gx and Gy ReAuthAnswer (#1584)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1584

We had the same proto message defined
```  enum Result {
    UPDATE_INITIATED = 0;
    UPDATE_NOT_NEEDED = 1;
    SESSION_NOT_FOUND = 2;
    OTHER_FAILURE = 3;
  }
```
For both Gx and Gy reauth so consolidating to use the same one.

Reviewed By: uri200

Differential Revision: D21301678

fbshipit-source-id: 23d80ae737d6ad6edc27e21f769a608e8e910559

Always allow to mutate report filters (#556)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/556

As title.
Permissions are for real data (inventory, workorder). It should not apply for UI representation things like report filters

Reviewed By: AmitArbel

Differential Revision: D21300431

fbshipit-source-id: 5e87aa28bb5c91338f9865d7f4408ef82ca69805

Fix the sync_rpc_client test

Summary: Existing sync_rpc_client test was racy and made implicit assumptions on the arrival of response. Fixing the test by checking for request id in the sync rpc client's terminated reqs rather than failing based on arrival of response.

Reviewed By: xjtian

Differential Revision: D21289780

fbshipit-source-id: 51cda3a0d605eaba279bb54dbd28aeba27350129

Add add_sessions RPC method to AAA server to allow re-creating sessions

Summary:
This method will be called by sessiond on service restart to recreate AAA sessions.
This is particularly useful for HA failovers, as the AAA server only stores sessions in memory.

Reviewed By: themarwhal

Differential Revision: D21297525

fbshipit-source-id: 7a6d5f1f994b1b70a3f88d400811786a1c89e777

Re-add sessions to AAA server on stateless sessiond restart (#1586)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1586

This diff adds logic to re-create AAA-server sessions on sessiond restart.
This is only used for CWF sessions when sessiond is running with stateless configured.
After a failover, sessiond is restarted. This restart will trigger a re-creation of flows
in pipelined and now a re-creation of AAA server sessions.

Reviewed By: themarwhal

Differential Revision: D21297546

fbshipit-source-id: 51a63993c6b5fb4905b1444c3ba9db6688e1ce44

Switch gy integ tests to use ocs mockdriver (#1579)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1579

Switch gy integ tests to use ocs mockdriver

Reviewed By: themarwhal

Differential Revision: D21298491

fbshipit-source-id: f93f20b5f03d520ce58e6025ef8f6f5e588a892d

Fix redis disconnect bug for RedisStoreClient in sessiond (#1588)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1588

This diff attempts to reconnect to Redis before reading or writing
if the Redis client is unconnected. This should fix an issue where the redis
client gets disconnected but redis is still available. This was happening often,
causing sessiond do unnecessarily crash loop.

Sessiond will still crash if Redis is unavailable.

Reviewed By: andreilee

Differential Revision: D21317580

fbshipit-source-id: 5c7da144159343f19cfc29aee517ad7a4c058713

Fix containerID lookup bug for CWAG's health service (#1590)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1590

When trying to start and stop the RADIUS server, both
the radius and radiusd containers were being returned by the
lookup. This caused `radiusd` to often be manipulated rather
than the intended radius server. This diff fixes that bug.

Reviewed By: koolzz

Differential Revision: D21317647

fbshipit-source-id: c139ca9d83f934b46f9f27e381fe741dbeed9b21

Support FUA redirect and restrict in Mock OCS (#1591)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1591

Support FUA redirect and restrict in Mock OCS

Reviewed By: themarwhal

Differential Revision: D21298493

fbshipit-source-id: 829579fd8058d33f3b10540cb73155cf57f24226

Change permission error to more indicative message (#559)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/559

`ent/privacy: deny rule` is not indicative message

Reviewed By: vdorfman

Differential Revision: D21323093

fbshipit-source-id: ecc62ca5636b71ce5d201e4e2757d7281ca41bf3

Change platform-server to pass new roles in http requests (#557)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/557

The platform-server service has the following values for roles:
1. superuser
2.user

The graph service has the following values for roles:
1. owner (like superuser)
2. admin
3. user (like user)

Right now graph does the translation between roles. This prevents us to use the full range of roles in inter-service communication and also makes our testing complicated.
So this diff changes the translation to be in platform-server

Reviewed By: vdorfman

Differential Revision: D21305378

fbshipit-source-id: 5e9d604be2d6c4c3c1bdb51891d9259b6d9eae2d

Fixing looks

Summary: `<a>` tag's styling is being overriden when have no `href` attribute.

Reviewed By: dlvhdr

Differential Revision: D21309731

fbshipit-source-id: 97b943cde3fd5f3fd6ea51c0ff68472d3f3eb72f

Switch

Summary: Adding Switch to the Design System

Reviewed By: dlvhdr

Differential Revision: D21261832

fbshipit-source-id: 4fceb10350c4ffe955625b13b6f0408e3453b430

Fix relay updater flow type

Summary: $title

Reviewed By: AmitArbel

Differential Revision: D21275520

fbshipit-source-id: 25fa07ab01a8ddcdf20e743c2ddc9146bdb80a02

Fix store type in RelayEnvironment and remove $FlowFixMe

Summary:
I fixed this when I upgraded our relay-runtime library.

I found out the flow type we should use by looking at the open source code:

Store:
https://github.com/facebook/relay/blob/b475e7d8631d985a8f685eb777d8dee9375969ac/packages/relay-runtime/store/RelayStoreTypes.js#L750

commitMutation: https://github.com/facebook/relay/blob/b475e7d8631d985a8f685eb777d8dee9375969ac/packages/relay-runtime/mutations/commitMutation.js#L81
Like
•Edit

Reviewed By: tcirstea

Differential Revision: D21277595

fbshipit-source-id: e3add390b196b70af95f27061e2ac06364a27798

Fixing confusion in types

Summary:
used `mixed` in declaration and usage and `string` in instance.

Just fixing the flow error.
Need to consider using actual type.

Reviewed By: dlvhdr

Differential Revision: D21325807

fbshipit-source-id: 292059c081f3137c71a37f8ab8a724acd4157b4e

Fixing wrong text cut in tables

Summary: Since is implemented as a text varianted button, need to specify the need of using ellipsis

Reviewed By: dlvhdr

Differential Revision: D21324745

fbshipit-source-id: 988102fa01bee928e6dcdad42821f6f282b11035

Quering data from server

Summary: just querying and showing in table at this stage.

Reviewed By: dlvhdr

Differential Revision: D21175017

fbshipit-source-id: d84f81dc0039220ec3b9819edd139fed3fcd2eff

Supporting drop-down options button

Summary:
Plus, updating the story
Is used in next diff (D21249473)

Reviewed By: dlvhdr

Differential Revision: D21176033

fbshipit-source-id: 122b290e0a1666bd6164143c41c9058471e4e701

Refactoring ActionButtons prop.

Summary:
Adressing the comment here:
https://our.intern.facebook.com/intern/diff/D21176033/?transaction_id=236358750942458

Reviewed By: dlvhdr

Differential Revision: D21315680

fbshipit-source-id: b4784cfa4200d5027e3f23ca860ef0c5f10e1c17

Refactor viewer to be an interface (#558)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/558

Right now viewer is tied to a user and you can't perform operations on ents if you're not a user.
This approach can't work for automations.
In this diff I make viewer an interface.
Specific (And very small number right now) GraphQL resolvers that needs the viewer to be user to perform their operations will first check if `Viewer` is actually `UserViewer`

Reviewed By: vdorfman

Differential Revision: D21313030

fbshipit-source-id: 62a92a83f5b8ce04801984ce66e9b2585d8cb330

Create a new automation viewer (#560)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/560

Use it in two places:
1. A new way (with the appropriate http header "x-auth-automation-name") to authenticate to graph with no user
2. Run EntScript with this viewer

**Very important**: you can't connect with automation viewer outside our deployment environment so there are no security concerns here

Reviewed By: vdorfman

Differential Revision: D21313451

fbshipit-source-id: 708c040054eaf0aa8a55b8dd02b0196bbb3195dd

Es6 lambda support (#1592)

Summary:
+ a small ui positioning fix
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1592

Reviewed By: joemin

Differential Revision: D21327947

Pulled By: KenG98

fbshipit-source-id: aaa90686b3d32774836ef2cc57f0310005d94a63

Gx/Gy client fixed to use lastDiamMessageReceived from PCRF/OCS (#1587)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1587

This diff exposes the last message received on PCRF and OCS. This way we can see the
message we sent without the need to make the Gx/Gy methods publics just for test purposes

Reviewed By: themarwhal

Differential Revision: D21312513

fbshipit-source-id: b82a3b9946e6cf5890c70e6bd3bdf68a5ab5116d

Updating enodebd get_status # of enodeb connected output (#1593)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1593

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2342

- For `get_status` call on enodebd service, when an enodeb is disconnected the summarized output is not updated.
- This diff updates the aggregation of all eNodeb status to handle this case correctly.
- Also the `eNodeb connected` message on `enodebd_cli` is updated to specify connection via TR069 for clarity.

Reviewed By: themarwhal

Differential Revision: D21309803

fbshipit-source-id: e0772f61f994491ae8b27b50c9b580421656e6ef

Reorder assertions so that the test is more reliable (#1594)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1594

For this test, since we generate traffic for >100% of the quota given to trigger the FUA, the test flow should be
1. Setup expectation for CCR-I
2. Trigger an authentication to trigger a CCR-I
3. Assert expectations for CCR-I
4. Setup expectation for CCR-T
5. Generate traffic to trigger the FUA, which in this case is a terminate
(Here it can take up to 5 seconds for the full termination to go through)
6. Assert expectations for CCR-T
7. Check pipelined usage to assert the record is gone.

Reviewed By: ssanadhya

Differential Revision: D21326462

fbshipit-source-id: a8b045fffb68d4aba3343ef92937f18db256d42b

Release Notes

Summary:
Release Notes

Created from Diffusion's 'Open in Editor' feature.

Differential Revision: D21331182

fbshipit-source-id: 0819303af37e39ecb306120a52515b2831d832c7

Increase GRPC timeout on CWF operator's health client

Summary:
This diff increases the timeout to 10s. This should eliminate
the infrequent failovers caused from unnecessary timeouts.

Reviewed By: themarwhal

Differential Revision: D21317690

fbshipit-source-id: e9b7a9c4559e2f1a97d9cf4efe7a826a150ff7d2

Fix incorrect error being logged in CWF Operator

Summary: We were logging the wrong error for initialization errors.

Reviewed By: themarwhal

Differential Revision: D21317737

fbshipit-source-id: a1eaa011478b111872e67c83f9e13192567b01be

Add gx test for FramedIPv4AddrRequiredEnv (#1582)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1582

- Adding a unit test for this feature to cross off the item from CWF test coverage
- When `FramedIPv4AddrRequiredEnv` and `DefaultFramedIPv4AddrEnv` are  set, the ip addr in the CCR should be overwritten, and no `FramedIPv6Prefix`  should be sent.

Reviewed By: uri200

Differential Revision: D21302225

fbshipit-source-id: 65e8e14ee62fe9f44f1b8bb6374edeb8ab3e802f

NMS Settings

Summary:
Allows admin users to edit the NMS environment-variable settings. This includes connection strings, hostnames for external services, etc.

Settings are stored as JSON in the same format as the .env file (flat, all values are strings).

```
{
 "LOG_LEVEL":"debug"
}
```

Settings stored in the JSON file are then used to override the settings which come from the .env file. My logic is this: the .env file is created once during deployment and often never changed. Then the user can change and override them to match their own setup.

The order of precedence is so:
cli vars <- nms settings <- env vars <- JS defaults

CLI vars are always the highest precedence, this allows the admin to override or undo bad settings introduced via the settings page.

After the settings file is saved to the disk, the NMS will either restart itself, or wait for nodemon to restart it.

New settings can be added to the settings page by adding them to the list of registered settings in `server/settings/settings.js`. There are some basic validations to help the user configure properly. It's easy to add more in the future as the feature supports more settings.

Screenshot of the UI:
https://pxl.cl/15GDK

Test your settings changes before saving them:
https://pxl.cl/15ZBm

Review your settings changes one last time and confirm the changes:
https://pxl.cl/15SjP

Secret values show/hide:
https://pxl.cl/15GF1
https://pxl.cl/15GF4

Differential Revision: D21237704

fbshipit-source-id: 3c6196832fffd46940daf5a26a937ac7e7208c23

P-CSCF address support (#1576)

Summary:
Added P-CSCF IPv4 and IPv6 address support
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1576

Test Plan:
1.	Verified S1 SIM sanity
2.	Executed 2 new TCs – PR – https://github.com/facebookincubator/magma/issues/1577

Reviewed By: uri200

Differential Revision: D21284675

Pulled By: ulaskozat

fbshipit-source-id: 4a62cc13fa3bbe27db8f619704c200e08802e715

S1 SIM testcase for P-CSCF address (#1577)

Summary:
Added two new S1 SIM Test Cases to test P-CSCF IPv4 and IPv6 address support during attach and secondary PDN establishment
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1577

Test Plan: 1.	Verified S1 SIM sanity

Reviewed By: uri200

Differential Revision: D21284670

Pulled By: ulaskozat

fbshipit-source-id: c1f42edc751894579603d4bc4b3be2bd5992d443

Add SessionState's FSM state to SessionStateUpdateCriteria (#1596)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1596

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2350

- Added `fsm_state` to StoredSessionState
- SessionStore will now keep track of updates to SessionState's `fsm_state`

```
make integ_test TESTS=s1aptests/test_attach_detach_l…
rsarwad pushed a commit to rsarwad/magma that referenced this pull request Jul 30, 2020
Summary: .

Reviewed By: dlvhdr

Differential Revision: D21121450

fbshipit-source-id: 8c1d121b34e4555f93cf63d0b07a665f1f1bc7ef
Signed-off-by: rashmi <rashmi.sarwad@radisys.com>

Adding sort

Summary: .

Reviewed By: dlvhdr

Differential Revision: D21118195

fbshipit-source-id: 490b629cc9ebc23c3b7b602514965745fe3d9299

Fixed memory leaks for attach-detach procedure
Fixed the memory leaks for mme_app timers

Using IconButton

Summary: .

Reviewed By: dlvhdr

Differential Revision: D21129609

fbshipit-source-id: 2ab7cc322f057074ac0d972e164a7169bcb5fffd

symphony: drop buck support for go tests in favor of utd

Summary:
- go builds are not used at all as the actual build runs from circleci.
- go tests have been moved to symphony-go-unit-tests utd job.

TARGETS files were removed by running the following from symphony root:
```
for file in $(find . -name TARGETS); do
    if grep -q 'File generated by gentargets' $file; then
        rm $file
    fi
done
```

Reviewed By: a8m

Differential Revision: D21132019

fbshipit-source-id: 6fb540904434b3396f767bf2fb162e80e7f57a07

symphony/inventory-service-detection/add discovery method field to schema (#520)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/520

added the field, with only one enum value.
in the future we'll add "atrinet" or "network" (didn't want to choose the name now as it might change).

Reviewed By: naor9991

Differential Revision: D21128953

fbshipit-source-id: 401c7ff78790053e7dde882453a3791d24633c46

symphomy/graph: update ent package to latest (#521)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/521

In addition update test code to use generated enttest package when creating clients

Reviewed By: a8m

Differential Revision: D21130009

fbshipit-source-id: d579081bcd9be061f026f5a445376fa802090887

Add conductor proxy skeleton (#1514)

Summary:
* Enable live code reloading in the workflows container
* Add utilities and dependencies for tenant-aware proxy to conductor
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1514

Reviewed By: Mokon

Differential Revision: D21053930

Pulled By: KenG98

fbshipit-source-id: 9097e27be685135513a479aa993933cd9f6f4616

Add variable template sorting option to grafana dashboards (#510)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/510

Variable names can be sorted, and when a dashboard has many networkIDs or GatewayIDs, this can become very useful. Add an option to sort these variable templates alphabetically ascending

Reviewed By: xjtian

Differential Revision: D21095512

fbshipit-source-id: 1b74ec9762cd62bc05bdf35948d51ec3467fcec6

Star precreated dashboards (#511)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/511

If a dashboard isn't starred, it will only show up on the homepage if it is recently viewed. Starring dashboards makes the first visit more user-friendly since they don't have to go anywhere to find the dashboards.

Reviewed By: xjtian

Differential Revision: D21097219

fbshipit-source-id: 205b92028d46c637d40df7675b400567a59cee76

symphony/graph: block delete operation on user ent

Summary: user ent can only be soft deleted (deactivated).

Reviewed By: naor9991

Differential Revision: D21133224

fbshipit-source-id: b21c199c4b8bf10b3e87cb7f36633aa71c289e9a

Magmad local service metrics collector/reporter (#1526)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1526

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2254

Go magmad local service metrics collector/reporter

Reviewed By: uri200

Differential Revision: D21087458

fbshipit-source-id: a352ee109bc023bb6d5966a87773dee70b06aa41

Pass mysql_dialect option in nms helm chart (#525)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/525

Pull Request resolved: https://github.com/facebookincubator/magma/pull/1538

mysql_dialect was added to the docker-compose, but not the helm chart. This allows use of the nms with mariadb.

Reviewed By: xjtian

Differential Revision: D21140730

fbshipit-source-id: c5138a6b51f10d41a158815d1cee7149e5f3eaad

Update orc8r-helm-aws terraform module for new grafana setup

Summary:
- Don't deploy cluster-wide grafana anymore
- Update user-grafana to use separate PVCs

Reviewed By: Scott8440

Differential Revision: D21142961

fbshipit-source-id: bf0ad7d1f87f8df5820034c3ad807a54d1d4e226

Add support for GTP control protocol and GTP echo handling

Summary:
Following patch adds support for GTP control protocol field match and action.
This allows us to handle GTP echo packets and respond it with GTP echo response packets.

Reviewed By: koolzz

Differential Revision: D20909582

fbshipit-source-id: 6cc599020f84e3aaa8c426282d972689122bd005

Fixed memory leaks for attach-detach procedure (#1535)

Summary:
Description:
1. Fixed memory leaks for attach-detach procedure
2. Fixed the memory leaks for mme_app timers
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1535

Test Plan: Executed s1ap tester test suite

Reviewed By: pshelar

Differential Revision: D21132330

Pulled By: ulaskozat

fbshipit-source-id: 4e0efedac6327d3e53e79bb31edfa5d047ff8b9c

Create graphql structure for policies (#526)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/526

based on px in:
https://our.intern.facebook.com/intern/px/p/133B7?artboard=50C45A8D-436F-4513-8EB1-1852756DEBF6

Reviewed By: AmitArbel

Differential Revision: D21112004

fbshipit-source-id: 6349f808036afc95a0ee0d3fabe53640ed53dc14

Define policy ent and add ability to add policy (#527)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/527

In Ent I store either `InventoryPolicyInput` or `WorkforcePolicyInput`.
I enforce in `addPolicy` that only one of them must exist

Reviewed By: AmitArbel

Differential Revision: D21112818

fbshipit-source-id: 5bced1eff2fed761f6013853b23f6a0bc3ae70f8

Add group connection to data model of policies (#528)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/528

This will be used to aggregate policies for user based on his group membership

Reviewed By: AmitArbel

Differential Revision: D21127174

fbshipit-source-id: 205c8329162b86d56ffb925e2709414f1a7508d6

Message Dialog

Summary:
A basic confirmation dialog.

Design: https://our.intern.facebook.com/intern/px/p/11Jz0

**TODO:**
1. Add hook for displaying a MessageDialog.
2. Add FormDialog

Reviewed By: AmitArbel

Differential Revision: D20814765

fbshipit-source-id: 48b64bd170573304ed968432844a603764d20c1c

Work Order property

Summary: A NamedNode property of type WorkOrder.

Reviewed By: naor9991

Differential Revision: D21132874

fbshipit-source-id: fb59cd5c3bec8ac6b02109a2afafd40d809279c6

symphony/graph: adding parent context argument to viewertest.NewContext

Summary: allow us to create viewertest.Context from middlewares

Reviewed By: a8m

Differential Revision: D21153343

fbshipit-source-id: 50ba30da04355af64f26a6b0d29bc204b9887ba0

IM/service types/adding 'isDeleted' bool field (#530)

Summary: Pull Request resolved: https://github.com/facebookincubator/symphony/pull/530

Reviewed By: naor9991

Differential Revision: D21143125

fbshipit-source-id: 0696d6fe16935068354a5c849c1da952cdcf5eba

fix property input sends string ID and fails

Summary:
https://fb.workplace.com/groups/499722490751106/permalink/601294677260553/

- When querying through graphql - there's a middleware to take ids and convert int to string.
- On direct rest calls (like the export) this does not happened. and therefore on properties Input (which by the models, requires an id) this failed.

**EDIT: I thought it might be better to remove the ID altogether, less confusing.**

Made the client send ints as IDs (the server ignores them, it's randomly generated either way)

Reviewed By: dlvhdr

Differential Revision: D21135789

fbshipit-source-id: 0ce36466737d6a73b1acbaba66509fae9740bd6b

symphony/graph: place viewer test files into viewer_test package

Summary: prevent circular dependency when privacy rules are used

Reviewed By: naor9991

Differential Revision: D21153726

fbshipit-source-id: aa039e51d080074a093c675bd9b8251a96ca1657

Supporting Delete

Summary: From GroupCard, admin can delete group.

Reviewed By: dlvhdr

Differential Revision: D21129620

fbshipit-source-id: 780ec9f226e80b2ed3fe143991820b781a7f6cff

symphony: upgrade gqlgen package to 0.11.3 (#503)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/503

- regenerated code
- updated resolver / test to use new apis
- updated txgen template
- updated pagination / node ent templates to new api
- rewrote ocsql to support metrics
- rewrite ocsql to support tracing

Reviewed By: a8m

Differential Revision: D21014305

fbshipit-source-id: d4256971fd30f8c42435a3938718c12724cbcf33

Include "Template" dashboard for nms grafana

Summary: The `networkID` and `gatewayID` variables are fairly difficult to set up correctly, and a user would have a hard time figuring out how to do this if they wanted that feature in a custom dashboard. By providing a template which has a single graph (for variable usage demo), users can simply copy this template then build their dashboard off of this base.

Reviewed By: rckclmbr

Differential Revision: D21145359

fbshipit-source-id: 32befb30c0b1a6d012ebe3f701f676c78f50960d

Cache user ent in viewer (#509)

Summary: Pull Request resolved: https://github.com/facebookincubator/symphony/pull/509

Reviewed By: alexsn

Differential Revision: D21088560

fbshipit-source-id: 441ea329c3472a7c0e97f8a19b0ad6436d6b4fe3

Client Side

Summary: Ability to set a work order property value.

Reviewed By: naor9991

Differential Revision: D21156035

fbshipit-source-id: cf044a1d09c4b3e5ea3323816c03edcb45e30919

Conductor metrics collection (#1523)

Summary:
conductor now pushes metrics into fluentD
fluentD processes the metrics and exposes them for prometheus
prometheus already collects metrics from fluentD

* add prometheus and grafana compose file for local deployment

Signed-off-by: Maros Marsalek <mmarsalek@frinx.io>
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1523

Reviewed By: Mokon

Differential Revision: D21098515

Pulled By: KenG98

fbshipit-source-id: d1124bc98abb03e3a3d4865f5094076d72d7504f

symphony/telemetry: suffix test files package with _test

Summary: https://tip.golang.org/cmd/go/#hdr-Test_packages

Reviewed By: naor9991

Differential Revision: D21154899

fbshipit-source-id: 915776c2c853f7e1b79242b60d326820fc7aa234

Add transformers to conductor tenant proxy (#1536)

Summary:
* Add metadata/taskdefs transformer
* Add metadata/workflow, workflow, workflow/bulk transformers
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1536

Test Plan:
Start docker compose in symphony/integration folder with following yaml files:
* docker-compose.yaml
* docker-compose.conductor.frinx.yaml
* docker-compose.workflows.yaml

Login to fb-test.localhost, obtain connect.sid cookie and call:
```
curl --cookie "connect.sid=<value here>" http://fb-test.localhost/workflows/metadata/taskdefs
```
This should return empty array `[]` and status code 200. Note that fb-test.localhost must be resolved to localhost.

Reviewed By: Mokon

Differential Revision: D21164962

Pulled By: KenG98

fbshipit-source-id: ad4c4e2c35e63c12fe525cc8e331c4d7b9844c51

symphony/deploy: install ca-certificates before running testim

Summary:
testim job currently fails with the following message:
```
Downloading workspace layers

Error downloading workspace layer for job e02b054c-e22f-4bc0-bb0b-38e2d8ee232a. If this is a re-run of an old job, the workspace may have expired.: RequestError: send request failed
caused by: Get https://circle-production-customer-artifacts.s3.amazonaws.com/?list-type=2&prefix=picard%2F5da633ddda1d4a7f21aa751d%2Fworkflows%2Fworkspaces%2F3f87ed8c-8fb0-4384-b1b1-82f0ea5626f1%2F0%2Fe02b054c-e22f-4bc0-bb0b-38e2d8ee232a: x509: certificate signed by unknown authority
```

Following [suggestion](https://support.circleci.com/hc/en-us/articles/360016505753-Resolve-Certificate-Signed-By-Unknown-Authority-error-in-Alpine-images) for resolution.

Reviewed By: hanle11

Differential Revision: D21178966

fbshipit-source-id: a4c714917ea4e697a0d298f5fe51a5e24e674d76

EZ/oncall/export&import /support date_time_local property type (#532)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/532

https://fb.workplace.com/groups/499722490751106/permalink/601294677260553/

Reviewed By: alexsn

Differential Revision: D21175332

fbshipit-source-id: a41fe77048949c8a0295ca1d8e08ae81c91647fe

Use hooks for role-based permissions (#533)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/533

Replace previous logic of using ReadOnly ent client
All rules logic are inside rules.go

The stack of rules for `User Ent`:
* DenyDeletingOfUsers
* AllowWriteForAdmin
* AllowWriteForOwnerOrInWriteGroup
* DenyWrite

The stack of rules for `UsersGroup Ent`:
* AllowWriteForAdmin
* AllowWriteForOwnerOrInWriteGroup
* DenyWrite

The stack of all `other ents`:
* AllowWriteForOwnerOrInWriteGroup
* DenyWrite

Reviewed By: alexsn

Differential Revision: D21065332

fbshipit-source-id: c5023646ae6b10805dd0e4f2ac10d00a8c76e02c

Multiple diameter (integ_test) (1/3) - main.go mockPCRF and mockOCS to support multiple configurations (#1527)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1527

Modified main.go at mockPCRF and mockOCS to support configuring multiple gx and gy connections

Reviewed By: xjtian

Differential Revision: D21094833

fbshipit-source-id: be8fc49bf2c6cb5d536ebd2d4c15223c3fdda423

Multiple diameter (integ_test) (2/3) - Add second scenario for integ_test for OCS2 and PCRF2 (#2296)

Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2296

Pull Request resolved: https://github.com/facebookincubator/magma/pull/1528

Added a second scenario to fab file to be able to run MultiSessionProxy tests.

Modified makefile:
- To prevent MultiSessionProxy when ```make integ_test``` is run we will use golang build tags: MultiSessionProxy tests files will include ```//build !main_integration``` at the top of the file that will prevent its execution when ```make integ_test``` is called.
- To run MultiSessionProxy tests we will have to call ```make multi_session_proxy``` (fab file will take care of set up the right environment for that that)

Modified fab file:
- Added new scenario after the main integ_test is done
- Modified ```_run_integ_tests``` not to clean up in case of success (```clean_up``` will be run at the very end, if we get there)
- Added conditions to run the test by name: MultiSessionProxy will be executed with proper scenario if we run```fab integ_test``` or ```fab integ_test:test_to_run=multi_session_proxy```

Reviewed By: themarwhal

Differential Revision: D21094862

fbshipit-source-id: a6017978dd5121056229c41180a853d42b6a7212

Multiple diameter (integ_test) (3/3) - service_wrapper.go support to select different PCRF and OCS (#1537)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1537

Modify service_wrapper.go and any other files to support selection of OCS/PCRF instance on integ_test

Reviewed By: themarwhal

Differential Revision: D21138579

fbshipit-source-id: 9c26b765bdaae6a84225d9442349f8c470060419

symphony/circleci: fix config file

Reviewed By: hanle11

Differential Revision: D21180460

fbshipit-source-id: 07bb04c8ff8f3eb9d2a94248a72e646a7ec8c2f6

symphony/authz: adding base privacy policy

Summary: authz policy implements ent.Policy interface and adds global pre/post policies wrapping actual policy execution.

Reviewed By: naor9991

Differential Revision: D21180319

fbshipit-source-id: 3588ccdb2f2a98c02307367e5cdf874ece043705

Adding const to format string for OAI logging (#1542)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1542

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2297

- Using `OAILOG_<LEVEL>_UE` macros on C++ throws a warning and stops compilation for `make build_oai`:
```
Warning: ISO C++11 does not allow conversion from string literal to 'char *'
```

- Adding `const` to format parameter fixes this

Reviewed By: uri200

Differential Revision: D21182393

fbshipit-source-id: 2ab14fe256ee548b0ceebb8f4f487aa7a4a78d46

symphony/circleci: downgrade testim docker base image to node:8.15-stretch-slim

Summary: Possible fix for https://github.com/testimio/docker-cli/issues/3

Reviewed By: naor9991

Differential Revision: D21182836

fbshipit-source-id: 8987e26353280b2499e789ee9ff4fbab977e2f0e

Fix errors in writing Auth Info Procedure to redis

Summary:
When `use_stateless` flag is set to true in mme.yml, `test_resync.py` fails as
the state is not written into redis correctly. This change fixes the conversion
of EMM CN procedures to proto messages. Other minor fixes:
- adds missing enb_s1ap_id_key field in the UE context
- replace strncpy with memcpy
- typos

Reviewed By: ardzoht

Differential Revision: D21189696

fbshipit-source-id: 0fb6f55455a8aea9e182ae6c62d7de1a1870b2e9

symphony/cli/pyinventory/api: replace `SearchQuery` by `LocationSearchQuery` in location module (#519)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/519

replace `SearchQuery` by `LocationSearchQuery` in location module for performance improvement

Reviewed By: naor9991

Differential Revision: D21127760

fbshipit-source-id: ac61825afa21c03b82eafc44805a740cb77253e5

symphony/cli/pyinventory: added common package for common data used in project (#522)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/522

added common package for common data used in project
added endpoint module to include existing endpoints

Reviewed By: naor9991

Differential Revision: D21131015

fbshipit-source-id: 1dc18ff0628513811f835f500415cb57ad14e43c

symphony/cli/pyinventory/common: added `data_enum` module (#523)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/523

added `data_enum` module to include existing enums

Reviewed By: naor9991

Differential Revision: D21132068

fbshipit-source-id: 08da6397b9497a0db3ec21a2423df60b35d9b832

symphony/cli/pyinventory/common: added `data_class` module (#524)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/524

added `data_class` module to include existing dataclass

Reviewed By: naor9991

Differential Revision: D21134619

fbshipit-source-id: f86c99eef0dfe6547a931c333cdadcff4b2a3f7b

symphony/cli/pyinventory/common: added constant module (#529)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/529

added constant module to include existing constant values

Reviewed By: naor9991

Differential Revision: D21152002

fbshipit-source-id: 992429124d00e9c7689ba3b83e4100cecccbe62a

Expand UE simulator service to allow for simulating multiple APs (#1544)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1544

Expand UE simulator service to allow for simulating multiple APs

Reviewed By: themarwhal

Differential Revision: D21151079

fbshipit-source-id: 47472ee14c95a361012c72480cd940d5612c7478

Allowing Admin (non Owner) edit admin settings

Summary:
Just need to not enforce edit permissions.
(since only those who allowed to edit are allowed to browse to the view)

Reviewed By: naor9991

Differential Revision: D21186208

fbshipit-source-id: 3ddd0794ccafe41d569bfc89f8d07a4ba64c6dc7

User property (#2294)

Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2294

Ability to set a user as a property value.
After discussing with Naor and Amit, we decided to add the `name` field to `User` and make it a `NamedNode`.

Reviewed By: naor9991

Differential Revision: D21176897

fbshipit-source-id: 5a82a1e1854a1c1580e30dbfbea6574861d31ba5

Mobile App documentation

Summary: Documenting the mobile app.

Reviewed By: apbuteau

Differential Revision: D21199652

fbshipit-source-id: 5a1760e7ffccc52c8328481d47ac400c118ec430

Fix mobile app flow documentation

Summary: ID of the page was incorrect

Reviewed By: idoshveki

Differential Revision: D21200016

fbshipit-source-id: 71aa8d2b2fa24e065d8be89d4804c9bd695e96b4

symphony/graph: adding authz privacy policy

Summary: authz.Policy adds a fixes set of rule to be executes before / after ent specific policy

Reviewed By: naor9991

Differential Revision: D21200140

fbshipit-source-id: fbac036a03326d88b44574628200d6a91242afce

symphony/graph: use atomic.Value to store viewer user

Summary:
current implementation uses a rwlock to protect viewer.user access which is:
- not required for a single pointer
- not taken on all accesses (e.g. viewer.MarshalLogObject, viewer.traceAttrs, etc ...)

Reviewed By: naor9991

Differential Revision: D21200228

fbshipit-source-id: 73026fef8f65e33cf5af153bde8cc86895c1b6d7

Fixing bug in menu item highliting

Summary:
Active menu item needs to be highlighted.
If some of the given views are lack of menu item, menu items might not get highlighted.

Reviewed By: dlvhdr

Differential Revision: D21185931

fbshipit-source-id: b52efbfbc1b1cef9973e6eb66e5c554a4353fe15

Multiple APs Authentication Integ TC (#1545)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1545

Multiple APs Authentication Integ TC

Reviewed By: themarwhal

Differential Revision: D21151979

fbshipit-source-id: 8d7c92e856a56a375c9c559ce435bf399d3fa096

Fix deprecated parser to deal with GraphQL Union type

Summary: As title

Reviewed By: vdorfman

Differential Revision: D21201571

fbshipit-source-id: edcbaea10207705cda12611691faf47388cadde0

Documentation for P0

Summary: {F235028243}

Reviewed By: vdorfman

Differential Revision: D21199260

fbshipit-source-id: 6d9dad5fee2a4aa91ba0a88b7333c06086202023

symphony/cli/pyinventory: bump PyInventory 2.6.1 version (#537)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/537

PyInventory 2.6.1 version

Reviewed By: naor9991

Differential Revision: D21202123

fbshipit-source-id: 4422b72994c78f2af3c739ddc76038c43abd6d5c

Fix doc

Summary:
N/A

Created from Diffusion's 'Open in Editor' feature.

Reviewed By: dlvhdr

Differential Revision: D21203503

fbshipit-source-id: 65486ec72c6497d34435b3477ada406de4a90134

symphony/cli/pyinventory/docs: update PyInventory release notes (#539)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/539

update PyInventory release notes

Reviewed By: naor9991

Differential Revision: D21208104

fbshipit-source-id: e9b6f164d238d22890f653eb92e101d7eadd25c9

Add more debugging tools to LTE AGW's generic command config

Summary:
This diffs adds OVS flows, subscriber table, and health status to
the set of commands that can be run as remote commands. This should aid in
debugging issues where VPN connectivity is not enabled.

Reviewed By: themarwhal

Differential Revision: D21200075

fbshipit-source-id: f4e31363b5b74ef269d361a97904e38daea8cc57

suppress errors in `fbc/symphony/cli`

Summary: Automatic run to suppress type errors.

Reviewed By: dkgi

Differential Revision: D21213724

fbshipit-source-id: 01a2be1a2804a8b4a3bb350409ca20ce2472ca5e

Add event handler API to conductor proxy (#1543)

Summary:
* Add /event API endpoint
* Add explicit list of allowed system task types.
* Change infix separator from '_' to '___'

Event handler proxy is currently not prefixing event names. This will be fixed later.
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1543

Reviewed By: Mokon

Differential Revision: D21191071

Pulled By: KenG98

fbshipit-source-id: d3b6750576e69828c3ed6d3208d8d23299f69633

Rearrange node table view

Summary:
Instead of listing out every node there should be collapsible subsections organized by site.

TODO:
* Add sorting/filtering toolbar at the top? Should the top level filter only filter by site name or also filter nodes?

Reviewed By: aclave1

Differential Revision: D21135831

fbshipit-source-id: 5507922608227b8cb0a6fc3f174d0978f301d1b5

Renaming state_imsi_ht to state_ue_ht (#1549)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1549

- For UE context hashtables, renaming from `state_imsi_ht` to `state_ue_ht`

Reviewed By: uri200

Differential Revision: D21191886

fbshipit-source-id: 9f1a7d35418fc39a4a47f5de08e60e9900ea1818

Add organization handling in react routes for magmalte (#531)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/531

With the addition of organizations, that data needs to be passed into the app at the top level from routes.js. Additionally, some routes needed to be registered for `/grafana` paths.

Reviewed By: murtadha

Differential Revision: D21160932

fbshipit-source-id: 4c8f3ddf8021ccfd17f1e76b7bfe5a527ed39b5b

strongly type renderAsync

Summary: Since now we have types for react-testing-library, renderAsync now returns Promise<RenderResult>.

Reviewed By: mahyali

Differential Revision: D21178878

fbshipit-source-id: d26c5f17b2075337bf9124c3d066ec161f092b00

Update cwf swagger config to not require gateway health

Summary:
CWAG creation shouldn't require configuration as these are only
running if active/standby is enabled. We can revisit this once NMS support
for these parameters is added.

Reviewed By: themarwhal

Differential Revision: D21219080

fbshipit-source-id: c820f11578bfb667bc3824324445ece232a68661

Add CWF Dashboards (#540)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/540

CWF Networks have a different set of useful metric queries than lte networks. This adds dashboards (replicating the existing nms dashboards) in Grafana for organizations that contain at least one CWF network.

Reviewed By: xjtian

Differential Revision: D21232817

fbshipit-source-id: 640b575cda7259b4c5bc87eb8424633a5789f75b

Add stop functionality to GRE probe for CWAG health service (#1557)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1557

When a CWAG is demoted, we block ICMP on the eth1
interface to ensure that traffic will properly be re-routed.
Due to this, the ICMP GRE probe will always fail when a gateway
is in standby. This causes the gateway to appear unhealthy.
To avoid this, we stop the probe on gateway demotion and start
the probe on gateway promotion.

Reviewed By: xjtian

Differential Revision: D21219399

fbshipit-source-id: 60e2a4a591710f99f5a72167c3d4d5008cc89832

Add reindex job queue for cross-controller coordination. (#1511)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1511

Unordered job queue for implemented using the `FOR UPDATE SKIP LOCKED` clause available in Postgres and Maria.

Populating the job queue is an exactly-once operation. We handle this in two parts

- <= 1 -- the job queue jobs are written as part of a tx that checks the "stored" indexer versions, and these stored versions are updated the the "desired" versions during the same tx, ensuring no more than one controller instance will write to the job queue per code push
- >= 1 -- this work is best suited for a future where we have a message broker in the orc8r, so for now each controller warning-logs either success or failure to write to the job queue, and manual inspection of the logs would be required (thankfully, we also have tests to ensure this doesn't happen in the expected case)

Reviewed By: xjtian

Differential Revision: D20242297

fbshipit-source-id: 50b85580cb8ab545a507613d33a85764a882907f

Add load criteria to Search in support of ListKeysByNetwork.

Summary:

State indexers' reindex method needs to pass all known state, independent of network, through the indexer to be reindexed. We currently have no way to get a list of all state/state IDs in a cross-network context. `ListKeysByNetwork` us the hook to get cross-network state IDs, which can then be converted to state on a per-network basis via the normal methods.

The easiest way to get all keys is to use the existing `Search` method, so we
- update `Search` to (a) allow nil network filters and (b) function correctly when all filters are nil (return all blobs)
- update `Search` to support a load criteria -- in this case, whether to load blob values
- add a default method `ListKeysByNetwork` as a wrapper around `Search` with nil filters and a "no values" load criteria

Reviewed By: xjtian

Differential Revision: D21027151

fbshipit-source-id: 8e66ce61bfcfebe9475bfbfd6fa897a583f3789f

Multi Diameter - Use Multi diameter type only when more than one server is configured (#1554)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1554

When only one server is configured, there is no need to use ```NewCentralSessionControllers``` (with an S)

With this diff when only  one server is configured (that s the most common casse), we will keep using the same type we were using ```NewCentralSessionController``` (no s).

Reviewed By: emakeev

Differential Revision: D21222677

fbshipit-source-id: cae820223f9db6ceab1398cd7e23531eae70516c

Add setup image to readme (#1558)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1558

Adding the cwf integ test setup image to the readme.

Reviewed By: mpgermano

Differential Revision: D21235328

fbshipit-source-id: 956e02f0664e3be1348d389c483db89093061f52

Fix for D21222677 (#1559)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1559

Fix for some code left over

Reviewed By: tmdzk

Differential Revision: D21242633

fbshipit-source-id: 7c780b3a46c3f7f6d7407198690758f562c70849

Add CircleCI config for transferring service logs (#1548)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1548

For cwf integ test, we will store service logs as built artifacts on test failure.

Reviewed By: xjtian

Differential Revision: D21029033

fbshipit-source-id: 4a14cc9dbf314341039c611174f687d3bd0ca257

Supporting spaces (#518)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/518

supporting searching in multiple fields using space (i.e. using term "John Doe" for user with firstName "John" and lastName "Doe").

Reviewed By: naor9991

Differential Revision: D21120798

fbshipit-source-id: 49b01c74c41057e71bf7696ec4bb2608b7d4d6e2

Filtering out Deactivated users (#517)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/517

When searching for users, Deactivated users should be ignored (as if deleted).
Yet, if for some reason, search including Deactivated would be required - it is supported (just need to pass `includeDeactivated: true`).

Reviewed By: naor9991

Differential Revision: D21121540

fbshipit-source-id: 02c5accfa0b34b52bda5cd30261ee0e78572ad29

CWF and XWF ansible use service instead of systemctl (#2308)

Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2308

Pull Request resolved: https://github.com/facebookincubator/magma/pull/1551

There is problem to run this ansible in machines without systemd. I hit this problem trying to run it on xwfm docker in circleci environment. In other systems where systemd is working, service is just wrapper to systemctl, so it shouldn't metter.

Reviewed By: mpgermano

Differential Revision: D21210098

fbshipit-source-id: d1851b4a1500cc2dfb382dca9400f033e7d6dedd

Add ability to run graphql compiler tests not via buck

Summary: For easier development of the graphql compiler

Reviewed By: vdorfman

Differential Revision: D21245534

fbshipit-source-id: b4b82818e5a1f5ce44d4b54aa40f0f1208558e52

Show all pyinventory versions in UI

Summary: This way when we release version 3.0.0. Partners can choose to install 2.*.* versions if they'd like

Reviewed By: vdorfman

Differential Revision: D21235166

fbshipit-source-id: 1a3a4fd092bf8bba705d57e507827bc4ea41f1e8

Small design fixes

Summary:
* Projects "No search results" wasn't centered
* Project template cards layout

Reviewed By: AmitArbel

Differential Revision: D21249540

fbshipit-source-id: 7e98345ff110f144be3cac74b5bda4181fd3b80c

Return aggregated permission policies (#535)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/535

Here I only return it in graphql resolver.
In next diffs, I'll set using it for ent privacy rules

Reviewed By: alexsn

Differential Revision: D21178210

fbshipit-source-id: 6f5a697e0ed66af4620d9ae3f2afd9716af62aec

Introduce build/deploy script

Summary: Introduce build/deploy script for embedded magma

Reviewed By: emakeev

Differential Revision: D21213624

fbshipit-source-id: ea7e19db05dcb2b1d917b3b12f0f984b8b15103b

Add logging inside generated code (#541)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/541

This simplifies our code significantly

Reviewed By: vdorfman

Differential Revision: D21227695

fbshipit-source-id: 09a42f281736aa4ee963766847364eadd40f7f54

sgw_handler: gtp: remove GTPv1u task handler

Summary: This unused code.

Reviewed By: ardzoht

Differential Revision: D21151373

fbshipit-source-id: 3da83224be5fc7e9ef6ee95d39e824c6ab1a35c9

Adding images to checklistitem (#512)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/512

- Added `files` to TechnicianWorkOrderUploadDataMutation
- Updated `createAddedCheckListItemFiles` to use `mimeType` in the `ContentType`
- Updated unit test

Reviewed By: apbuteau

Differential Revision: D21100834

fbshipit-source-id: 51749d0b5283fb9c80e45528939cbbf5a512fc82

Format label values properly (#1556)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1556

The label for "days" (e.g. 7 days indicating this data covers a week: https://pxl.cl/15FP0), was actually being formatted as `\u0007`. Convert the int to a string properly to fix this.

Reviewed By: xjtian

Differential Revision: D21232466

fbshipit-source-id: 30ff68978234215483735e346f592035eb23f773

SGW: remove dead code related SDF marking

Summary: This code was never enabled and it can not be used with OVS datapath.

Reviewed By: ssanadhya

Differential Revision: D21151135

fbshipit-source-id: b65919dbb40a3764df12cddbf05a84685bec65e6

organizations nms documentation

Summary: Documentation on the new organizations feature, including what steps to take to upgrade.

Reviewed By: xjtian

Differential Revision: D21159104

fbshipit-source-id: a0dad61b47fe59bf8a4c33d860d6b55fcc4d4415

Grafana nms documentation

Summary: Documentation on Grafana including how to access

Reviewed By: xjtian

Differential Revision: D21167170

fbshipit-source-id: 98faddc751181e116aa27a4e7d4885edb59114b4

Fix pipelined pylint error (#1565)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1565

resolved several lint errors

Reviewed By: andreilee

Differential Revision: D21255292

fbshipit-source-id: 7e4cf5c62a2169ab1cae909569ea54461259350b

Fix li_mirror radius fwd bug (#1555)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1555

li might not be setup, in that case don't mirror radius

Reviewed By: uri200

Differential Revision: D21225432

fbshipit-source-id: d498c37f791ac94224149529b6316fd2c97ef37d

Fix arp table restart recovery bug (#1561)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1561

We don't always have redis infromation for subscriber IP address(when there was no dhcp handshake), so check if IP is saved before insalling rules.

Reviewed By: karthiksubraveti, themarwhal

Differential Revision: D21246666

fbshipit-source-id: 8e75c97d5287e2790f64044563bf358c389e4ea5

Documentation for default APN

Summary: There is no clear documentation on which APN to use by the UEs to gain access to Magma AGW. This commit explicitly states the default APN supported out of the box.

Reviewed By: themarwhal

Differential Revision: D21233368

fbshipit-source-id: f85da09f12499ddfaeb9792e827492e29a6b5d22

S1sim testcase for multiple RARs (#1540)

Summary:
This PR has a new S1 SIM testcase to test multiple RARs
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1540

Test Plan:
1.Executed the new testcase on latest master
2. Verified S1 SIM sanity suite

Reviewed By: ardzoht

Differential Revision: D21232760

Pulled By: ulaskozat

fbshipit-source-id: 83d8c349e94a6b5ff595da10980600e34cface2b

Null check on axios response (#549)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/549

The axios error response is not guaranteed to have a "response" field, so we should check if it exists before referencing it.

Motivation: There's a weird error where axios is throwing during some call, however every call is in a try/catch block. My hunch is that the reference of `error.response.status` is throwing inside the error block because `error.response` doesn't exist.

Reviewed By: tcirstea

Differential Revision: D21269460

fbshipit-source-id: e0855dd3a9a53ccd577a8223cbb92684a9da9e59

use machine instead of private images for build

Summary: We were using private images hosted on jfrog to build. Rolling back to use classic CircleCI machine node

Reviewed By: uri200

Differential Revision: D21271187

fbshipit-source-id: 410e968604851b9be6d20a5d6705a2225adab405

Updating use_stateless check usages (#1550)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1550

- When writing UE context on MME tasks, we can save a function call to pull up the state pointer by preemptively using `persist_state_enabled` flag on SPGW and MME state managers.

Reviewed By: ssanadhya

Differential Revision: D21191885

fbshipit-source-id: 07ba8be34ccebed148d4835b61da462f8c64a21b

Magmad service implementation (#1560)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1560

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2313

Implementation of magmad service in magmad
with service start/stop, tail logs, etc.

Reviewed By: uri200

Differential Revision: D21244516

fbshipit-source-id: 83c38480195eebf136efcfc663408be32e68fa05

Cleanup enf stats state on restart (#1569)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1569

This would error out on some restart recovery cases

Reviewed By: mpgermano

Differential Revision: D21261991

fbshipit-source-id: 18706490401f00d2b0fc89fa045ab61887b26630

Table view skeleton

Summary:
No data yet.
Will be added in D21175017

Reviewed By: dlvhdr

Differential Revision: D21118136

fbshipit-source-id: 63047016e6be61aabd3b1b1d63ffb51e42254987

Adding permissionsPolicies query (#534)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/534

Allowing fetching all Policies in system.
For Policies table

Reviewed By: naor9991

Differential Revision: D21173878

fbshipit-source-id: 046f785715eec59f5b0ecd9319136d57592d7012

User property

Summary:
Option to set a user to a property.

**Note: there's a small downside to this approach. When you first select a user from the dropdown, its email is displayed. When you then refresh the work order you will see the user's name. This is because all the property related components are not using fragments. So I couldn't use them in order to fetch the email field just for the `User` `NamedNode`**

Reviewed By: AmitArbel

Differential Revision: D21177734

fbshipit-source-id: ee776118b830df4f992e5d6b695b9295c7c0a9d1

symphony/end-point-type/ jobs handler

Summary:
added a new handler + router
next diff the logic is added

Reviewed By: naor9991

Differential Revision: D21114269

fbshipit-source-id: 996a9bed9b3d8e833dabbf2d64674c7e123884cc

services/ move 'discover-method' filed from instance to type (#550)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/550

the deleted field is optional and is not written to (no prod ent should have value there) is it ok ? alexsn a8m

Reviewed By: naor9991

Differential Revision: D21275082

fbshipit-source-id: 31067983190ed16a5ba60e3cdaa1ac44dc9e9288

Delete user_management feature flag

Summary:
I opened the feature flag for our partners.
I'll wait until Tuesday to see no major issue reported and I'll ship it

Reviewed By: AmitArbel

Differential Revision: D21249210

fbshipit-source-id: 530f25a96900d5b236bf58a1d049df066fdc71ff

Fix event publishing in conductor proxy (#552)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/552

Fix various issues in conductor proxy, most notably:
* Event handler prefixing
* Workflow,taskdef deletion
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1563

Reviewed By: Mokon

Differential Revision: D21266463

Pulled By: KenG98

fbshipit-source-id: 9ab6775e830fea2e0bd99553d8caf4fdf870bd08

Transfer logs on error not success

Summary:
I made a dumb mistake... The return code is 0 on success and non-zero otherwise

fatfingertypo

Reviewed By: karthiksubraveti

Differential Revision: D21276767

fbshipit-source-id: 7fe50b5c3771e64fac32410871f53c32dcfe43ea

Cache permissions in context (#547)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/547

Permissions will be used by all rules so let's cache them

Reviewed By: vdorfman

Differential Revision: D21253958

fbshipit-source-id: d6ec64b5e9d1913a777e4957f3206393161bb92d

Permissions for equipment,location,etc. (#551)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/551

For each ent schema file that will be a corresponding `*_rule.go` file in `authz`
All policies here are based on permissions struct

Reviewed By: vdorfman

Differential Revision: D21257886

fbshipit-source-id: b2ef4c2ede9f198cad41ddcbe5fa3d6a192c9421

Handle nested tasks in workflow proxy (#553)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/553

For decisions and forks

Signed-off-by: Maros Marsalek <mmarsalek@frinx.io>
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1564

Reviewed By: Mokon

Differential Revision: D21267094

Pulled By: KenG98

fbshipit-source-id: cb7b4062ce2662b184e570eecd1681617df914a0

Add new test cases to sanity suite (#1541)

Summary:
Added test_attach_detach_nw_triggered_delete_secondary_pdn.py, test_attach_detach_nw_triggered_delete_last_pdn.py and test_attach_detach_rar_tcp_data.py test cases to sanity suite
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1541

Test Plan: Executed S1 SIM sanity suite

Reviewed By: ardzoht

Differential Revision: D21232764

Pulled By: ulaskozat

fbshipit-source-id: eb759c5a1ef888668b6d4c76ed065741e8ac66a7

Clean up Gx Client Test (#1567)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1567

- About to add a few gx unit tests so trying to clean up a few things
- Let the OS allocate the port by setting it as to 0 initially
- Moving seeding logic to outside of startServer

Reviewed By: uri200

Differential Revision: D21257280

fbshipit-source-id: e520f7c8c0f342d7542078deb848f433b2f2c123

Clean up Gy Client Test (#1568)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1568

Similar to the stack below, cleaning up a few things before adding a few more unit tests.
- Let the OS allocate the port by setting it as to 0 initially
- Moving seeding logic to outside of startServer

Reviewed By: uri200

Differential Revision: D21259629

fbshipit-source-id: a04cadf598df28a2c5d2e84f0af2f1812d55f673

change org name in magma dev setup script

Summary: Since the NMS is splitting with Symphony, fb-test is now created as default for inventory stuff, and magma-test is created as default for NMS stuff. This changes the setup script to reflect that

Reviewed By: karthiksubraveti

Differential Revision: D21282812

fbshipit-source-id: bee9fd41ac6618c27baf20cf0bf3aaf56db6db6c

Make GrafanaClient await axios requests

Summary: This is more idiomatic

Reviewed By: tcirstea

Differential Revision: D21270987

fbshipit-source-id: a051099378cd2b7e2ae10acd7750a97ba91db9df

Multiple diameter (integ_test) - Test to check UE control data flows through the right PCRF and OCS (#1553)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1553

This is a basic tests with the new set up of  2 PCRF and 2 OCS.
The UE gets configured only in one of those PCRF and OCS instances based on its IMSI.
The test consists on single UE sending 500k, reporting to PCRF and OCS and detaching.
The objective is to make sure the data flows through the right instances.

Some generic issues that may need further investigation:
- For some reason OCS and PCRF seems to get the subscribes accounts deleted even before we send the detach. This prevents the credit to be reported properly
- UESim uses only one MAC address, so it is not possible to send traffic from more than one UE. So any tests is currently limited to one single UE in data plane

Reviewed By: themarwhal

Differential Revision: D21147346

fbshipit-source-id: e04dd96bd59e4f9b290dc35a87ac478f7c64b371

Catch error from axios request while building dashboards

Summary: This call to the MagmaV1API wasn't wrapped in a try/catch block and could cause crashes if a 404 was received when trying to get network info.

Reviewed By: tcirstea

Differential Revision: D21287981

fbshipit-source-id: e47ffefe4b8a4f269cec13d4e835a22908b9d28a

symphony/graph/graphql/resolver: added editPermissionsPolicy functionality (#544)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/544

`symphony.graphql` - added `editPermissionsPolicyInput`
`permissions_policy.go` - added `editPermissionsPolicy`
`permissions_policy_test.go` - added `TestEditPermissionsPolicy`

Reviewed By: naor9991

Differential Revision: D21253395

fbshipit-source-id: dff13028dd3f480469f4375b1124ad94bd3daa8d

Transfer logs on failure! Last one

Summary: without the warn_only, it was just exiting the `run(_run_remote_cwf_integ_test)` fab command :o

Reviewed By: tmdzk

Differential Revision: D21286214

fbshipit-source-id: 8536941bf3f74e83345079943e65b5f1fa433066

Hiding behind feature flag

Summary: flag 'user_management_dev'

Reviewed By: naor9991

Differential Revision: D21299941

fbshipit-source-id: ed2cf02f6494f6a4a9cdb6668492c67dffdf5683

symphony/graph: added `usersGroupSearch` functionality (#548)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/548

added `UsersGroupSearchResult`, `UsersGroupFilterType` and `UsersGroupFilterInput` in symphony.graphql
added `users_group_filter` in resolverutil
added `UsersGroupSearch` in resolvers

Reviewed By: naor9991

Differential Revision: D21257077

fbshipit-source-id: c3e7e603c91fd6ba569acf437f81ad30bd8d4fbd

Adding missing mandatory notation (#554)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/554

In InventoryPolicy all attributes are not nullable (recursively).
In WorkforcePolicy, the data attribute is of WorkforceCUD whose all attributes are nullable.
WorkforcePolicy should be recursively not nullable as well.

Reviewed By: naor9991

Differential Revision: D21256486

fbshipit-source-id: c7de89271cfe4241b0adec758e0707a7d3e1a54a

Improve Error message for sending RaR (#1578)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1578

Return err if we have trouble sending a RaR (both OCS and PCRF)

Also just temporarily bump up pcrf/ocs log levels to get more info.

Reviewed By: ymasmoudi

Differential Revision: D21300554

fbshipit-source-id: 290a3d0710ca10ae75eb73b25f94d5e952912aa8

Fixing button's caption being truncated

Summary: See task

Reviewed By: dlvhdr

Differential Revision: D21259245

fbshipit-source-id: 8b7cf37caa21024af6345d42bb271b5e1a2c4218

Add Ingress to logs that get saved as artifacts on test failure

Summary: Ingress logs will probably be useful for debugging the no RAR error

Reviewed By: ymasmoudi

Differential Revision: D21300860

fbshipit-source-id: 9a98622fed2bfea9f2a253dc7f84e469f170974d

Adding of workflows User Interface (#2339)

Summary:
allow-large-files

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2339

Pull Request resolved: https://github.com/facebookincubator/symphony/pull/555

Adding Frinx Workflows User Interface - basic functionality taken from https://github.com/FRINXio/frinx-workflow-ui

Code is un-linted and not flow-ed. Code will be corrected in the next iteration.

![list](https://user-images.githubusercontent.com/4011326/80212832-82dc7d00-8638-11ea-80ab-690aaed6d6b4.png)
![builder](https://user-images.githubusercontent.com/4011326/80212837-84a64080-8638-11ea-90aa-fcce268e7a5d.png)
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1547

Reviewed By: Mokon

Differential Revision: D21286872

Pulled By: KenG98

fbshipit-source-id: 7d7a0a4716c6eda95736b0fc9a4cfc137347b117

Magmad Go extend generic command & network tests formatting options (#1583)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1583

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2340

Magmad Go extend generic command & network tests formatting options, also commands bug fixes

Reviewed By: themarwhal

Differential Revision: D21299121

fbshipit-source-id: 3b3b78270749148bbd60b004e80115f0ec6b5523

Updating mobilityd IP desc store per subscriber (#1574)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1574

This diff:

- Updates SID => IPs map to SID => IPDesc instead of SID => [IPDesc] as each <Subscriber,APN> composite key should allow only one IP allocated.
- Updates IP desc store persistance in redis as `IMSIxxx.<apn_name>:mobilityd_ip_desc_record` for stateless mobilityd
- Updates composite key for subscriber to `IMSIXXXX.<apn_name>` on ip_allocator

Reviewed By: xjtian

Differential Revision: D21262424

fbshipit-source-id: e24d6217047a10d12c7a0845d87495302a879749

Some log adjustments (#1585)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1585

- remove "IMSI" from some logs because the imsi variable already contains the prefix
- The log `MLOG(MDEBUG) << "Running update_sessions";` is slightly confusing because it sounds like it's talking about cloud updates when it is about session store
- Some ReAuthAnswer result conversion so that it's easier to understand

Reviewed By: andreilee

Differential Revision: D21301475

fbshipit-source-id: fd6517f0b50f2e67c1efcebe44931c89d2caa760

Use the same ReAuthResult message for both Gx and Gy ReAuthAnswer (#1584)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1584

We had the same proto message defined
```  enum Result {
    UPDATE_INITIATED = 0;
    UPDATE_NOT_NEEDED = 1;
    SESSION_NOT_FOUND = 2;
    OTHER_FAILURE = 3;
  }
```
For both Gx and Gy reauth so consolidating to use the same one.

Reviewed By: uri200

Differential Revision: D21301678

fbshipit-source-id: 23d80ae737d6ad6edc27e21f769a608e8e910559

Always allow to mutate report filters (#556)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/556

As title.
Permissions are for real data (inventory, workorder). It should not apply for UI representation things like report filters

Reviewed By: AmitArbel

Differential Revision: D21300431

fbshipit-source-id: 5e87aa28bb5c91338f9865d7f4408ef82ca69805

Fix the sync_rpc_client test

Summary: Existing sync_rpc_client test was racy and made implicit assumptions on the arrival of response. Fixing the test by checking for request id in the sync rpc client's terminated reqs rather than failing based on arrival of response.

Reviewed By: xjtian

Differential Revision: D21289780

fbshipit-source-id: 51cda3a0d605eaba279bb54dbd28aeba27350129

Add add_sessions RPC method to AAA server to allow re-creating sessions

Summary:
This method will be called by sessiond on service restart to recreate AAA sessions.
This is particularly useful for HA failovers, as the AAA server only stores sessions in memory.

Reviewed By: themarwhal

Differential Revision: D21297525

fbshipit-source-id: 7a6d5f1f994b1b70a3f88d400811786a1c89e777

Re-add sessions to AAA server on stateless sessiond restart (#1586)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1586

This diff adds logic to re-create AAA-server sessions on sessiond restart.
This is only used for CWF sessions when sessiond is running with stateless configured.
After a failover, sessiond is restarted. This restart will trigger a re-creation of flows
in pipelined and now a re-creation of AAA server sessions.

Reviewed By: themarwhal

Differential Revision: D21297546

fbshipit-source-id: 51a63993c6b5fb4905b1444c3ba9db6688e1ce44

Switch gy integ tests to use ocs mockdriver (#1579)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1579

Switch gy integ tests to use ocs mockdriver

Reviewed By: themarwhal

Differential Revision: D21298491

fbshipit-source-id: f93f20b5f03d520ce58e6025ef8f6f5e588a892d

Fix redis disconnect bug for RedisStoreClient in sessiond (#1588)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1588

This diff attempts to reconnect to Redis before reading or writing
if the Redis client is unconnected. This should fix an issue where the redis
client gets disconnected but redis is still available. This was happening often,
causing sessiond do unnecessarily crash loop.

Sessiond will still crash if Redis is unavailable.

Reviewed By: andreilee

Differential Revision: D21317580

fbshipit-source-id: 5c7da144159343f19cfc29aee517ad7a4c058713

Fix containerID lookup bug for CWAG's health service (#1590)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1590

When trying to start and stop the RADIUS server, both
the radius and radiusd containers were being returned by the
lookup. This caused `radiusd` to often be manipulated rather
than the intended radius server. This diff fixes that bug.

Reviewed By: koolzz

Differential Revision: D21317647

fbshipit-source-id: c139ca9d83f934b46f9f27e381fe741dbeed9b21

Support FUA redirect and restrict in Mock OCS (#1591)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1591

Support FUA redirect and restrict in Mock OCS

Reviewed By: themarwhal

Differential Revision: D21298493

fbshipit-source-id: 829579fd8058d33f3b10540cb73155cf57f24226

Change permission error to more indicative message (#559)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/559

`ent/privacy: deny rule` is not indicative message

Reviewed By: vdorfman

Differential Revision: D21323093

fbshipit-source-id: ecc62ca5636b71ce5d201e4e2757d7281ca41bf3

Change platform-server to pass new roles in http requests (#557)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/557

The platform-server service has the following values for roles:
1. superuser
2.user

The graph service has the following values for roles:
1. owner (like superuser)
2. admin
3. user (like user)

Right now graph does the translation between roles. This prevents us to use the full range of roles in inter-service communication and also makes our testing complicated.
So this diff changes the translation to be in platform-server

Reviewed By: vdorfman

Differential Revision: D21305378

fbshipit-source-id: 5e9d604be2d6c4c3c1bdb51891d9259b6d9eae2d

Fixing looks

Summary: `<a>` tag's styling is being overriden when have no `href` attribute.

Reviewed By: dlvhdr

Differential Revision: D21309731

fbshipit-source-id: 97b943cde3fd5f3fd6ea51c0ff68472d3f3eb72f

Switch

Summary: Adding Switch to the Design System

Reviewed By: dlvhdr

Differential Revision: D21261832

fbshipit-source-id: 4fceb10350c4ffe955625b13b6f0408e3453b430

Fix relay updater flow type

Summary: $title

Reviewed By: AmitArbel

Differential Revision: D21275520

fbshipit-source-id: 25fa07ab01a8ddcdf20e743c2ddc9146bdb80a02

Fix store type in RelayEnvironment and remove $FlowFixMe

Summary:
I fixed this when I upgraded our relay-runtime library.

I found out the flow type we should use by looking at the open source code:

Store:
https://github.com/facebook/relay/blob/b475e7d8631d985a8f685eb777d8dee9375969ac/packages/relay-runtime/store/RelayStoreTypes.js#L750

commitMutation: https://github.com/facebook/relay/blob/b475e7d8631d985a8f685eb777d8dee9375969ac/packages/relay-runtime/mutations/commitMutation.js#L81
Like
•Edit

Reviewed By: tcirstea

Differential Revision: D21277595

fbshipit-source-id: e3add390b196b70af95f27061e2ac06364a27798

Fixing confusion in types

Summary:
used `mixed` in declaration and usage and `string` in instance.

Just fixing the flow error.
Need to consider using actual type.

Reviewed By: dlvhdr

Differential Revision: D21325807

fbshipit-source-id: 292059c081f3137c71a37f8ab8a724acd4157b4e

Fixing wrong text cut in tables

Summary: Since is implemented as a text varianted button, need to specify the need of using ellipsis

Reviewed By: dlvhdr

Differential Revision: D21324745

fbshipit-source-id: 988102fa01bee928e6dcdad42821f6f282b11035

Quering data from server

Summary: just querying and showing in table at this stage.

Reviewed By: dlvhdr

Differential Revision: D21175017

fbshipit-source-id: d84f81dc0039220ec3b9819edd139fed3fcd2eff

Supporting drop-down options button

Summary:
Plus, updating the story
Is used in next diff (D21249473)

Reviewed By: dlvhdr

Differential Revision: D21176033

fbshipit-source-id: 122b290e0a1666bd6164143c41c9058471e4e701

Refactoring ActionButtons prop.

Summary:
Adressing the comment here:
https://our.intern.facebook.com/intern/diff/D21176033/?transaction_id=236358750942458

Reviewed By: dlvhdr

Differential Revision: D21315680

fbshipit-source-id: b4784cfa4200d5027e3f23ca860ef0c5f10e1c17

Refactor viewer to be an interface (#558)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/558

Right now viewer is tied to a user and you can't perform operations on ents if you're not a user.
This approach can't work for automations.
In this diff I make viewer an interface.
Specific (And very small number right now) GraphQL resolvers that needs the viewer to be user to perform their operations will first check if `Viewer` is actually `UserViewer`

Reviewed By: vdorfman

Differential Revision: D21313030

fbshipit-source-id: 62a92a83f5b8ce04801984ce66e9b2585d8cb330

Create a new automation viewer (#560)

Summary:
Pull Request resolved: https://github.com/facebookincubator/symphony/pull/560

Use it in two places:
1. A new way (with the appropriate http header "x-auth-automation-name") to authenticate to graph with no user
2. Run EntScript with this viewer

**Very important**: you can't connect with automation viewer outside our deployment environment so there are no security concerns here

Reviewed By: vdorfman

Differential Revision: D21313451

fbshipit-source-id: 708c040054eaf0aa8a55b8dd02b0196bbb3195dd

Es6 lambda support (#1592)

Summary:
+ a small ui positioning fix
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1592

Reviewed By: joemin

Differential Revision: D21327947

Pulled By: KenG98

fbshipit-source-id: aaa90686b3d32774836ef2cc57f0310005d94a63

Gx/Gy client fixed to use lastDiamMessageReceived from PCRF/OCS (#1587)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1587

This diff exposes the last message received on PCRF and OCS. This way we can see the
message we sent without the need to make the Gx/Gy methods publics just for test purposes

Reviewed By: themarwhal

Differential Revision: D21312513

fbshipit-source-id: b82a3b9946e6cf5890c70e6bd3bdf68a5ab5116d

Updating enodebd get_status # of enodeb connected output (#1593)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1593

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/2342

- For `get_status` call on enodebd service, when an enodeb is disconnected the summarized output is not updated.
- This diff updates the aggregation of all eNodeb status to handle this case correctly.
- Also the `eNodeb connected` message on `enodebd_cli` is updated to specify connection via TR069 for clarity.

Reviewed By: themarwhal

Differential Revision: D21309803

fbshipit-source-id: e0772f61f994491ae8b27b50c9b580421656e6ef

Reorder assertions so that the test is more reliable (#1594)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1594

For this test, since we generate traffic for >100% of the quota given to trigger the FUA, the test flow should be
1. Setup expectation for CCR-I
2. Trigger an authentication to trigger a CCR-I
3. Assert expectations for CCR-I
4. Setup expectation for CCR-T
5. Generate traffic to trigger the FUA, which in this case is a terminate
(Here it can take up to 5 seconds for the full termination to go through)
6. Assert expectations for CCR-T
7. Check pipelined usage to assert the record is gone.

Reviewed By: ssanadhya

Differential Revision: D21326462

fbshipit-source-id: a8b045fffb68d4aba3343ef92937f18db256d42b

Release Notes

Summary:
Release Notes

Created from Diffusion's 'Open in Editor' feature.

Differential Revision: D21331182

fbshipit-source-id: 0819303af37e39ecb306120a52515b2831d832c7

Increase GRPC timeout on CWF operator's health client

Summary:
This diff increases the timeout to 10s. This should eliminate
the infrequent failovers caused from unnecessary timeouts.

Reviewed By: themarwhal

Differential Revision: D21317690

fbshipit-source-id: e9b7a9c4559e2f1a97d9cf4efe7a826a150ff7d2

Fix incorrect error being logged in CWF Operator

Summary: We were logging the wrong error for initialization errors.

Reviewed By: themarwhal

Differential Revision: D21317737

fbshipit-source-id: a1eaa011478b111872e67c83f9e13192567b01be

Add gx test for FramedIPv4AddrRequiredEnv (#1582)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1582

- Adding a unit test for this feature to cross off the item from CWF test coverage
- When `FramedIPv4AddrRequiredEnv` and `DefaultFramedIPv4AddrEnv` are  set, the ip addr in the CCR should be overwritten, and no `FramedIPv6Prefix`  should be sent.

Reviewed By: uri200

Differential Revision: D21302225

fbshipit-source-id: 65e8e14ee62fe9f44f1b8bb6374edeb8ab3e802f

NMS Settings

Summary:
Allows admin users to edit the NMS environment-variable settings. This includes connection strings, hostnames for external services, etc.

Settings are stored as JSON in the same format as the .env file (flat, all values are strings).

```
{
 "LOG_LEVEL":"debug"
}
```

Settings stored in the JSON file are then used to override the settings which come from the .env file. My logic is this: the .env file is created once during deployment and often never changed. Then the user can change and override them to match their own setup.

The order of precedence is so:
cli vars <- nms settings <- env vars <- JS defaults

CLI vars are always the highest precedence, this allows the admin to override or undo bad settings introduced via the settings page.

After the settings file is saved to the disk, the NMS will either restart itself, or wait for nodemon to restart it.

New settings can be added to the settings page by adding them to the list of registered settings in `server/settings/settings.js`. There are some basic validations to help the user configure properly. It's easy to add more in the future as the feature supports more settings.

Screenshot of the UI:
https://pxl.cl/15GDK

Test your settings changes before saving them:
https://pxl.cl/15ZBm

Review your settings changes one last time and confirm the changes:
https://pxl.cl/15SjP

Secret values show/hide:
https://pxl.cl/15GF1
https://pxl.cl/15GF4

Differential Revision: D21237704

fbshipit-source-id: 3c6196832fffd46940daf5a26a937ac7e7208c23

P-CSCF address support (#1576)

Summary:
Added P-CSCF IPv4 and IPv6 address support
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1576

Test Plan:
1.	Verified S1 SIM sanity
2.	Executed 2 new TCs – PR – https://github.com/facebookincubator/magma/issues/1577

Reviewed By: uri200

Differential Revision: D21284675

Pulled By: ulaskozat

fbshipit-source-id: 4a62cc13fa3bbe27db8f619704c200e08802e715

S1 SIM testcase for P-CSCF address (#1577)

Summary:
Added two new S1 SIM Test Cases to test P-CSCF IPv4 and IPv6 address support during attach and secondary PDN establishment
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1577

Test Plan: 1.	Verified S1 SIM sanity

Reviewed By: uri200

Differential Revision: D21284670

Pulled By: ulaskozat

fbshipit-source-id: c1f42edc751894579603d4bc4b3be2bd5992d443

Add SessionState's FSM state to SessionStateUpdateCriteria (#1596)

Summary:
Pull Request resolved: https://github.com/facebookincubator/magma/pull/1596

Pull Request resolved: https://git…
@Scott8440 Scott8440 deleted the export-D16631735 branch September 3, 2020 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants