zepben.ewb 1.0.0b6__py3-none-any.whl → 1.0.0b8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,6 +86,7 @@ class GrpcChannelBuilder(ABC):
86
86
 
87
87
  def _test_connection(self, channel: grpc.Channel, debug: bool, timeout_seconds: int):
88
88
  debug_errors = []
89
+ permission_errors = []
89
90
  for name, client in zip(self._stubs.keys(), map(lambda stub: stub(channel), list(self._stubs.values()))):
90
91
  try:
91
92
  result = client.checkConnection(CheckConnectionRequest(), timeout=timeout_seconds, wait_for_ready=False)
@@ -93,7 +94,11 @@ class GrpcChannelBuilder(ABC):
93
94
  return
94
95
  except _InactiveRpcError as rpc_error:
95
96
  debug_errors.append(f"Received the following exception with {name}:\n{rpc_error}\n")
96
- raise GrpcConnectionException(f"Couldn't establish gRPC connection to any service on {self._socket_address}.\n{''.join(debug_errors) if debug else ''}")
97
+ if rpc_error.code() in (grpc.StatusCode.UNAUTHENTICATED, grpc.StatusCode.PERMISSION_DENIED):
98
+ permission_errors.append(f"Received the following exception with {name}:\n\t{rpc_error.code().name}: {rpc_error.details()}\n")
99
+ # Preference propagating permissions errors to users if any exist, otherwise just take the first error from the first service we tried.
100
+ propagate = ''.join(permission_errors) if permission_errors else debug_errors[0]
101
+ raise GrpcConnectionException(f"Couldn't establish gRPC connection to any service on {self._socket_address}.\n{''.join(debug_errors) if debug else propagate}")
97
102
 
98
103
  def for_address(self, host: str, port: int) -> 'GrpcChannelBuilder':
99
104
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zepben.ewb
3
- Version: 1.0.0b6
3
+ Version: 1.0.0b8
4
4
  Summary: Python SDK for interacting with the Energy Workbench platform
5
5
  Author-email: Kurt Greaves <kurt.greaves@zepben.com>, Max Chesterfield <max.chesterfield@zepben.com>
6
6
  License-Expression: MPL-2.0
@@ -512,10 +512,10 @@ zepben/ewb/services/common/meta/metadata_collection.py,sha256=ccXNtk9H_pBO542MSv
512
512
  zepben/ewb/services/common/meta/metadata_translations.py,sha256=O8tW3YVrogmKEAOEBEVJiljoyt1RcYEGVxBPiH1bz6k,1538
513
513
  zepben/ewb/services/common/meta/service_info.py,sha256=EX1iwDv6ENS4la-hs9XQXjfKv10bM-P_WYx48xW42ik,609
514
514
  zepben/ewb/services/common/translator/__init__.py,sha256=waADXEvfUG9wAN4STx5uIUHOv0UnpZLH2qU1LXgaDBc,243
515
- zepben/ewb/services/common/translator/base_cim2proto.py,sha256=yYNhx1uhJVCPFs_FNC5fFMK8Xu7PZgxxP9K9G1UrmmU,3216
516
- zepben/ewb/services/common/translator/base_proto2cim.py,sha256=pr_zBVXUB-innCHfQwy-P8u2HExDH6W5nYfWTi69aEw,3936
515
+ zepben/ewb/services/common/translator/base_cim2proto.py,sha256=1FU1FClF2lLHyuUgQ7BJFRGY3TN948wlPjZb9qoHHHc,3514
516
+ zepben/ewb/services/common/translator/base_proto2cim.py,sha256=EuoUlYh03VWcO4VSt0XO4AG26UhZM1IjAl0UU1PxXZE,4912
517
517
  zepben/ewb/services/common/translator/service_differences.py,sha256=ZFbGFMxTTnT4zt4zIt2BK_ikg_71vGkkmH8JhII2bMc,2913
518
- zepben/ewb/services/common/translator/util.py,sha256=lFVBumQij2tDsf_i4j8y_BgX0_uOYqGp_Dcjjra31P4,2346
518
+ zepben/ewb/services/common/translator/util.py,sha256=C7KGB5B7I3j2uSlDLtKUeQUNSFqLCqz4u9vA-TKKE34,2292
519
519
  zepben/ewb/services/customer/__init__.py,sha256=waADXEvfUG9wAN4STx5uIUHOv0UnpZLH2qU1LXgaDBc,243
520
520
  zepben/ewb/services/customer/customer_service_comparator.py,sha256=RZQfjDfS8Lh_TjakFAGeESj64Fk8W0EASeQm6zx5PWQ,2095
521
521
  zepben/ewb/services/customer/customers.py,sha256=xxg00L400o88BCFuz8sJT9WdWa8N5Py8DwJSHPayXzk,688
@@ -604,9 +604,9 @@ zepben/ewb/services/network/tracing/traversal/traversal.py,sha256=MA1p1K4PgbPCdy
604
604
  zepben/ewb/services/network/tracing/traversal/traversal_condition.py,sha256=UljzzIDk1I6wtlIS62i4DRsabSFqsgIv9zzwcZtgv3M,744
605
605
  zepben/ewb/services/network/tracing/traversal/weighted_priority_queue.py,sha256=3IswA00UyOKKlB3fV9jaayRD33YNOXRgGm_HJBYTXZg,2958
606
606
  zepben/ewb/services/network/translator/__init__.py,sha256=0WBShZvRfn49WdWfuPPL0tkMSTYNCQhk45fZcIrQ8BY,25988
607
- zepben/ewb/services/network/translator/network_cim2proto.py,sha256=2ByDXiXnFi1F9Jh4ARYOzWSx1B2PJWtOBZYWXjOgHt8,82678
607
+ zepben/ewb/services/network/translator/network_cim2proto.py,sha256=--XKkTMrXUfGDNAEiplJ8y67SPc504ICKFdiMqs4f2E,79823
608
608
  zepben/ewb/services/network/translator/network_enum_mappers.py,sha256=gFxDQEbuwKLicUnYNOIaypoloh8EZf0y5BDqKlq0Kqg,6857
609
- zepben/ewb/services/network/translator/network_proto2cim.py,sha256=ND8fESZ8R1t1QJSonUSQXdwWIc1N2E22UzaR7isTuzw,105087
609
+ zepben/ewb/services/network/translator/network_proto2cim.py,sha256=0EA-hiEr-FWPgo7rcsu95RYRvKqKtNAA6ox71FpK9sE,100760
610
610
  zepben/ewb/streaming/__init__.py,sha256=waADXEvfUG9wAN4STx5uIUHOv0UnpZLH2qU1LXgaDBc,243
611
611
  zepben/ewb/streaming/exceptions.py,sha256=P6A89w0mFMxPobUsKHRDax20fxP4SFUnBrEU8pCo_5I,425
612
612
  zepben/ewb/streaming/data/__init__.py,sha256=waADXEvfUG9wAN4STx5uIUHOv0UnpZLH2qU1LXgaDBc,243
@@ -628,14 +628,14 @@ zepben/ewb/streaming/grpc/__init__.py,sha256=waADXEvfUG9wAN4STx5uIUHOv0UnpZLH2qU
628
628
  zepben/ewb/streaming/grpc/auth_token_plugin.py,sha256=zg3UJF9qJ_Ov7Pczjhd4B_-BKaAr35JlAFLLdm1jg7U,804
629
629
  zepben/ewb/streaming/grpc/connect.py,sha256=xRifzFzlbVuEoRY79fasGO-E-zLtGpGKUF5F9CusI6g,10504
630
630
  zepben/ewb/streaming/grpc/grpc.py,sha256=q2tncPR9jMfcOB71R5mnJi1ZVp7F3X1-NIUhf0Zw2jA,3824
631
- zepben/ewb/streaming/grpc/grpc_channel_builder.py,sha256=-NHQZxfqOMVCND7jkZOWRO6oynh1lHLm6hjHO7kRhZk,8698
631
+ zepben/ewb/streaming/grpc/grpc_channel_builder.py,sha256=k2v1zkDeDgYdc2kqdBsntEeQWHm8qqt1L62UTxnNDqw,9225
632
632
  zepben/ewb/streaming/mutations/__init__.py,sha256=waADXEvfUG9wAN4STx5uIUHOv0UnpZLH2qU1LXgaDBc,243
633
633
  zepben/ewb/streaming/mutations/update_network_state_client.py,sha256=e0Oma5PRT8mW7EQs-zGVIQYpT-LxAz-mQ579LBevW-c,3922
634
634
  zepben/ewb/streaming/mutations/update_network_state_service.py,sha256=irR-TO67QXRyBmK8PU8SzM31NKSSefZt_nQGHi5IhT8,3260
635
635
  zepben/ewb/testing/__init__.py,sha256=waADXEvfUG9wAN4STx5uIUHOv0UnpZLH2qU1LXgaDBc,243
636
636
  zepben/ewb/testing/test_network_builder.py,sha256=KG0o2ZHUswx3xClu-JnLs_pYIYbQ5jjtvtyZ7LI6IZ8,38092
637
- zepben_ewb-1.0.0b6.dist-info/licenses/LICENSE,sha256=aAHD66h6PQIETpkJDvg5yEObyFvXUED8u7S8dlh6K0Y,16725
638
- zepben_ewb-1.0.0b6.dist-info/METADATA,sha256=Rm_p0aRZCBv3XaE_tldT6CJ30MCiXSB9cwcd3OFqFc4,3300
639
- zepben_ewb-1.0.0b6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
640
- zepben_ewb-1.0.0b6.dist-info/top_level.txt,sha256=eVLDJiO6FGjL_Z7KdmFE-R8uf1Q07aaVLGe9Ee4kmBw,7
641
- zepben_ewb-1.0.0b6.dist-info/RECORD,,
637
+ zepben_ewb-1.0.0b8.dist-info/licenses/LICENSE,sha256=aAHD66h6PQIETpkJDvg5yEObyFvXUED8u7S8dlh6K0Y,16725
638
+ zepben_ewb-1.0.0b8.dist-info/METADATA,sha256=qRyKHwO8p3JuW5aHqreKOWlsaIl1EfAAuxBark4wPp4,3300
639
+ zepben_ewb-1.0.0b8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
640
+ zepben_ewb-1.0.0b8.dist-info/top_level.txt,sha256=eVLDJiO6FGjL_Z7KdmFE-R8uf1Q07aaVLGe9Ee4kmBw,7
641
+ zepben_ewb-1.0.0b8.dist-info/RECORD,,