Skip to content

Commit bf7fa0e

Browse files
author
Vonteddu Chaithra
committed
Added support for tape link and virtual tape resource
Signed-off-by: Vonteddu Chaithra <Vonteddu.Chaithra1@ibm.com>
1 parent 2174666 commit bf7fa0e

15 files changed

Lines changed: 3804 additions & 6 deletions

docs/appendix.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,14 +539,28 @@ Resources scoped to CPCs in DPM mode
539539

540540
Storage Volume Template
541541
A template for :term:`Storage Volumes <Storage Volume>`.
542-
543-
Tape library
542+
543+
Tape Library
544544
A Tape Library represents one physical tape storage unit connected to
545-
a CPC.Tape libraries are automatically discovered,but discovery requires
546-
preprocessing,A single Worldwide Port Name (WWPN) must be zoned so the CPC
545+
a CPC. Tape libraries are automatically discovered, but discovery requires
546+
preprocessing. A single Worldwide Port Name (WWPN) must be zoned so the CPC
547547
can see the tape library.
548548
For details, see section :ref:`Tape Libraries`.
549549

550+
Tape Link
551+
A Tape Link connects a :term:`Tape Library` to one or more :term:`Partitions <Partition>`,
552+
enabling the partitions to access tape drives in the tape library. A tape link
553+
defines the connectivity and resource allocation for tape access.
554+
For details, see section :ref:`Tape Links`.
555+
556+
Virtual Tape Resource
557+
A representation of a tape-related z/Architecture device in a :term:`Partition`.
558+
A Virtual Tape Resource object represents access to a tape drive through a
559+
:term:`Tape Link`. Each virtual tape resource is associated with a specific
560+
adapter port and provides the partition with a device number for accessing
561+
the tape drive.
562+
For details, see section :ref:`Virtual Tape Resources`.
563+
550564
vHBA
551565
Synonym for :term:`HBA`. In this resource model, HBAs are always
552566
virtualized because they belong to a :term:`Partition`. Therefore, the

docs/resources.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,46 @@ Tape Libraries
358358
:special-members: __str__
359359

360360

361+
.. _`Tape Links`:
362+
363+
Tape Links
364+
----------
365+
366+
.. automodule:: zhmcclient._tape_link
367+
368+
.. autoclass:: zhmcclient.TapeLinkManager
369+
:members:
370+
:autosummary:
371+
:autosummary-inherited-members:
372+
:special-members: __str__
373+
374+
.. autoclass:: zhmcclient.TapeLink
375+
:members:
376+
:autosummary:
377+
:autosummary-inherited-members:
378+
:special-members: __str__
379+
380+
381+
.. _`Virtual Tape Resources`:
382+
383+
Virtual Tape Resources
384+
----------------------
385+
386+
.. automodule:: zhmcclient._virtual_tape_resource
387+
388+
.. autoclass:: zhmcclient.VirtualTapeResourceManager
389+
:members:
390+
:autosummary:
391+
:autosummary-inherited-members:
392+
:special-members: __str__
393+
394+
.. autoclass:: zhmcclient.VirtualTapeResource
395+
:members:
396+
:autosummary:
397+
:autosummary-inherited-members:
398+
:special-members: __str__
399+
400+
361401
.. _`Virtual Storage Resources`:
362402

363403
Virtual Storage Resources

tests/end2end/mocked_hmc_z16.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,69 @@ hmc_definition:
364364
name : Tape Library
365365
description : Tape Library resource 1
366366
cpc-uri : /api/cpcs/cpc_dpm
367+
tape_links:
368+
- properties:
369+
# class: created automatically
370+
# parent: created automatically
371+
# element-uri: created automatically
372+
element-id: tlink1
373+
name: "Tape Link 1"
374+
description: "Tape link connecting Tape Library to PART1"
375+
partition-uri: /api/partitions/part1
376+
tape-library-uri: /api/tape-libraries/tl1
377+
virtual_tape_resources:
378+
- properties:
379+
# class: created automatically
380+
# parent: created automatically
381+
# element-uri: created automatically
382+
element-id: vtr1
383+
name: "Virtual Tape Resource 1"
384+
description: "Virtual tape resource 1"
385+
device-number: "0001"
386+
adapter-port-uri: /api/adapters/fcp1/storage-ports/0
387+
partition-uri: /api/partitions/part1
388+
world-wide-port-name-info:
389+
status: validated
390+
world-wide-port-name: "c05076ffe8000001"
391+
degraded-reasons: []
392+
- properties:
393+
# class: created automatically
394+
# parent: created automatically
395+
# element-uri: created automatically
396+
element-id: vtr2
397+
name: "Virtual Tape Resource 2"
398+
description: "Virtual tape resource 2"
399+
device-number: "0002"
400+
adapter-port-uri: /api/adapters/fcp1/storage-ports/1
401+
partition-uri: /api/partitions/part1
402+
world-wide-port-name-info:
403+
status: validated
404+
world-wide-port-name: "c05076ffe8000002"
405+
degraded-reasons: []
406+
- properties:
407+
# class: created automatically
408+
# parent: created automatically
409+
# element-uri: created automatically
410+
element-id: tlink2
411+
name: "Tape Link 2"
412+
description: "Tape link for testing"
413+
partition-uri: /api/partitions/part1
414+
tape-library-uri: /api/tape-libraries/tl1
415+
virtual_tape_resources:
416+
- properties:
417+
# class: created automatically
418+
# parent: created automatically
419+
# element-uri: created automatically
420+
element-id: vtr3
421+
name: "Virtual Tape Resource 3"
422+
description: "Virtual tape resource 3"
423+
device-number: "0003"
424+
adapter-port-uri: /api/adapters/fcp1/storage-ports/0
425+
partition-uri: /api/partitions/part1
426+
world-wide-port-name-info:
427+
status: not-validated
428+
world-wide-port-name: "c05076ffe8000003"
429+
degraded-reasons: []
367430

368431
hw_messages:
369432
- properties:

0 commit comments

Comments
 (0)