cloudfoundry-community / cloudfoundry-community/cf-python-client
not able/failing to stop app
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 55
- Forks
- 54
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
successfully instantiating client and retrieving an app with
app = client.v2.apps.get_first(**{'name': <app_name>})
successfully checking app object with
type(app)
app.summary()
but getting this exception when running
app.stop()
would you please help? is there anything I maybe missing?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/cloudfoundry_client/v2/apps.py", line 22, in stop
return self.client.v2.apps.stop(self['metadata']['guid'])
File "/Library/Python/2.7/site-packages/cloudfoundry_client/v2/apps.py", line 89, in stop
result = super(AppManager, self)._update(application_guid, dict(state='STOPPED'))
File "/Library/Python/2.7/site-packages/cloudfoundry_client/v2/entities.py", line 79, in _update
return self._put(url, data, **kwargs)
File "/Library/Python/2.7/site-packages/cloudfoundry_client/v2/entities.py", line 91, in _put
response = self.client.put(url, json=data, **kwargs)
File "/Library/Python/2.7/site-packages/cloudfoundry_client/client.py", line 175, in put
return CloudFoundryClient._check_response(response)
File "/Library/Python/2.7/site-packages/cloudfoundry_client/client.py", line 194, in _check_response
raise InvalidStatusCode(response.status_code, body)
cloudfoundry_client.errors.InvalidStatusCode: 400 : {"code": 1001, "error_code": "CF-MessageParseError", "description": "Request invalid due to parse error: Decoded JSON cannot be nil"}
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, app.stop() mit dem im Issue gezeigten Client-Setup zu reproduzieren, und verfolge anschließend die Anfrage durch cloudfoundry_client/v2/apps.py, v2/entities.py und client.py. Untersuche das vom PUT gesendete JSON und die resultierende Antwort; fertig ist die Aufgabe, wenn das Stoppen der abgerufenen App nicht mehr den 400 CF-MessageParseError erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100