Skip to content

Instantly share code, notes, and snippets.

@stefwalter
Created February 24, 2015 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefwalter/62c4a5aaedd120e9834b to your computer and use it in GitHub Desktop.
Save stefwalter/62c4a5aaedd120e9834b to your computer and use it in GitHub Desktop.
DBus API would need at least:
/* interface per machine and one per container */
interface com.redhat.SubscriptionManager.Machine {
properties:
/* enumerated value, string or int */
readonly ? RegistrationStatus;
/* possibly needed? */
readonly s SystemName;
/* list of object paths pointing to Subscription instances below */
readonly ao AttachedSubscriptions;
/* list of object paths pointing to Subscription instances */
readonly ao PossibleSubscriptions;
/* list of object paths pointing to Product instances */
readonly ao InstalledProducts;
/* display string for passing on to Red Hat during support call */
readonly s AccountName;
/* ... other properties? */
methods:
Register (in s server_url,
/* optional activationkey */
in v credentials, /* user password is tuple (ss) */
in s system_name,
in a{sv} options);
Unregister (in a{sv} options);
/* attach likely needs a Pool */
Attach (in o subscription);
/* "Remove" in cli subcommand terms
We can have multiple Entitlements for a Subscription.
Remove (in o entitlement);
*/
Detach (in o subscription);
signals:
/* the usual PropertiesChanged */
};
/* interface per subscription, attached or not, known about */
interface com.redhat.SubscriptionManager.Subscription {
properties:
/* Readable displayable name */
readonly s SubscriptionName;
/* seconds since epoch */
readonly t StartDate;
readonly t ExpiryDate;
/* How many of the instances of subscription remain, -1 = unknown */
readonly i InstancesRemaining;
/* Status detail "reasons" ("Only supports 1 of 2 sockets."), though
that's really an Entitlement attr */
/* ... other properties? */
signals:
/* the usual PropertiesChanged */
};
/* interface per product that subscription manager knows about */
interface com.redhat.SubscriptionManager.Product {
properties:
/* Readable display name */
readonly s ProductName;
readonly s Architecture;
/* ... other properties, version? ... */
signals:
/* the usual PropertiesChanged */
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment