Ejemplo n.º 1
0
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

from src.performance_capacity_monitor import CreateFromDocument
from src.performance_capacity_monitor import ToXml
from src.utility import HTTPClient, HMCClientLogger
import pyxb
from src.generated_src import ManagedSystemPcmPreferences
log_object = HMCClientLogger.HMCClientLogger(__name__)


class ManagedSystemPcmPreference:
    def __init__(self, ip, managedsystem_id, x_api_session):
        '''
        Initializes the required arguments for ManagedSystemPcmPreferences

        Args:
         ip : IP address of the HMC
         Managedsystem_id : The managed system uuid for which the pcm preferences has to be obtained
         x_api_session: The session id for the current session

        '''

        self.service = "pcm"
Ejemplo n.º 2
0
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

from src.utility import HTTPClient, HMCClientLogger
log = HMCClientLogger.HMCClientLogger(__name__)

ROOT = "SharedStoragePool"
CONTENT_TYPE = "application/atom+xml,application/vnd.ibm.powervm.uom+xml;type=SharedStoragePool"


class DeleteLogicalUnit:
    """
    Deletes the Logical Unit from the shared storage pool.
    """
    def __init__(self):
        """
        assign the root and content_type for request
        """
        self.root = ROOT
        self.content_type = CONTENT_TYPE
Ejemplo n.º 3
0
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

from src.common import ListModule
from src.utility import HMCClientLogger
log = HMCClientLogger.HMCClientLogger(__file__)

ROOT = "LogicalPartition"
CONTENT_TYPE = "application/vnd.ibm.powervm.uom+xml;type=VirtualSCSIClientAdapter"


class ListVirtualSCSIClientAdapter:
    """
    List the details of the virtual SCSI adapter
    for a given logical partition
    """
    def __init__(self):
        """
        assign the root and content_type for request
        """
        self.root = ROOT