github.com/vmware/govmomi@v0.37.1/simulator/esx/host_config_filesystemvolume.go (about)

     1  /*
     2  Copyright (c) 2017-2023 VMware, Inc. All Rights Reserved.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8  http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package esx
    18  
    19  import (
    20  	"github.com/vmware/govmomi/units"
    21  	"github.com/vmware/govmomi/vim25/types"
    22  )
    23  
    24  // HostConfigInfo is the default template for the HostSystem config property.
    25  // Capture method:
    26  // govc object.collect -s -dump HostSystem:ha-host config.fileSystemVolume
    27  //   - slightly modified for uuids and DiskName
    28  var HostFileSystemVolumeInfo = types.HostFileSystemVolumeInfo{
    29  	VolumeTypeList: []string{"VMFS", "NFS", "NFS41", "vsan", "VVOL", "VFFS", "OTHER", "PMEM"},
    30  	MountInfo: []types.HostFileSystemMountInfo{
    31  		{
    32  			MountInfo: types.HostMountInfo{
    33  				Path:               "/vmfs/volumes/deadbeef-01234567-89ab-cdef00000003",
    34  				AccessMode:         "readWrite",
    35  				Mounted:            types.NewBool(true),
    36  				Accessible:         types.NewBool(true),
    37  				InaccessibleReason: "",
    38  				MountFailedReason:  "",
    39  			},
    40  			Volume: &types.HostVmfsVolume{
    41  				HostFileSystemVolume: types.HostFileSystemVolume{
    42  					Type:     "VMFS",
    43  					Name:     "datastore1",
    44  					Capacity: 3.5 * units.TB,
    45  				},
    46  				BlockSizeMb:        1,
    47  				BlockSize:          units.KB,
    48  				UnmapGranularity:   units.KB,
    49  				UnmapPriority:      "low",
    50  				UnmapBandwidthSpec: (*types.VmfsUnmapBandwidthSpec)(nil),
    51  				MaxBlocks:          61 * units.MB,
    52  				MajorVersion:       6,
    53  				Version:            "6.82",
    54  				Uuid:               "deadbeef-01234567-89ab-cdef00000003",
    55  				Extent: []types.HostScsiDiskPartition{
    56  					{
    57  						DiskName:  "____simulated_volumes_____",
    58  						Partition: 8,
    59  					},
    60  				},
    61  				VmfsUpgradable:   false,
    62  				ForceMountedInfo: (*types.HostForceMountedInfo)(nil),
    63  				Ssd:              types.NewBool(true),
    64  				Local:            types.NewBool(true),
    65  				ScsiDiskType:     "",
    66  			},
    67  			VStorageSupport: "vStorageUnsupported",
    68  		},
    69  		{
    70  			MountInfo: types.HostMountInfo{
    71  				Path:               "/vmfs/volumes/deadbeef-01234567-89ab-cdef00000002",
    72  				AccessMode:         "readWrite",
    73  				Mounted:            types.NewBool(true),
    74  				Accessible:         types.NewBool(true),
    75  				InaccessibleReason: "",
    76  				MountFailedReason:  "",
    77  			},
    78  			Volume: &types.HostVmfsVolume{
    79  				HostFileSystemVolume: types.HostFileSystemVolume{
    80  					Type:     "OTHER",
    81  					Name:     "OSDATA-deadbeef-01234567-89ab-cdef00000002",
    82  					Capacity: 128 * units.GB,
    83  				},
    84  				BlockSizeMb:        1,
    85  				BlockSize:          units.KB,
    86  				UnmapGranularity:   0,
    87  				UnmapPriority:      "",
    88  				UnmapBandwidthSpec: (*types.VmfsUnmapBandwidthSpec)(nil),
    89  				MaxBlocks:          256 * units.KB,
    90  				MajorVersion:       1,
    91  				Version:            "1.00",
    92  				Uuid:               "deadbeef-01234567-89ab-cdef00000002",
    93  				Extent: []types.HostScsiDiskPartition{
    94  					{
    95  						DiskName:  "____simulated_volumes_____",
    96  						Partition: 7,
    97  					},
    98  				},
    99  				VmfsUpgradable:   false,
   100  				ForceMountedInfo: (*types.HostForceMountedInfo)(nil),
   101  				Ssd:              types.NewBool(true),
   102  				Local:            types.NewBool(true),
   103  				ScsiDiskType:     "",
   104  			},
   105  			VStorageSupport: "vStorageUnsupported",
   106  		},
   107  		{
   108  			MountInfo: types.HostMountInfo{
   109  				Path:               "/vmfs/volumes/deadbeef-01234567-89ab-cdef00000001",
   110  				AccessMode:         "readOnly",
   111  				Mounted:            types.NewBool(true),
   112  				Accessible:         types.NewBool(true),
   113  				InaccessibleReason: "",
   114  				MountFailedReason:  "",
   115  			},
   116  			Volume: &types.HostVfatVolume{
   117  				HostFileSystemVolume: types.HostFileSystemVolume{
   118  					Type:     "OTHER",
   119  					Name:     "BOOTBANK1",
   120  					Capacity: 4 * units.GB,
   121  				},
   122  			},
   123  			VStorageSupport: "",
   124  		},
   125  		{
   126  			MountInfo: types.HostMountInfo{
   127  				Path:               "/vmfs/volumes/deadbeef-01234567-89ab-cdef00000000",
   128  				AccessMode:         "readOnly",
   129  				Mounted:            types.NewBool(true),
   130  				Accessible:         types.NewBool(true),
   131  				InaccessibleReason: "",
   132  				MountFailedReason:  "",
   133  			},
   134  			Volume: &types.HostVfatVolume{
   135  				HostFileSystemVolume: types.HostFileSystemVolume{
   136  					Type:     "OTHER",
   137  					Name:     "BOOTBANK2",
   138  					Capacity: 4 * units.GB,
   139  				},
   140  			},
   141  			VStorageSupport: "",
   142  		},
   143  	},
   144  }