Calico provides Layer 3 Virtual Networking for Highly Scalable Data Centers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pluginutils.py 590B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python
  2. # Copyright 2015 Metaswitch Networks
  3. import os
  4. PRIMARY_CONTROLLER_CFG = "/etc/primary-controller.yaml"
  5. CONTROLLER_CFG = "/etc/controller.yaml"
  6. COMPUTE_CFG = "/etc/compute.yaml"
  7. def get_config_file_for_node_type():
  8. if os.path.isfile(PRIMARY_CONTROLLER_CFG):
  9. config_file = PRIMARY_CONTROLLER_CFG
  10. elif os.path.isfile(CONTROLLER_CFG):
  11. config_file = CONTROLLER_CFG
  12. elif os.path.isfile(COMPUTE_CFG):
  13. config_file = COMPUTE_CFG
  14. else:
  15. raise Exception("Unrecognised node type - can't obtain config")
  16. return config_file