Projet

Général

Profil

0007-use-wcs-name-for-destruction-details-about-wcs-to-be.patch

Benjamin Dauvergne, 24 mai 2018 10:42

Télécharger (2,08 ko)

Voir les différences:

Subject: [PATCH 7/8] use wcs name for destruction details about wcs (to be
 rebased)

 hobo/contrib/ozwillo/README.rst | 9 ++++++++-
 hobo/contrib/ozwillo/models.py  | 6 ++++--
 2 files changed, 12 insertions(+), 3 deletions(-)
hobo/contrib/ozwillo/README.rst
54 54
                    "passerelle-",
55 55
                    "passerelle-manage"
56 56
                ],
57
                "wcs-au-quotidien": [
57
                "wcs": [
58 58
                    "demarches-",
59 59
                    "wcsctl"
60 60
                ]
......
96 96
                "passerelle": ["passerelle-", "passerelle-manage"],
97 97
                "wcs-au-quotidien": ["demarches-", "wcsctl"]
98 98
        }
99

  
100
Destruction
101
===========
102

  
103
For the complete destruction of w.c.s. instances it's necessary that in the
104
default skeleton (`/var/lib/wcs/skeletons/export.zip`) the `config.pck` file
105
contains a key `postgresql.createdb-connection-params`.
hobo/contrib/ozwillo/models.py
233 233
            self.state = self.STATE_DESTROY_ERROR
234 234
            self.save()
235 235

  
236

  
236 237
    def destroy(self):
237 238
        logger.info(u'ozwillo: destroy start for %s', self)
238 239
        instance_slug = self.domain_slug
239
        services = settings.OZWILLO_SERVICES
240
        wcs = services['wcs-au-quotidien']
240
        services = settings.OZWILLO_SERVICES.copy()
241
        # w.c.s. is handled differently
242
        wcs = services.pop('wcs')
241 243

  
242 244
        for s, infos in services.items():
243 245
            # to get the two combo instances which have same service
244
-