diff --git a/tests/3NodeTest/Makefile b/tests/3NodeTest/Makefile index b01071b633f433936598d4c13703a8d82881c0e9..e1ddbbecfdd3a7f3ba27d5f21a9be285ab2afeb5 100644 --- a/tests/3NodeTest/Makefile +++ b/tests/3NodeTest/Makefile @@ -5,6 +5,15 @@ clean: ## clean up all resources @docker network remove fredwork test: ## start all containers with docker compose and run the test dockerized - @docker network create fredwork --internal --gateway 172.26.0.1 --subnet 172.26.0.0/16 + @docker network create fredwork --gateway 172.26.0.1 --subnet 172.26.0.0/16 || true @docker-compose -f etcd.yml -f nodeA.yml -f nodeB.yml -f nodeC.yml -f tester.yml -f trigger.yml build - @docker-compose -f etcd.yml -f nodeA.yml -f nodeB.yml -f nodeC.yml -f tester.yml -f trigger.yml up --force-recreate --abort-on-container-exit --renew-anon-volumes --remove-orphans \ No newline at end of file + @docker-compose -f etcd.yml -f nodeA.yml -f nodeB.yml -f nodeC.yml -f tester.yml -f trigger.yml up --force-recreate --abort-on-container-exit --renew-anon-volumes --remove-orphans + +fred: ## Start all containers except the tester so that other clients can access them + @docker network create fredwork --gateway 172.26.0.1 --subnet 172.26.0.0/16 || true + @docker-compose -f etcd.yml -f nodeA.yml -f nodeB.yml -f nodeC.yml -f trigger.yml build + @docker-compose -f etcd.yml -f nodeA.yml -f nodeB.yml -f nodeC.yml -f trigger.yml up --force-recreate --renew-anon-volumes --remove-orphans + +failtest: ## Start the failtest + @docker-compose -f failtest.yml build + @docker-compose -f failtest.yml up --force-recreate --abort-on-container-exit --renew-anon-volumes \ No newline at end of file diff --git a/tests/3NodeTest/failtest.yml b/tests/3NodeTest/failtest.yml new file mode 100644 index 0000000000000000000000000000000000000000..cfd262a0f1769b1a42b97b3c0bbc20f37685d63d --- /dev/null +++ b/tests/3NodeTest/failtest.yml @@ -0,0 +1,18 @@ +version: "3.7" + +services: + tester: + build: + context: ../FailingNodeTest + dockerfile: Dockerfile + image: fred/failtest:local + container_name: failtest + networks: + fredwork: + ipv4_address: 172.26.4.1 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + +networks: + fredwork: + external: true diff --git a/tests/FailingNodeTest/.gitignore b/tests/FailingNodeTest/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..685450e4696e87246cff518266930fd948a3e7ae --- /dev/null +++ b/tests/FailingNodeTest/.gitignore @@ -0,0 +1,3 @@ +venv +.idea +__pycache__ \ No newline at end of file diff --git a/tests/FailingNodeTest/Dockerfile b/tests/FailingNodeTest/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..65bc397be3d93e65e20ca38b161abe66bd7e1ee8 --- /dev/null +++ b/tests/FailingNodeTest/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.7 + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +RUN pip3 install --no-cache-dir -r requirements.txt + +COPY . . + +CMD [ "python", "./main.py" ] \ No newline at end of file diff --git a/tests/FailingNodeTest/Readme.md b/tests/FailingNodeTest/Readme.md new file mode 100644 index 0000000000000000000000000000000000000000..b7689dada64e38e75f3e17f50ece733cb7507558 --- /dev/null +++ b/tests/FailingNodeTest/Readme.md @@ -0,0 +1,11 @@ +Currently this test is expected to fail, because nodes cannot recover from missing updates + +To run this test, go to the 3NodeTest and run `make failtest` + +Command used to generate the pb files: +```bash +# ...Enter some virtualenv... +pip install grpcio-tools +cd ../../proto/client/ +python -m grpc_tools.protoc -I../client --python_out=. --grpc_python_out=. ../client/client.proto +``` diff --git a/tests/FailingNodeTest/certs/ca.crt b/tests/FailingNodeTest/certs/ca.crt new file mode 100644 index 0000000000000000000000000000000000000000..f966b8e7028d614af521fbadf98f4329e00161a2 --- /dev/null +++ b/tests/FailingNodeTest/certs/ca.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDMjCCAhoCCQCX6zxD98jlUTANBgkqhkiG9w0BAQsFADBbMQswCQYDVQQGEwJE +RTEPMA0GA1UECAwGQmVybGluMQ8wDQYDVQQHDAZCZXJsaW4xDDAKBgNVBAoMA01D +QzENMAsGA1UECwwERlJFRDENMAsGA1UEAwwEZXRjZDAeFw0yMDA5MjIxNzA4NTVa +Fw0yNTA5MjExNzA4NTVaMFsxCzAJBgNVBAYTAkRFMQ8wDQYDVQQIDAZCZXJsaW4x +DzANBgNVBAcMBkJlcmxpbjEMMAoGA1UECgwDTUNDMQ0wCwYDVQQLDARGUkVEMQ0w +CwYDVQQDDARldGNkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx1Uh +o/fV22yZa5dD1Ra0WHnl2nSvjF+MlthlBwnW1oFXJYTHBeFY0Y5Iw4CPU+664ZIS +ODit0Vm7zmb8Usvf2ZrZwqwdz9bSWGU8/FzkcEPDJjj/Wh6RHrlvPS2xBTTL6wqq +Moxmy+G9ec7fUT4MFwBDUKzkY0Ft6GDLMvSvqfGlOCOYhdbVS7waEbNxbk442/bp +79w9OkHhW7scKsrbrRwq2lxvlDMfpdbC27wg5affpcqgnD+26cBh5ahBqW5AvBG6 +EX0QFRDv+v2NgQsb3vSTvhIsJlY/j0/+AgqKYtCUUWRvBwTEkgVmHzXvlf4P9cKi +/nOv8kmaLi6VSRxF+QIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAoiHfqXwActenW +IWfomSyguI8U4UTk78uUji689od8Wkd7XJH+s1dw40oE3NFpWx10lkM7n3FfnkSQ +BeVQ8H0VsJvFHp/7E+q2z/x2dwd20YkWwIYlpDSvsMo4RMq8Ef82VTfvnY4yWZJp +7uEcOYqiGj/ks2VvMLtPJ6qJo1ziGt0/D1ExLzGw8f5A73mja/DM9YylZGNYgACm +3qaZdAxZXvknGy1YVAv4IfT8FQWLvS8Urrd6mIPNUkDvWVlL0XUEnU10ufCjzWL2 +atN5aWGz+h51i0/Nb3crZv7jQmM9PRDFfsgP0vqdNrPXloK4FNs/QATDL61kui9A +7+6tXObW +-----END CERTIFICATE----- diff --git a/tests/FailingNodeTest/certs/client.crt b/tests/FailingNodeTest/certs/client.crt new file mode 100644 index 0000000000000000000000000000000000000000..186d7eaad118daaa7f1dc25eb98698a0d6a17e27 --- /dev/null +++ b/tests/FailingNodeTest/certs/client.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDgDCCAmigAwIBAgIJAOB/wjlunWXnMA0GCSqGSIb3DQEBBQUAMFsxCzAJBgNV +BAYTAkRFMQ8wDQYDVQQIDAZCZXJsaW4xDzANBgNVBAcMBkJlcmxpbjEMMAoGA1UE +CgwDTUNDMQ0wCwYDVQQLDARGUkVEMQ0wCwYDVQQDDARldGNkMB4XDTIwMDkyNTE4 +MTk1N1oXDTI1MDkyNDE4MTk1N1owXTELMAkGA1UEBhMCREUxDzANBgNVBAgMBkJl +cmxpbjEPMA0GA1UEBwwGQmVybGluMQwwCgYDVQQKDANNQ0MxDTALBgNVBAsMBEZS +RUQxDzANBgNVBAMMBmNsaWVudDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAN6aKDQMN0xc3p4i9CR6sfmPBcSel9fHPCm0febctKNQ+1z4VItql9EDpYFo +GvaGEuZ1oecCB56IrzdMnZbfOTaCG60Y/VyGTep25zjMe+QhKiqk1oTicjHDW8Nw +Z0WkQ5C7if3dehXLjKW5CtFE+c+HhRGFBYnHLoq+YIcyBYwpfTkCsIsyt2qfkd8S +xQ3pN1OzVxt5zf7OwZZzJG1W5Vs7UL55UDtn97sy3N/y4Kc4CS3jb39VAigJqDkT +/e0VlCbESO5P0hCvaIIUcLODGsMkplLz+kDSHd2wqIXfmqvUJ1hQ+od3E7Wnd3nx +xx+Tgv7sMIlUB37gXnzQ6/5U6iUCAwEAAaNFMEMwCwYDVR0PBAQDAgQwMB0GA1Ud +JQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAVBgNVHREEDjAMhwR/AAABhwSsGgQB +MA0GCSqGSIb3DQEBBQUAA4IBAQA0+RSmLVp5l8x4KdwIQ0c8E5j8kfTq9reQLeiY +qNdp0QMLtNN3NxldkwzTmTcoZHxbPAISyYToajcYZHHwnXExcfqEBTnPIGAy4f9M +N76ZF42UxoNoEPzPlxj5V3JDwQ+zqsjlorS/+zNFjCHsKDApPFhZWBNyexpUYnqs +1wnoNNBdHl7nVcLyb9PGIWYASJhajC7/C+75xbGuKC63lPuFi8HPWfKcTtlc2MIO +NnX4su7TqD9beTyMqqFcVinxvVm8eTeSeJFvgAonjZCF4sN8YLUsZsa4Lzoqi/Bq +ox2lrH02Sm3DkQmA1G9JDo1Dpx5aO9oURTrDvsFHqPSC7dSa +-----END CERTIFICATE----- diff --git a/tests/FailingNodeTest/certs/client.key b/tests/FailingNodeTest/certs/client.key new file mode 100644 index 0000000000000000000000000000000000000000..536df1e870da96eb8a391f6362384ff4d0b96be3 --- /dev/null +++ b/tests/FailingNodeTest/certs/client.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEA3pooNAw3TFzeniL0JHqx+Y8FxJ6X18c8KbR95ty0o1D7XPhU +i2qX0QOlgWga9oYS5nWh5wIHnoivN0ydlt85NoIbrRj9XIZN6nbnOMx75CEqKqTW +hOJyMcNbw3BnRaRDkLuJ/d16FcuMpbkK0UT5z4eFEYUFiccuir5ghzIFjCl9OQKw +izK3ap+R3xLFDek3U7NXG3nN/s7BlnMkbVblWztQvnlQO2f3uzLc3/LgpzgJLeNv +f1UCKAmoORP97RWUJsRI7k/SEK9oghRws4MawySmUvP6QNId3bCohd+aq9QnWFD6 +h3cTtad3efHHH5OC/uwwiVQHfuBefNDr/lTqJQIDAQABAoIBAQCRVwnE4e0BGOnp +Sl0prEqj7LQRapMtudIYUNabc6MltuxICYP5+0DgoYbgdT6Vk3inrEpncDXVVt1A +N+/04A6U/mJfpJ9YWABrg/L4bNq/WsATU8kUvl1dDHbPpoZnPBc5WpmAfakGrf5I +/gaIGIca7xr9E2NIUBqdUCvqWcixd/Wluq65roDi1xwwBlrBYaz2IaLf98Hwqtd0 +cuFKidOMgqEYzIc/9bGL3lv8t5WpNWBGBpP+i4U38/7149MWkrAdpLiMMWd0UuAZ +gXciGFLu2KtqhfgmVuokmfz0ezMh5DQzK/sj6UeMT8q9lLTI4+SUCY3FxJmdFJ5m +FLQiqE1JAoGBAO+PtE/vNbAsUrSjWICLx2+vWVsmfJw+YPgM70a6H/rpN2tf3Zfz +qgs9ojrwXaUpZ0opwDkfRAdxwhdiea19J2py1xpSarEwobbncV7OzyXNBQ65xVGP +vCXD70m0duU2vE4hNemzAykx9t8JdTgz2Pohf0/bj052BcayD3HPlaA/AoGBAO3g +iVooZSjuD2poC1Qf8PJrZH7ruVnbcSw4XRmBtPiM8sOL+K3InZ7A+ooO9XS6sHFQ +/H4BZh1a5HZ3msyHNFLvBMbW5ZLAbUt9KzViqoWg0wkw3Aij+jHM/AcJdD7r5tZu +WVT2KzerepC5t9tPd+DlGCbWB6MXiLd79PmhShybAoGAb+qJyWIuicxbIwrAuOUU +WgfoTd4QDwpRUPDyA+/GKvkzK9WQd4GdKj00AibzCMrr90jEBaumo3ewvi4CPFug +w2k9No3UTE0073b2jt09ByLdvwBov27P7jC4JI3Lkc/dbv6y6if4TRGLjK0ldwk5 +z7lAefVP4M7gafAbqQbalw8CgYEAijibdxDb3xGdUYYNdx9sQWCXr4xHUmhJdZl2 +t3h/8KDt+yRdJpXYyMN3kTsp8177YYzeelVTwaDr+c5723aAt+P9EZETKte3alLc +BZREY4tUtRV39Wla2w8yLuCWdG1c36KVM+IqsJlqiafwpnWhwcM86mwZWfI11fAo +I9lNmBsCgYEAnJswtTyTO2dM2HJsW3sj2ghV7h1JzM7p22q6zC58kuRuAc3fDHM/ +5hxhoi7TLR5KNjmFvYpTdZwjapBFn7JHkx33fZuguvZRTtuCoYHpBq7pJpqRVVlt +GhyAs6e8wMyUx61B4R4tEQ2emUV6+SGM/dRjxh2nm4IhpZya/Da7NrE= +-----END RSA PRIVATE KEY----- diff --git a/tests/FailingNodeTest/client_pb2.py b/tests/FailingNodeTest/client_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..36c39da63d098bebc0e1949353b783fdab5aeb8d --- /dev/null +++ b/tests/FailingNodeTest/client_pb2.py @@ -0,0 +1,1375 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: client.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='client.proto', + package='mcc.fred.client', + syntax='proto3', + serialized_options=b'Z\010.;client', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x0c\x63lient.proto\x12\x0fmcc.fred.client\"S\n\x0eStatusResponse\x12+\n\x06status\x18\x01 \x01(\x0e\x32\x1b.mcc.fred.client.EnumStatus\x12\x14\n\x0c\x65rrorMessage\x18\x02 \x01(\t\"J\n\x15\x43reateKeygroupRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\x0f\n\x07mutable\x18\x02 \x01(\x08\x12\x0e\n\x06\x65xpiry\x18\x03 \x01(\x03\")\n\x15\x44\x65leteKeygroupRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\"+\n\x0bReadRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"\x1c\n\x0cReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\";\n\rUpdateRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"/\n\rAppendRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\t\"\x1c\n\x0e\x41ppendResponse\x12\n\n\x02id\x18\x01 \x01(\t\"-\n\rDeleteRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"E\n\x11\x41\x64\x64ReplicaRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\x0e\n\x06nodeId\x18\x02 \x01(\t\x12\x0e\n\x06\x65xpiry\x18\x03 \x01(\x03\"-\n\x19GetKeygroupReplicaRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\"O\n\x1aGetKeygroupReplicaResponse\x12\x31\n\x07replica\x18\x01 \x03(\x0b\x32 .mcc.fred.client.KeygroupReplica\"1\n\x0fKeygroupReplica\x12\x0e\n\x06nodeId\x18\x01 \x01(\t\x12\x0e\n\x06\x65xpiry\x18\x02 \x01(\x03\"8\n\x14RemoveReplicaRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\x0e\n\x06nodeId\x18\x02 \x01(\t\"#\n\x11GetReplicaRequest\x12\x0e\n\x06nodeId\x18\x01 \x01(\t\"2\n\x12GetReplicaResponse\x12\x0e\n\x06nodeId\x18\x01 \x01(\t\x12\x0c\n\x04host\x18\x02 \x01(\t\"\x16\n\x14GetAllReplicaRequest\"N\n\x15GetAllReplicaResponse\x12\x35\n\x08replicas\x18\x01 \x03(\x0b\x32#.mcc.fred.client.GetReplicaResponse\"-\n\x19GetKeygroupTriggerRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\"H\n\x1aGetKeygroupTriggerResponse\x12*\n\x08triggers\x18\x01 \x03(\x0b\x32\x18.mcc.fred.client.Trigger\"#\n\x07Trigger\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04host\x18\x02 \x01(\t\"M\n\x11\x41\x64\x64TriggerRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\x11\n\ttriggerId\x18\x02 \x01(\t\x12\x13\n\x0btriggerHost\x18\x03 \x01(\t\";\n\x14RemoveTriggerRequest\x12\x10\n\x08keygroup\x18\x01 \x01(\t\x12\x11\n\ttriggerId\x18\x02 \x01(\t\"V\n\x0bUserRequest\x12\x0c\n\x04user\x18\x01 \x01(\t\x12\x10\n\x08keygroup\x18\x02 \x01(\t\x12\'\n\x04role\x18\x03 \x01(\x0e\x32\x19.mcc.fred.client.UserRole*\x1f\n\nEnumStatus\x12\x06\n\x02OK\x10\x00\x12\t\n\x05\x45RROR\x10\x01*s\n\x08UserRole\x12\x10\n\x0cReadKeygroup\x10\x00\x12\x11\n\rWriteKeygroup\x10\x01\x12\x14\n\x10\x43onfigureReplica\x10\x02\x12\x14\n\x10\x43onfigureTrigger\x10\x03\x12\x16\n\x12\x43onfigureKeygroups\x10\x04\x32\xe9\n\n\x06\x43lient\x12Y\n\x0e\x43reateKeygroup\x12&.mcc.fred.client.CreateKeygroupRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12Y\n\x0e\x44\x65leteKeygroup\x12&.mcc.fred.client.DeleteKeygroupRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12\x43\n\x04Read\x12\x1c.mcc.fred.client.ReadRequest\x1a\x1d.mcc.fred.client.ReadResponse\x12I\n\x06Update\x12\x1e.mcc.fred.client.UpdateRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12I\n\x06\x44\x65lete\x12\x1e.mcc.fred.client.DeleteRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12I\n\x06\x41ppend\x12\x1e.mcc.fred.client.AppendRequest\x1a\x1f.mcc.fred.client.AppendResponse\x12Q\n\nAddReplica\x12\".mcc.fred.client.AddReplicaRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12m\n\x12GetKeygroupReplica\x12*.mcc.fred.client.GetKeygroupReplicaRequest\x1a+.mcc.fred.client.GetKeygroupReplicaResponse\x12W\n\rRemoveReplica\x12%.mcc.fred.client.RemoveReplicaRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12U\n\nGetReplica\x12\".mcc.fred.client.GetReplicaRequest\x1a#.mcc.fred.client.GetReplicaResponse\x12^\n\rGetAllReplica\x12%.mcc.fred.client.GetAllReplicaRequest\x1a&.mcc.fred.client.GetAllReplicaResponse\x12n\n\x13GetKeygroupTriggers\x12*.mcc.fred.client.GetKeygroupTriggerRequest\x1a+.mcc.fred.client.GetKeygroupTriggerResponse\x12Q\n\nAddTrigger\x12\".mcc.fred.client.AddTriggerRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12W\n\rRemoveTrigger\x12%.mcc.fred.client.RemoveTriggerRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12H\n\x07\x41\x64\x64User\x12\x1c.mcc.fred.client.UserRequest\x1a\x1f.mcc.fred.client.StatusResponse\x12K\n\nRemoveUser\x12\x1c.mcc.fred.client.UserRequest\x1a\x1f.mcc.fred.client.StatusResponseB\nZ\x08.;clientb\x06proto3' +) + +_ENUMSTATUS = _descriptor.EnumDescriptor( + name='EnumStatus', + full_name='mcc.fred.client.EnumStatus', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='OK', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ERROR', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1386, + serialized_end=1417, +) +_sym_db.RegisterEnumDescriptor(_ENUMSTATUS) + +EnumStatus = enum_type_wrapper.EnumTypeWrapper(_ENUMSTATUS) +_USERROLE = _descriptor.EnumDescriptor( + name='UserRole', + full_name='mcc.fred.client.UserRole', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='ReadKeygroup', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='WriteKeygroup', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ConfigureReplica', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ConfigureTrigger', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ConfigureKeygroups', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1419, + serialized_end=1534, +) +_sym_db.RegisterEnumDescriptor(_USERROLE) + +UserRole = enum_type_wrapper.EnumTypeWrapper(_USERROLE) +OK = 0 +ERROR = 1 +ReadKeygroup = 0 +WriteKeygroup = 1 +ConfigureReplica = 2 +ConfigureTrigger = 3 +ConfigureKeygroups = 4 + + + +_STATUSRESPONSE = _descriptor.Descriptor( + name='StatusResponse', + full_name='mcc.fred.client.StatusResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='status', full_name='mcc.fred.client.StatusResponse.status', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='errorMessage', full_name='mcc.fred.client.StatusResponse.errorMessage', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=33, + serialized_end=116, +) + + +_CREATEKEYGROUPREQUEST = _descriptor.Descriptor( + name='CreateKeygroupRequest', + full_name='mcc.fred.client.CreateKeygroupRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.CreateKeygroupRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='mutable', full_name='mcc.fred.client.CreateKeygroupRequest.mutable', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='expiry', full_name='mcc.fred.client.CreateKeygroupRequest.expiry', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=118, + serialized_end=192, +) + + +_DELETEKEYGROUPREQUEST = _descriptor.Descriptor( + name='DeleteKeygroupRequest', + full_name='mcc.fred.client.DeleteKeygroupRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.DeleteKeygroupRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=194, + serialized_end=235, +) + + +_READREQUEST = _descriptor.Descriptor( + name='ReadRequest', + full_name='mcc.fred.client.ReadRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.ReadRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='id', full_name='mcc.fred.client.ReadRequest.id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=237, + serialized_end=280, +) + + +_READRESPONSE = _descriptor.Descriptor( + name='ReadResponse', + full_name='mcc.fred.client.ReadResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='data', full_name='mcc.fred.client.ReadResponse.data', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=282, + serialized_end=310, +) + + +_UPDATEREQUEST = _descriptor.Descriptor( + name='UpdateRequest', + full_name='mcc.fred.client.UpdateRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.UpdateRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='id', full_name='mcc.fred.client.UpdateRequest.id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='data', full_name='mcc.fred.client.UpdateRequest.data', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=312, + serialized_end=371, +) + + +_APPENDREQUEST = _descriptor.Descriptor( + name='AppendRequest', + full_name='mcc.fred.client.AppendRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.AppendRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='data', full_name='mcc.fred.client.AppendRequest.data', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=373, + serialized_end=420, +) + + +_APPENDRESPONSE = _descriptor.Descriptor( + name='AppendResponse', + full_name='mcc.fred.client.AppendResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='mcc.fred.client.AppendResponse.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=422, + serialized_end=450, +) + + +_DELETEREQUEST = _descriptor.Descriptor( + name='DeleteRequest', + full_name='mcc.fred.client.DeleteRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.DeleteRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='id', full_name='mcc.fred.client.DeleteRequest.id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=452, + serialized_end=497, +) + + +_ADDREPLICAREQUEST = _descriptor.Descriptor( + name='AddReplicaRequest', + full_name='mcc.fred.client.AddReplicaRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.AddReplicaRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='nodeId', full_name='mcc.fred.client.AddReplicaRequest.nodeId', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='expiry', full_name='mcc.fred.client.AddReplicaRequest.expiry', index=2, + number=3, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=499, + serialized_end=568, +) + + +_GETKEYGROUPREPLICAREQUEST = _descriptor.Descriptor( + name='GetKeygroupReplicaRequest', + full_name='mcc.fred.client.GetKeygroupReplicaRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.GetKeygroupReplicaRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=570, + serialized_end=615, +) + + +_GETKEYGROUPREPLICARESPONSE = _descriptor.Descriptor( + name='GetKeygroupReplicaResponse', + full_name='mcc.fred.client.GetKeygroupReplicaResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='replica', full_name='mcc.fred.client.GetKeygroupReplicaResponse.replica', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=617, + serialized_end=696, +) + + +_KEYGROUPREPLICA = _descriptor.Descriptor( + name='KeygroupReplica', + full_name='mcc.fred.client.KeygroupReplica', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='nodeId', full_name='mcc.fred.client.KeygroupReplica.nodeId', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='expiry', full_name='mcc.fred.client.KeygroupReplica.expiry', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=698, + serialized_end=747, +) + + +_REMOVEREPLICAREQUEST = _descriptor.Descriptor( + name='RemoveReplicaRequest', + full_name='mcc.fred.client.RemoveReplicaRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.RemoveReplicaRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='nodeId', full_name='mcc.fred.client.RemoveReplicaRequest.nodeId', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=749, + serialized_end=805, +) + + +_GETREPLICAREQUEST = _descriptor.Descriptor( + name='GetReplicaRequest', + full_name='mcc.fred.client.GetReplicaRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='nodeId', full_name='mcc.fred.client.GetReplicaRequest.nodeId', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=807, + serialized_end=842, +) + + +_GETREPLICARESPONSE = _descriptor.Descriptor( + name='GetReplicaResponse', + full_name='mcc.fred.client.GetReplicaResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='nodeId', full_name='mcc.fred.client.GetReplicaResponse.nodeId', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='host', full_name='mcc.fred.client.GetReplicaResponse.host', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=844, + serialized_end=894, +) + + +_GETALLREPLICAREQUEST = _descriptor.Descriptor( + name='GetAllReplicaRequest', + full_name='mcc.fred.client.GetAllReplicaRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=896, + serialized_end=918, +) + + +_GETALLREPLICARESPONSE = _descriptor.Descriptor( + name='GetAllReplicaResponse', + full_name='mcc.fred.client.GetAllReplicaResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='replicas', full_name='mcc.fred.client.GetAllReplicaResponse.replicas', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=920, + serialized_end=998, +) + + +_GETKEYGROUPTRIGGERREQUEST = _descriptor.Descriptor( + name='GetKeygroupTriggerRequest', + full_name='mcc.fred.client.GetKeygroupTriggerRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.GetKeygroupTriggerRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1000, + serialized_end=1045, +) + + +_GETKEYGROUPTRIGGERRESPONSE = _descriptor.Descriptor( + name='GetKeygroupTriggerResponse', + full_name='mcc.fred.client.GetKeygroupTriggerResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='triggers', full_name='mcc.fred.client.GetKeygroupTriggerResponse.triggers', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1047, + serialized_end=1119, +) + + +_TRIGGER = _descriptor.Descriptor( + name='Trigger', + full_name='mcc.fred.client.Trigger', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='mcc.fred.client.Trigger.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='host', full_name='mcc.fred.client.Trigger.host', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1121, + serialized_end=1156, +) + + +_ADDTRIGGERREQUEST = _descriptor.Descriptor( + name='AddTriggerRequest', + full_name='mcc.fred.client.AddTriggerRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.AddTriggerRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='triggerId', full_name='mcc.fred.client.AddTriggerRequest.triggerId', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='triggerHost', full_name='mcc.fred.client.AddTriggerRequest.triggerHost', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1158, + serialized_end=1235, +) + + +_REMOVETRIGGERREQUEST = _descriptor.Descriptor( + name='RemoveTriggerRequest', + full_name='mcc.fred.client.RemoveTriggerRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.RemoveTriggerRequest.keygroup', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='triggerId', full_name='mcc.fred.client.RemoveTriggerRequest.triggerId', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1237, + serialized_end=1296, +) + + +_USERREQUEST = _descriptor.Descriptor( + name='UserRequest', + full_name='mcc.fred.client.UserRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='user', full_name='mcc.fred.client.UserRequest.user', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='keygroup', full_name='mcc.fred.client.UserRequest.keygroup', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='role', full_name='mcc.fred.client.UserRequest.role', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1298, + serialized_end=1384, +) + +_STATUSRESPONSE.fields_by_name['status'].enum_type = _ENUMSTATUS +_GETKEYGROUPREPLICARESPONSE.fields_by_name['replica'].message_type = _KEYGROUPREPLICA +_GETALLREPLICARESPONSE.fields_by_name['replicas'].message_type = _GETREPLICARESPONSE +_GETKEYGROUPTRIGGERRESPONSE.fields_by_name['triggers'].message_type = _TRIGGER +_USERREQUEST.fields_by_name['role'].enum_type = _USERROLE +DESCRIPTOR.message_types_by_name['StatusResponse'] = _STATUSRESPONSE +DESCRIPTOR.message_types_by_name['CreateKeygroupRequest'] = _CREATEKEYGROUPREQUEST +DESCRIPTOR.message_types_by_name['DeleteKeygroupRequest'] = _DELETEKEYGROUPREQUEST +DESCRIPTOR.message_types_by_name['ReadRequest'] = _READREQUEST +DESCRIPTOR.message_types_by_name['ReadResponse'] = _READRESPONSE +DESCRIPTOR.message_types_by_name['UpdateRequest'] = _UPDATEREQUEST +DESCRIPTOR.message_types_by_name['AppendRequest'] = _APPENDREQUEST +DESCRIPTOR.message_types_by_name['AppendResponse'] = _APPENDRESPONSE +DESCRIPTOR.message_types_by_name['DeleteRequest'] = _DELETEREQUEST +DESCRIPTOR.message_types_by_name['AddReplicaRequest'] = _ADDREPLICAREQUEST +DESCRIPTOR.message_types_by_name['GetKeygroupReplicaRequest'] = _GETKEYGROUPREPLICAREQUEST +DESCRIPTOR.message_types_by_name['GetKeygroupReplicaResponse'] = _GETKEYGROUPREPLICARESPONSE +DESCRIPTOR.message_types_by_name['KeygroupReplica'] = _KEYGROUPREPLICA +DESCRIPTOR.message_types_by_name['RemoveReplicaRequest'] = _REMOVEREPLICAREQUEST +DESCRIPTOR.message_types_by_name['GetReplicaRequest'] = _GETREPLICAREQUEST +DESCRIPTOR.message_types_by_name['GetReplicaResponse'] = _GETREPLICARESPONSE +DESCRIPTOR.message_types_by_name['GetAllReplicaRequest'] = _GETALLREPLICAREQUEST +DESCRIPTOR.message_types_by_name['GetAllReplicaResponse'] = _GETALLREPLICARESPONSE +DESCRIPTOR.message_types_by_name['GetKeygroupTriggerRequest'] = _GETKEYGROUPTRIGGERREQUEST +DESCRIPTOR.message_types_by_name['GetKeygroupTriggerResponse'] = _GETKEYGROUPTRIGGERRESPONSE +DESCRIPTOR.message_types_by_name['Trigger'] = _TRIGGER +DESCRIPTOR.message_types_by_name['AddTriggerRequest'] = _ADDTRIGGERREQUEST +DESCRIPTOR.message_types_by_name['RemoveTriggerRequest'] = _REMOVETRIGGERREQUEST +DESCRIPTOR.message_types_by_name['UserRequest'] = _USERREQUEST +DESCRIPTOR.enum_types_by_name['EnumStatus'] = _ENUMSTATUS +DESCRIPTOR.enum_types_by_name['UserRole'] = _USERROLE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +StatusResponse = _reflection.GeneratedProtocolMessageType('StatusResponse', (_message.Message,), { + 'DESCRIPTOR' : _STATUSRESPONSE, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.StatusResponse) + }) +_sym_db.RegisterMessage(StatusResponse) + +CreateKeygroupRequest = _reflection.GeneratedProtocolMessageType('CreateKeygroupRequest', (_message.Message,), { + 'DESCRIPTOR' : _CREATEKEYGROUPREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.CreateKeygroupRequest) + }) +_sym_db.RegisterMessage(CreateKeygroupRequest) + +DeleteKeygroupRequest = _reflection.GeneratedProtocolMessageType('DeleteKeygroupRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETEKEYGROUPREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.DeleteKeygroupRequest) + }) +_sym_db.RegisterMessage(DeleteKeygroupRequest) + +ReadRequest = _reflection.GeneratedProtocolMessageType('ReadRequest', (_message.Message,), { + 'DESCRIPTOR' : _READREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.ReadRequest) + }) +_sym_db.RegisterMessage(ReadRequest) + +ReadResponse = _reflection.GeneratedProtocolMessageType('ReadResponse', (_message.Message,), { + 'DESCRIPTOR' : _READRESPONSE, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.ReadResponse) + }) +_sym_db.RegisterMessage(ReadResponse) + +UpdateRequest = _reflection.GeneratedProtocolMessageType('UpdateRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.UpdateRequest) + }) +_sym_db.RegisterMessage(UpdateRequest) + +AppendRequest = _reflection.GeneratedProtocolMessageType('AppendRequest', (_message.Message,), { + 'DESCRIPTOR' : _APPENDREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.AppendRequest) + }) +_sym_db.RegisterMessage(AppendRequest) + +AppendResponse = _reflection.GeneratedProtocolMessageType('AppendResponse', (_message.Message,), { + 'DESCRIPTOR' : _APPENDRESPONSE, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.AppendResponse) + }) +_sym_db.RegisterMessage(AppendResponse) + +DeleteRequest = _reflection.GeneratedProtocolMessageType('DeleteRequest', (_message.Message,), { + 'DESCRIPTOR' : _DELETEREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.DeleteRequest) + }) +_sym_db.RegisterMessage(DeleteRequest) + +AddReplicaRequest = _reflection.GeneratedProtocolMessageType('AddReplicaRequest', (_message.Message,), { + 'DESCRIPTOR' : _ADDREPLICAREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.AddReplicaRequest) + }) +_sym_db.RegisterMessage(AddReplicaRequest) + +GetKeygroupReplicaRequest = _reflection.GeneratedProtocolMessageType('GetKeygroupReplicaRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETKEYGROUPREPLICAREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.GetKeygroupReplicaRequest) + }) +_sym_db.RegisterMessage(GetKeygroupReplicaRequest) + +GetKeygroupReplicaResponse = _reflection.GeneratedProtocolMessageType('GetKeygroupReplicaResponse', (_message.Message,), { + 'DESCRIPTOR' : _GETKEYGROUPREPLICARESPONSE, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.GetKeygroupReplicaResponse) + }) +_sym_db.RegisterMessage(GetKeygroupReplicaResponse) + +KeygroupReplica = _reflection.GeneratedProtocolMessageType('KeygroupReplica', (_message.Message,), { + 'DESCRIPTOR' : _KEYGROUPREPLICA, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.KeygroupReplica) + }) +_sym_db.RegisterMessage(KeygroupReplica) + +RemoveReplicaRequest = _reflection.GeneratedProtocolMessageType('RemoveReplicaRequest', (_message.Message,), { + 'DESCRIPTOR' : _REMOVEREPLICAREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.RemoveReplicaRequest) + }) +_sym_db.RegisterMessage(RemoveReplicaRequest) + +GetReplicaRequest = _reflection.GeneratedProtocolMessageType('GetReplicaRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETREPLICAREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.GetReplicaRequest) + }) +_sym_db.RegisterMessage(GetReplicaRequest) + +GetReplicaResponse = _reflection.GeneratedProtocolMessageType('GetReplicaResponse', (_message.Message,), { + 'DESCRIPTOR' : _GETREPLICARESPONSE, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.GetReplicaResponse) + }) +_sym_db.RegisterMessage(GetReplicaResponse) + +GetAllReplicaRequest = _reflection.GeneratedProtocolMessageType('GetAllReplicaRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETALLREPLICAREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.GetAllReplicaRequest) + }) +_sym_db.RegisterMessage(GetAllReplicaRequest) + +GetAllReplicaResponse = _reflection.GeneratedProtocolMessageType('GetAllReplicaResponse', (_message.Message,), { + 'DESCRIPTOR' : _GETALLREPLICARESPONSE, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.GetAllReplicaResponse) + }) +_sym_db.RegisterMessage(GetAllReplicaResponse) + +GetKeygroupTriggerRequest = _reflection.GeneratedProtocolMessageType('GetKeygroupTriggerRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETKEYGROUPTRIGGERREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.GetKeygroupTriggerRequest) + }) +_sym_db.RegisterMessage(GetKeygroupTriggerRequest) + +GetKeygroupTriggerResponse = _reflection.GeneratedProtocolMessageType('GetKeygroupTriggerResponse', (_message.Message,), { + 'DESCRIPTOR' : _GETKEYGROUPTRIGGERRESPONSE, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.GetKeygroupTriggerResponse) + }) +_sym_db.RegisterMessage(GetKeygroupTriggerResponse) + +Trigger = _reflection.GeneratedProtocolMessageType('Trigger', (_message.Message,), { + 'DESCRIPTOR' : _TRIGGER, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.Trigger) + }) +_sym_db.RegisterMessage(Trigger) + +AddTriggerRequest = _reflection.GeneratedProtocolMessageType('AddTriggerRequest', (_message.Message,), { + 'DESCRIPTOR' : _ADDTRIGGERREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.AddTriggerRequest) + }) +_sym_db.RegisterMessage(AddTriggerRequest) + +RemoveTriggerRequest = _reflection.GeneratedProtocolMessageType('RemoveTriggerRequest', (_message.Message,), { + 'DESCRIPTOR' : _REMOVETRIGGERREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.RemoveTriggerRequest) + }) +_sym_db.RegisterMessage(RemoveTriggerRequest) + +UserRequest = _reflection.GeneratedProtocolMessageType('UserRequest', (_message.Message,), { + 'DESCRIPTOR' : _USERREQUEST, + '__module__' : 'client_pb2' + # @@protoc_insertion_point(class_scope:mcc.fred.client.UserRequest) + }) +_sym_db.RegisterMessage(UserRequest) + + +DESCRIPTOR._options = None + +_CLIENT = _descriptor.ServiceDescriptor( + name='Client', + full_name='mcc.fred.client.Client', + file=DESCRIPTOR, + index=0, + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_start=1537, + serialized_end=2922, + methods=[ + _descriptor.MethodDescriptor( + name='CreateKeygroup', + full_name='mcc.fred.client.Client.CreateKeygroup', + index=0, + containing_service=None, + input_type=_CREATEKEYGROUPREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='DeleteKeygroup', + full_name='mcc.fred.client.Client.DeleteKeygroup', + index=1, + containing_service=None, + input_type=_DELETEKEYGROUPREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='Read', + full_name='mcc.fred.client.Client.Read', + index=2, + containing_service=None, + input_type=_READREQUEST, + output_type=_READRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='Update', + full_name='mcc.fred.client.Client.Update', + index=3, + containing_service=None, + input_type=_UPDATEREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='Delete', + full_name='mcc.fred.client.Client.Delete', + index=4, + containing_service=None, + input_type=_DELETEREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='Append', + full_name='mcc.fred.client.Client.Append', + index=5, + containing_service=None, + input_type=_APPENDREQUEST, + output_type=_APPENDRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='AddReplica', + full_name='mcc.fred.client.Client.AddReplica', + index=6, + containing_service=None, + input_type=_ADDREPLICAREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetKeygroupReplica', + full_name='mcc.fred.client.Client.GetKeygroupReplica', + index=7, + containing_service=None, + input_type=_GETKEYGROUPREPLICAREQUEST, + output_type=_GETKEYGROUPREPLICARESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='RemoveReplica', + full_name='mcc.fred.client.Client.RemoveReplica', + index=8, + containing_service=None, + input_type=_REMOVEREPLICAREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetReplica', + full_name='mcc.fred.client.Client.GetReplica', + index=9, + containing_service=None, + input_type=_GETREPLICAREQUEST, + output_type=_GETREPLICARESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetAllReplica', + full_name='mcc.fred.client.Client.GetAllReplica', + index=10, + containing_service=None, + input_type=_GETALLREPLICAREQUEST, + output_type=_GETALLREPLICARESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetKeygroupTriggers', + full_name='mcc.fred.client.Client.GetKeygroupTriggers', + index=11, + containing_service=None, + input_type=_GETKEYGROUPTRIGGERREQUEST, + output_type=_GETKEYGROUPTRIGGERRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='AddTrigger', + full_name='mcc.fred.client.Client.AddTrigger', + index=12, + containing_service=None, + input_type=_ADDTRIGGERREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='RemoveTrigger', + full_name='mcc.fred.client.Client.RemoveTrigger', + index=13, + containing_service=None, + input_type=_REMOVETRIGGERREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='AddUser', + full_name='mcc.fred.client.Client.AddUser', + index=14, + containing_service=None, + input_type=_USERREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='RemoveUser', + full_name='mcc.fred.client.Client.RemoveUser', + index=15, + containing_service=None, + input_type=_USERREQUEST, + output_type=_STATUSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), +]) +_sym_db.RegisterServiceDescriptor(_CLIENT) + +DESCRIPTOR.services_by_name['Client'] = _CLIENT + +# @@protoc_insertion_point(module_scope) diff --git a/tests/FailingNodeTest/client_pb2_grpc.py b/tests/FailingNodeTest/client_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..29affe3382e347221047c1c75b2cc2661fce1239 --- /dev/null +++ b/tests/FailingNodeTest/client_pb2_grpc.py @@ -0,0 +1,564 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import client_pb2 as client__pb2 + + +class ClientStub(object): + """This is a Client that calls the exthandler of FReD + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateKeygroup = channel.unary_unary( + '/mcc.fred.client.Client/CreateKeygroup', + request_serializer=client__pb2.CreateKeygroupRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.DeleteKeygroup = channel.unary_unary( + '/mcc.fred.client.Client/DeleteKeygroup', + request_serializer=client__pb2.DeleteKeygroupRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.Read = channel.unary_unary( + '/mcc.fred.client.Client/Read', + request_serializer=client__pb2.ReadRequest.SerializeToString, + response_deserializer=client__pb2.ReadResponse.FromString, + ) + self.Update = channel.unary_unary( + '/mcc.fred.client.Client/Update', + request_serializer=client__pb2.UpdateRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/mcc.fred.client.Client/Delete', + request_serializer=client__pb2.DeleteRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.Append = channel.unary_unary( + '/mcc.fred.client.Client/Append', + request_serializer=client__pb2.AppendRequest.SerializeToString, + response_deserializer=client__pb2.AppendResponse.FromString, + ) + self.AddReplica = channel.unary_unary( + '/mcc.fred.client.Client/AddReplica', + request_serializer=client__pb2.AddReplicaRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.GetKeygroupReplica = channel.unary_unary( + '/mcc.fred.client.Client/GetKeygroupReplica', + request_serializer=client__pb2.GetKeygroupReplicaRequest.SerializeToString, + response_deserializer=client__pb2.GetKeygroupReplicaResponse.FromString, + ) + self.RemoveReplica = channel.unary_unary( + '/mcc.fred.client.Client/RemoveReplica', + request_serializer=client__pb2.RemoveReplicaRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.GetReplica = channel.unary_unary( + '/mcc.fred.client.Client/GetReplica', + request_serializer=client__pb2.GetReplicaRequest.SerializeToString, + response_deserializer=client__pb2.GetReplicaResponse.FromString, + ) + self.GetAllReplica = channel.unary_unary( + '/mcc.fred.client.Client/GetAllReplica', + request_serializer=client__pb2.GetAllReplicaRequest.SerializeToString, + response_deserializer=client__pb2.GetAllReplicaResponse.FromString, + ) + self.GetKeygroupTriggers = channel.unary_unary( + '/mcc.fred.client.Client/GetKeygroupTriggers', + request_serializer=client__pb2.GetKeygroupTriggerRequest.SerializeToString, + response_deserializer=client__pb2.GetKeygroupTriggerResponse.FromString, + ) + self.AddTrigger = channel.unary_unary( + '/mcc.fred.client.Client/AddTrigger', + request_serializer=client__pb2.AddTriggerRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.RemoveTrigger = channel.unary_unary( + '/mcc.fred.client.Client/RemoveTrigger', + request_serializer=client__pb2.RemoveTriggerRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.AddUser = channel.unary_unary( + '/mcc.fred.client.Client/AddUser', + request_serializer=client__pb2.UserRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + self.RemoveUser = channel.unary_unary( + '/mcc.fred.client.Client/RemoveUser', + request_serializer=client__pb2.UserRequest.SerializeToString, + response_deserializer=client__pb2.StatusResponse.FromString, + ) + + +class ClientServicer(object): + """This is a Client that calls the exthandler of FReD + """ + + def CreateKeygroup(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteKeygroup(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Read(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Update(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Append(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddReplica(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetKeygroupReplica(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveReplica(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetReplica(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllReplica(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetKeygroupTriggers(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddTrigger(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveTrigger(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddUser(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveUser(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ClientServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateKeygroup': grpc.unary_unary_rpc_method_handler( + servicer.CreateKeygroup, + request_deserializer=client__pb2.CreateKeygroupRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'DeleteKeygroup': grpc.unary_unary_rpc_method_handler( + servicer.DeleteKeygroup, + request_deserializer=client__pb2.DeleteKeygroupRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'Read': grpc.unary_unary_rpc_method_handler( + servicer.Read, + request_deserializer=client__pb2.ReadRequest.FromString, + response_serializer=client__pb2.ReadResponse.SerializeToString, + ), + 'Update': grpc.unary_unary_rpc_method_handler( + servicer.Update, + request_deserializer=client__pb2.UpdateRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=client__pb2.DeleteRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'Append': grpc.unary_unary_rpc_method_handler( + servicer.Append, + request_deserializer=client__pb2.AppendRequest.FromString, + response_serializer=client__pb2.AppendResponse.SerializeToString, + ), + 'AddReplica': grpc.unary_unary_rpc_method_handler( + servicer.AddReplica, + request_deserializer=client__pb2.AddReplicaRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'GetKeygroupReplica': grpc.unary_unary_rpc_method_handler( + servicer.GetKeygroupReplica, + request_deserializer=client__pb2.GetKeygroupReplicaRequest.FromString, + response_serializer=client__pb2.GetKeygroupReplicaResponse.SerializeToString, + ), + 'RemoveReplica': grpc.unary_unary_rpc_method_handler( + servicer.RemoveReplica, + request_deserializer=client__pb2.RemoveReplicaRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'GetReplica': grpc.unary_unary_rpc_method_handler( + servicer.GetReplica, + request_deserializer=client__pb2.GetReplicaRequest.FromString, + response_serializer=client__pb2.GetReplicaResponse.SerializeToString, + ), + 'GetAllReplica': grpc.unary_unary_rpc_method_handler( + servicer.GetAllReplica, + request_deserializer=client__pb2.GetAllReplicaRequest.FromString, + response_serializer=client__pb2.GetAllReplicaResponse.SerializeToString, + ), + 'GetKeygroupTriggers': grpc.unary_unary_rpc_method_handler( + servicer.GetKeygroupTriggers, + request_deserializer=client__pb2.GetKeygroupTriggerRequest.FromString, + response_serializer=client__pb2.GetKeygroupTriggerResponse.SerializeToString, + ), + 'AddTrigger': grpc.unary_unary_rpc_method_handler( + servicer.AddTrigger, + request_deserializer=client__pb2.AddTriggerRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'RemoveTrigger': grpc.unary_unary_rpc_method_handler( + servicer.RemoveTrigger, + request_deserializer=client__pb2.RemoveTriggerRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'AddUser': grpc.unary_unary_rpc_method_handler( + servicer.AddUser, + request_deserializer=client__pb2.UserRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + 'RemoveUser': grpc.unary_unary_rpc_method_handler( + servicer.RemoveUser, + request_deserializer=client__pb2.UserRequest.FromString, + response_serializer=client__pb2.StatusResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'mcc.fred.client.Client', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Client(object): + """This is a Client that calls the exthandler of FReD + """ + + @staticmethod + def CreateKeygroup(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/CreateKeygroup', + client__pb2.CreateKeygroupRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteKeygroup(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/DeleteKeygroup', + client__pb2.DeleteKeygroupRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Read(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/Read', + client__pb2.ReadRequest.SerializeToString, + client__pb2.ReadResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/Update', + client__pb2.UpdateRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/Delete', + client__pb2.DeleteRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Append(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/Append', + client__pb2.AppendRequest.SerializeToString, + client__pb2.AppendResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddReplica(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/AddReplica', + client__pb2.AddReplicaRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetKeygroupReplica(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/GetKeygroupReplica', + client__pb2.GetKeygroupReplicaRequest.SerializeToString, + client__pb2.GetKeygroupReplicaResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveReplica(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/RemoveReplica', + client__pb2.RemoveReplicaRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetReplica(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/GetReplica', + client__pb2.GetReplicaRequest.SerializeToString, + client__pb2.GetReplicaResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllReplica(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/GetAllReplica', + client__pb2.GetAllReplicaRequest.SerializeToString, + client__pb2.GetAllReplicaResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetKeygroupTriggers(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/GetKeygroupTriggers', + client__pb2.GetKeygroupTriggerRequest.SerializeToString, + client__pb2.GetKeygroupTriggerResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddTrigger(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/AddTrigger', + client__pb2.AddTriggerRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveTrigger(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/RemoveTrigger', + client__pb2.RemoveTriggerRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddUser(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/AddUser', + client__pb2.UserRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveUser(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mcc.fred.client.Client/RemoveUser', + client__pb2.UserRequest.SerializeToString, + client__pb2.StatusResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/tests/FailingNodeTest/docker_helper.py b/tests/FailingNodeTest/docker_helper.py new file mode 100644 index 0000000000000000000000000000000000000000..bec097a94f7d0c9ce0399d799f7d1f85c841cf92 --- /dev/null +++ b/tests/FailingNodeTest/docker_helper.py @@ -0,0 +1,34 @@ +import docker +from docker.models.resource import Model +import time + + +class DockerHelper: + def __init__(self): + self.client = docker.from_env() + + def get_name(self, name: str) -> Model: + return self.client.containers.get(name) + + def restart_container(self, name: str) -> None: + c = self.get_name(name).restart() + + def stop_container(self, name: str) -> None: + c = self.get_name(name).stop() + + def start_container(self, name: str) -> None: + self.get_name(name).start() + + def restart_container_timeout(self, name: str, timeout_s: int) -> None: + self.stop_container(name) + time.sleep(timeout_s) + self.start_container(name) + + +if __name__ == '__main__': + d = DockerHelper() + print("Stopping Container nodeA-1") + d.stop_container('nodeA-1') + time.sleep(5) + print("Restarting Container nodeA-1") + d.start_container('nodeA-1') diff --git a/tests/FailingNodeTest/fred_client.py b/tests/FailingNodeTest/fred_client.py new file mode 100644 index 0000000000000000000000000000000000000000..1b62f83e083626ed169dcc6cb99960f54312356c --- /dev/null +++ b/tests/FailingNodeTest/fred_client.py @@ -0,0 +1,47 @@ +import grpc + +import client_pb2 +import client_pb2_grpc + + +class FredClient: + def __init__(self, addr: str): + with open('certs/client.crt') as f: + crt = f.read().encode() + + with open('certs/client.key') as f: + key = f.read().encode() + + with open('certs/ca.crt') as f: + ca = f.read().encode() + + creds = grpc.ssl_channel_credentials(ca, key, crt) + channel = grpc.secure_channel(addr, creds) + self.stub = client_pb2_grpc.ClientStub(channel) + + def create_keygroup(self, name: str, mutable: bool, expiry: int): + r = client_pb2.CreateKeygroupRequest() + r.keygroup = name + r.mutable = mutable + r.expiry = expiry + return self.stub.CreateKeygroup(r) + + def add_replica(self, keygroup: str, nodeId: str, expiry: int): + r = client_pb2.AddReplicaRequest() + r.keygroup = keygroup + r.nodeId = nodeId + r.expiry = expiry + return self.stub.AddReplica(r) + + def read(self, keygroup: str, id: str): + r = client_pb2.ReadRequest() + r.keygroup = keygroup + r.id = id + return self.stub.Read(r) + + def update(self, keygroup: str, id: str, data: str): + r = client_pb2.UpdateRequest() + r.keygroup = keygroup + r.id = id + r.data = data + return self.stub.Update(r) diff --git a/tests/FailingNodeTest/main.py b/tests/FailingNodeTest/main.py new file mode 100644 index 0000000000000000000000000000000000000000..747683210d9f4ae14e87595c956b410521b55524 --- /dev/null +++ b/tests/FailingNodeTest/main.py @@ -0,0 +1,58 @@ +import time + +from docker_helper import DockerHelper +from fred_client import FredClient + +if __name__ == '__main__': + dh = DockerHelper() + nodeB = FredClient('172.26.2.1:9001') + nodeB_name = 'nodeB' + + nodeC = FredClient('172.26.3.1:9001') + nodeC_name = 'nodeC' + # Expected Status: Everything is running (make fred in 3NodeTest), nodeB is under the above IP + print('------------------------------') + print('Testing send/receive between nodes') + + print('NodeC Creating Keygroup failtest') + nodeC.create_keygroup("basetest", True, 0) + + print('NodeC adding nodeB as replica') + nodeC.add_replica("basetest", "nodeB", 0) + + print('NodeC updating value') + nodeC.update("basetest", "key", "value") + time.sleep(2) + + print('NodeB reading updated value') + resp = nodeB.read("basetest", "key") + print(f'NodeB Read returned {resp}') + + print('------------------------------') + print('Testing putting into node, restarting it and getting from same node') + + nodeC.create_keygroup('restarttest', True, 0) + nodeC.update('restarttest', 'key', 'value') + dh.restart_container_timeout(nodeC_name, 5) + time.sleep(5) + resp = nodeC.read('restarttest', 'key').data + if resp != 'value': + print(f'NodeC ERROR got resp {resp} instead of "value"') + + print('------------------------------') + print('Test: Create a replicated keygroup, kill nodeB, update the KG with nodeA, restart nodeB, test if nodeB has ' + 'the data') + + nodeC.create_keygroup('disttest', True, 0) + nodeC.add_replica('disttest', 'nodeB', 0) + nodeC.update('disttest', 'key', 'value') + dh.stop_container(nodeB_name) + nodeC.update('disttest', 'key', 'newvalue') + time.sleep(5) + dh.start_container(nodeB_name) + time.sleep(5) + resp = nodeB.read('disttest', 'key').data + if resp != 'newvalue': + print(f'NodeB ERROR got resp {resp} instead of "newvalue"') + if resp == "value": + print("...this means that nodeB has not received the updates while it was gone.") diff --git a/tests/FailingNodeTest/requirements.txt b/tests/FailingNodeTest/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..63d61189b09bcff148d92790b495153dbefc4d4c --- /dev/null +++ b/tests/FailingNodeTest/requirements.txt @@ -0,0 +1,3 @@ +docker +grpcio==1.31.0 +protobuf \ No newline at end of file