The Gateway CIK


#1

There are a couple ways to get the GWE CIK.

  1. Use the GWE GatewayEngine + device-client exo libraries.

    python << EOF
    import os
    from exo.device import Device
    from GatewayEngine import utils as gweutils
    path_to_gwe_cfg = os.path.join(gweutils.conf_dir(), 'Gateway.cfg')
    d = Device('test', path_to_gwe_cfg )
    print(d.cik())
    print(d.activated())
    EOF
    
  2. Use the gwe command line:

    gwe --gateway-cik
    

#2

@willcharlton

Does this mean that I have to have a shell open on the gateway in order to use these options? I noticed you didn’t mention just looking at the gateway engine config file. Do you consider that bad practice?


#3

You can, but it wouldn’t be required. The 1st example is a python code-block that you can copy-paste directly into your terminal, but you could also use the same code as example code in a python Custom Gateway Application. The 2nd example could also be used in shell scripts as well by using any language’s native system call interface.