code: def list_attached_partitions(self, name=None, status=None):
          
  
          query_parms = []
          if name is not None:
              self.manager._append_query_parms(query_parms, 'name', name)
          if status is not None:
              self.manager._append_query_parms(query_parms, 'status', status)
          query_parms_str = '&'.join(query_parms)
          if query_parms_str:
              query_parms_str = '?{}'.format(query_parms_str)
  
          uri = '{}/operations/get-partitions{}'.format(
              self.uri, query_parms_str)
  
          sg_cpc = self.cpc
          part_mgr = sg_cpc.partitions
  
          result = self.manager.session.get(uri)
          props_list = result['partitions']
          part_list = []
          for props in props_list:
              part = part_mgr.resource_object(props['object-uri'], props)
              part_list.append(part)
          return part_list
docs: Return the partitions to which this storage group is currently
          attached, optionally filtered by partition name and status.
  
          Authorization requirements:
  
          * Object-access permission to this storage group.
          * Task permission to the "Configure Storage - System Programmer" task.
  
          Parameters:
  
            name (:term:`string`): Filter pattern (regular expression) to limit
              returned partitions to those that have a matching name. If `None`,
              no filtering for the partition name takes place.
  
            status (:term:`string`): Filter string to limit returned partitions
              to those  that have a matching status. The value must be a valid
              partition status property value. If `None`, no filtering for the
              partition status takes place.
  
          Returns:
  
            List of :class:`~zhmcclient.Partition` objects representing the
            partitions to whivch this storage group is currently attached,
            with a minimal set of properties ('object-id', 'name', 'status').
  
          Raises:
  
            :exc:`~zhmcclient.HTTPError`
            :exc:`~zhmcclient.ParseError`
            :exc:`~zhmcclient.AuthError`
            :exc:`~zhmcclient.ConnectionError`