File: stratis3-start-pool.py

package info (click to toggle)
cockpit 337-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 36,232 kB
  • sloc: javascript: 47,090; python: 38,766; ansic: 35,470; xml: 6,048; sh: 3,413; makefile: 614
file content (11 lines) | stat: -rw-r--r-- 444 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
import sys

import dbus

reply = dbus.SystemBus().call_blocking('org.storage.stratis3', '/org/storage/stratis3',
                                       'org.storage.stratis3.Manager.r8', 'StartPool',
                                       'ss(b(bu))(bh)',
                                       [sys.argv[1], 'uuid', [True, [False, 0]], [sys.argv[2] == "passphrase", 0]])
if reply[1] != 0:
    sys.stderr.write(reply[2] + '\n')
    sys.exit(1)