Interface MagnumService

  • All Superinterfaces:
    RestService
    All Known Implementing Classes:
    MagnumServiceImpl

    public interface MagnumService
    extends RestService
    OpenStack Container Infrastructure Management service (Magnum) APIs
    Author:
    Sohan Sangwan
    • Method Detail

      • listMservices

        List<? extends Mservice> listMservices()
        Lists all Magnum Services: container infrastructure service status details
        Returns:
        list of Magnum Services
      • listBaymodels

        List<? extends Baymodel> listBaymodels()
        Lists all Baymodels
        Returns:
        list of Baymodels
      • createBaymodel

        Baymodel createBaymodel​(Baymodel baymodel)
        Creates a new baymodel
      • showBaymodel

        Baymodel showBaymodel​(String id)
        Gets all information of a baymodel
        Returns:
        baymodel information
      • updateBaymodel

        Baymodel updateBaymodel​(String id,
                                String operations)
        Updates baymodel attributes
        Returns:
        updated baymodel
      • listBays

        List<? extends Bay> listBays()
        Lists all Bays/clusters
        Returns:
        list of Bays
      • createBay

        Bay createBay​(Bay bay)
        Creates a new bay
        Returns:
        newly created bay
      • showBay

        Bay showBay​(String id)
        Show a bay
        Returns:
        bay
      • listContainers

        List<? extends Container> listContainers()
        Lists all Containers
        Returns:
        list of Containers
      • createContainer

        Container createContainer​(Container container)
        Creates a new Container
        Returns:
        newly created Container
      • deleteContainer

        ActionResponse deleteContainer​(String uuid)
        Deletes a Container
        Returns:
        success/failure response
      • execCmdInContainer

        String execCmdInContainer​(String id,
                                  String cmd)
        Execute command in a Container
        Returns:
        output of the command
      • getContainerLogs

        String getContainerLogs​(String id)
        Get logs of a Container
        Returns:
        logs
      • pauseContainer

        Container pauseContainer​(String id)
        Pause a Container
        Returns:
        paused Container
      • unpauseContainer

        Container unpauseContainer​(String id)
        Unpause a Container
        Returns:
        paused Container
      • rebootContainer

        Container rebootContainer​(String id)
        Reboot a Container
        Returns:
        rebooted Container
      • startContainer

        Container startContainer​(String id)
        Start a Container
        Returns:
        Container
      • stopContainer

        Container stopContainer​(String id)
        Stop a Container
        Returns:
        Container
      • showContainer

        Container showContainer​(String id)
        Show a Container
        Returns:
        Container
      • getCertificate

        Certificate getCertificate​(String uuid)
        Gets certificate
        Parameters:
        uuid - of a bay or cluster
        Returns:
        certificate
      • signCertificate

        Certificate signCertificate​(Carequest ca)
        Generates certificate
        Parameters:
        ca - request
        Returns:
        certificate
      • rotateCertificate

        ActionResponse rotateCertificate​(String uuid)
        Rotate the CA certificate for a bay/cluster and invalidate all user certificates.
        Parameters:
        uuid - of a bay or cluster
        Returns:
        status
      • createCluster

        Cluster createCluster​(Cluster cluster)
        Create new cluster based on cluster template
      • listClusters

        List<? extends Cluster> listClusters()
        List all clusters
      • showCluster

        Cluster showCluster​(String id)
        Get all information of a cluster in Magnum
        Parameters:
        id - of the cluster
        Returns:
        cluster
      • deleteCluster

        ActionResponse deleteCluster​(String id)
        Delete a cluster.
        Parameters:
        id - of the cluster
        Returns:
        success status
      • updateCluster

        Cluster updateCluster​(String id,
                              String operations)
        Update information of one cluster attributes using operations including: ``add``, ``replace`` or ``remove``. The attributes to ``add`` and ``replace`` in the form of ``key=value`` while ``remove`` only needs the keys.
        Returns:
        updated cluster
      • createClustertemplate

        Clustertemplate createClustertemplate​(Clustertemplate template)
        Create new cluster template
        Returns:
        newly created cluster template
      • listClustertemplate

        List<? extends Clustertemplate> listClustertemplate()
        List all cluster templates
        Returns:
        list of cluster templates
      • deleteClustertemplate

        ActionResponse deleteClustertemplate​(String id)
        Delete a cluster template
        Parameters:
        id - of the clustertemplate
        Returns:
        status
      • updateClustertemplate

        Clustertemplate updateClustertemplate​(String id,
                                              String operations)
        Update information of one cluster template attributes using operations including: ``add``, ``replace`` or ``remove``. The attributes to ``add`` and ``replace`` in the form of ``key=value`` while ``remove`` only needs the keys.
        Parameters:
        cluster - template
        Returns:
        updated clustser template
      • listPods

        List<? extends Pod> listPods​(String bayUuid)
        List all pods
        Returns:
        list of pods
      • createPod

        Pod createPod​(Pod pod)
        Create a pod
        Returns:
        pod
      • showPod

        Pod showPod​(String bayUuid,
                    String id)
        Show a pod
        Returns:
        pod