https://github.com/nextmcloud/nmcslup
MagentaCloud provisioning SOAP integration
https://github.com/nextmcloud/nmcslup
magentacloud
Last synced: about 1 month ago
JSON representation
MagentaCloud provisioning SOAP integration
- Host: GitHub
- URL: https://github.com/nextmcloud/nmcslup
- Owner: nextmcloud
- License: agpl-3.0
- Created: 2022-12-13T08:51:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2026-04-29T12:56:54.000Z (about 2 months ago)
- Last Synced: 2026-04-29T14:45:22.409Z (about 2 months ago)
- Topics: magentacloud
- Language: PHP
- Homepage:
- Size: 165 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# NextMagentaCloud provisioning functions
## App configuration
|App parameter | Purpose |
|-----------------------------|-------------------------------------------------------------------------------------------------------------|
|nmcslup slupid | slup application id to use for registration |
|nmcslup slupsecret | slup secret to use for registration |
|nmcslup slupgwendpoint | Webservice endpoint URL for SLUP gateway |
|nmcslup slupreceiverurl | SlupReceiverURL that is sent towards the Slup Gateway via the startSLUP2 request. |
|nmcslup slupcontrolintv | (optional override, int) interval to OPEN after boot other than 300 (sec) |
|nmcslup local_cert | local path to a client certificate for use with SLUP requester authentication. |
| | It must be a PEM encoded file which contains your certificate and private key. |
Remember that NextCloud app configuration values only support string, so 300sec is '300'.
The configuration could be done with the following commandline calls (only, no UI):
```
sudo -u www-data php /var/www/nextcloud/occ config:app:set nmcslup slupid --value
sudo -u www-data php /var/www/nextcloud/occ config:app:set nmcslup slupsecret --value
sudo -u www-data php /var/www/nextcloud/occ config:app:set nmcslup slupgwendpoint --value
sudo -u www-data php /var/www/nextcloud/occ config:app:set nmcslup slupreceiverurl --value
sudo -u www-data php /var/www/nextcloud/occ config:app:set nmcslup slupcontrolintv --value 123
sudo -u www-data php /var/www/nextcloud/occ config:app:set nmcslup local_cert --value
```
## Getting API status by API
There is a public endpoint to ask for the state of the SLUP circuit breaker
(open, halfopen or closed):
```
curl -X GET -H "Accept: application/json" https://mynext.cloud/apps/nmcslup/api/1.0/status
{"circuit_state":"closed","has_token":"true","num_msg_since_keepalive":42}
```
## Running app unit tests
Before first run, prepare your app for unittesting by:
```
cd custom_apps/myapp
# run once if needed
composer install --no-dev -o
```
Execute unittests with the mandatory standard run before push:
```
phpunit --stderr --bootstrap tests/bootstrap.php tests/unit/MyTest.php
```
For quicker development (only!), you could skip large/long running tests
```
phpunit --stderr --bootstrap tests/bootstrap.php --exclude-group=large tests/unit/MyTest.php
```
Or you could limit your call to some methods only:
```
phpunit --stderr --bootstrap tests/bootstrap.php --filter='testMethod1|testMethod2' tests/unit/MyTest.php
```
## Tip for logfile filtering:
```
tail -f /var/log/nextcloud/nextcloud.json.log |jq 'select(.app=="nmcprovisioning")'
```
Only user_oidc and nmcslup, without deprecation warnings:
```
tail -f /var/log/nextcloud/nextcloud.json.log |jq 'select(.app=="nmcslup") | select(.message|contains("deprecated")|not)'
```
## calling composer
For building only
```
composer install --no-dev -o
```
If you want to check in `vendor/` dir, make sure to call composer in this mode and check in only the files
generated in non-dev mode!
For dev:
```
composer install --dev -o
```
Don´t check in the additionally pulled dev content!