@@ -94,20 +94,24 @@ def __configure_entities(self):
9494 if (field_value .value is not None ):
9595 logging .info ("Configure field: name=%s; index=%d; type=%s; entity=%s" % (field_value .key .name , field_value .key .index , field_value .key .type , field_value .key .short_hand_key ))
9696
97- if field_value .key .short_hand_key not in config :
98- config [field_value .key .short_hand_key ] = []
97+ if not self .__simulation_mode :
98+ if field_value .key .short_hand_key not in config :
99+ config [field_value .key .short_hand_key ] = []
99100
100- if field_value .key .type == "integer" :
101- config [field_value .key .short_hand_key ].append ([field_value .key .name , field_value .key .index , int (field_value .value )])
102- else :
103- config [field_value .key .short_hand_key ].append ([field_value .key .name , field_value .key .index , str (field_value .value )])
101+ if field_value .key .type == "integer" :
102+ config [field_value .key .short_hand_key ].append ([field_value .key .name , field_value .key .index , int (field_value .value )])
103+ else :
104+ config [field_value .key .short_hand_key ].append ([field_value .key .name , field_value .key .index , str (field_value .value )])
104105 else :
105106 logging .error ("Unconfigured field: name=%s; index=%d; type=%s; entity=%s" % (field_value .key .name , field_value .key .index , field_value .key .type , field_value .key .short_hand_key ))
106107 succeeded = False
107108
108109 if succeeded :
109- fed_api .addEnvSettings (config )
110- logging .info ("Environmentalized fields updated." )
110+ if not self .__simulation_mode :
111+ fed_api .addEnvSettings (config )
112+ logging .info ("Environmentalized fields updated." )
113+ else :
114+ logging .info ("[SIMULATION_MODE] Environmentalized fields simulation succeeded." )
111115
112116 self .__config .update_config_file ()
113117
@@ -245,8 +249,11 @@ def __configure_certificates(self):
245249 if has_expired :
246250 raise ValueError ("At least one certificate expires in less than %i days; check log file!" % (self .__expiration_days ))
247251
248- DeploymentArchive .updateConfiguration (self .__fed_archive , es .es )
249- logging .info ("Certificates updated." )
252+ if not self .__simulation_mode :
253+ DeploymentArchive .updateConfiguration (self .__fed_archive , es .es )
254+ logging .info ("Certificates updated." )
255+ else :
256+ logging .info ("[SIMULATION_MODE] Certificates simulation succeeded." )
250257 return True
251258
252259 def get_unconfigured_fields (self ):
0 commit comments