Commit ca0e0b5b88dd007aa6c8de4946e45fbcb8056e77

Authored by aklotz
1 parent 8d8d4b50
Exists in dev

tests yaml pour la config

config/config.yml 0 → 100644
... ... @@ -0,0 +1,67 @@
  1 +OBSERVATORY_1:
  2 + _name: TNC
  3 +
  4 + UNITS:
  5 + UNIT_1:
  6 + _name: TNC-Telescope
  7 + # _Site: (home, ligne d'horizon)
  8 +
  9 + MOUNT:
  10 + _name: TNC-Mount
  11 + _components:
  12 + - Mount_TM350-Astromecca_sn459.yml
  13 +
  14 + CHANNELS:
  15 +
  16 + CHANNEL_1:
  17 + _name: TNC-NW
  18 + _components:
  19 + - Camera_FLIKepler4040_sn123.yml
  20 + - Focuser_Optec_sn341.yml
  21 + - Optic_TakahashiED180_sn445.yml
  22 +
  23 + CHANNEL_2:
  24 + _name: TNC-NE
  25 +
  26 + CHANNEL_3:
  27 + _name: TNC-SW
  28 +
  29 + CHANNEL_4:
  30 + _name: TNC-SE
  31 +
  32 + COMPUTERS:
  33 +
  34 + COMPUTER_1:
  35 + _name: PyROS_bdd
  36 + _file: Computer_DELL_PowerEdge7000_sn599.yml
  37 + _hostname: TNC_PC_DB
  38 + database:
  39 + name: MySQL
  40 + port: 3306
  41 +
  42 + COMPUTER_2:
  43 + _name: PyROS_principal
  44 + _file: Computer_DELL_E6430_sn000.yml
  45 + _hostname: TNC_PC1
  46 + _role: Main
  47 + agents:
  48 + - Majordome: /home/pyros/private/majordome_perso
  49 + - Monitoring: ~
  50 +
  51 + COMPUTER_3:
  52 + _name: PyROS_spare
  53 + _file: Computer_DELL_E6430_sn001.yml
  54 + _hostname: TNC_PC2
  55 + _role: Spare
  56 + _main: TNC_PC1
  57 + agents:
  58 + - Majordome: ~
  59 + - Monitoring: ~
  60 +
  61 + COMPUTER_4:
  62 + _name: PyROS_channel
  63 + _file: Computer_DELL_MiniPC_s772.yml
  64 + _hostname: TNC_MINIPC_SW
  65 + _role: Main
  66 + agents:
  67 + - Camera: ~
... ...
config/minimal_config.txt 0 → 100644
... ... @@ -0,0 +1,143 @@
  1 +================================================
  2 +Assemblage configuration
  3 +Commande à placer par exemple dans /etc/rc.local
  4 +
  5 +nohup python3 pyros -c assembly.xml &
  6 +
  7 +nohup python3 pyros -c pyros_plugins/assembly_TNC.xml &
  8 +
  9 +pyros_plugins est un dossier vide versionné
  10 +------------------------------------------------
  11 +
  12 +assembly_TNC.xml
  13 +
  14 +OBSERVATORY_1:
  15 + _name: TNC
  16 +
  17 + UNITS:
  18 + UNIT_1:
  19 + _name: TNC-Telescope
  20 + # _Site: (home, ligne d'horizon)
  21 +
  22 + MOUNT:
  23 + _name: TNC-Mount
  24 + _components:
  25 + - Mount_TM350-Astromecca_sn459.yml
  26 +
  27 + CHANNELS:
  28 +
  29 + CHANNEL_1:
  30 + _name: TNC-NW
  31 + _components:
  32 + - Camera_FLIKepler4040_sn123.yml
  33 + - Focuser_Optec_sn341.yml
  34 + - Optic_TakahashiED180_sn445.yml
  35 +
  36 + CHANNEL_2:
  37 + _name: TNC-NE
  38 +
  39 + CHANNEL_3:
  40 + _name: TNC-SW
  41 +
  42 + CHANNEL_4:
  43 + _name: TNC-SE
  44 +
  45 + COMPUTERS:
  46 +
  47 + COMPUTER_1:
  48 + _name: PyROS_bdd
  49 + _file: Computer_DELL_PowerEdge7000_sn599.yml
  50 + _hostname: TNC_PC_DB
  51 + database:
  52 + name: MySQL
  53 + port: 3306
  54 +
  55 + COMPUTER_2:
  56 + _name: PyROS_principal
  57 + _file: Computer_DELL_E6430_sn000.yml
  58 + _hostname: TNC_PC1
  59 + _role: Main
  60 + agents:
  61 + - Majordome: /home/pyros/private/majordome_perso
  62 + - Monitoring: ~
  63 +
  64 + COMPUTER_3:
  65 + _name: PyROS_spare
  66 + _file: Computer_DELL_E6430_sn001.yml
  67 + _hostname: TNC_PC2
  68 + _role: Spare
  69 + _main: TNC_PC1
  70 + agents:
  71 + - Majordome: ~
  72 + - Monitoring: ~
  73 +
  74 + COMPUTER_4: PyROS_channel
  75 + _file: Computer_DELL_MiniPC_s772.yml
  76 + _hostname: TNC_MINIPC_SW
  77 + _role: Main
  78 + agents:
  79 + - Camera: ~
  80 +
  81 + Reste à décrire, UPS, router, VPN (dans monitoring ?)
  82 +
  83 +================================================
  84 +LISTE DE HARDWARE Disponible dans l'observatoire
  85 +------------------------------------------------
  86 +
  87 +Computer_DELL_MiniPC_s772.xml
  88 + _serialNumber
  89 + _tag_dell
  90 + _macaddress: 23:e5:67:ee:a2:11
  91 +
  92 +Computer_DELL_PowerEdge7000_sn599.xml
  93 + _serialNumber
  94 + _tag_dell
  95 + _macaddress: 23:e5:67:ee:a2:34
  96 +
  97 +Computer_DELL_E6430_sn000.xml
  98 + _serialNumber
  99 + _tag_dell
  100 + _macaddress: 23:e5:67:ee:a2:33
  101 +
  102 +Computer_DELL_E6430_sn001.xml
  103 + _serialNumber
  104 + _tag_dell
  105 + _macaddress: 23:e5:67:ee:a2:35
  106 +
  107 +Mount_TM350-Astromecca_sn459.xml
  108 + _serialNumber
  109 + _communication_transport: Serial
  110 + _communication_langage: MCS
  111 + MountPointing
  112 + Type: HADEC
  113 +
  114 +Camera_FLIKepler4040_sn123.xml
  115 + _serialNumber
  116 + _communication_transport: USB
  117 + _communication_langage: FLIPro library
  118 + _input: photons
  119 + _output: image
  120 + DetectorSensor
  121 + DetectorShutter
  122 + DetectorTimer
  123 +
  124 +Focuser_Optec_sn341.xml
  125 + _SerialNumber
  126 + DetectorFocus
  127 +
  128 +Optic_TakahashiED180_sn445.xml
  129 + _SerialNumber
  130 + Optic
  131 +
  132 +Filterwheel_FLI_sn57345.xml
  133 + _SerialNumber
  134 + FilterSelector
  135 +
  136 +
  137 +
  138 +
  139 +
  140 +
  141 +
  142 +
  143 +
0 144 \ No newline at end of file
... ...
config/test_yaml.py 0 → 100644
... ... @@ -0,0 +1,19 @@
  1 +# -*- coding: utf-8 -*-
  2 +"""
  3 +Spyder Editor
  4 +
  5 +This is a temporary script file.
  6 +"""
  7 +import yaml
  8 +
  9 +with open("C:/srv/develop/pyros/config/config.yml", 'r') as stream:
  10 + try:
  11 + a = yaml.safe_load(stream)
  12 + print(a)
  13 + except yaml.YAMLError as exc:
  14 + print(exc)
  15 +
  16 +# Write YAML file
  17 +with open('C:/srv/develop/pyros/config/config2.yml', 'w', encoding='utf8') as outfile:
  18 + yaml.dump(a, outfile, default_flow_style=False, allow_unicode=True)
  19 +
... ...