Skip to content

Sending POST to create new Volume with invalid Payload should return error, not create new Volume #665

@ehaligow

Description

@ehaligow

Sending POST on Volumes to create new Volume with invalid payload should not create new Volume with invalid property (in the bottom).

intel@ubuntu:~$ curl -X POST -k -u 'admin:Od!m12$4' https://odim.local.com:45000/redfish/v1/Systems/eafce4d9-54e5-420a-bec4-0cf973d35dd9:1/Storage/BMCStorage/Volumes  -d '{ "Name": "Test", "some":"some"}' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4402    0  4370  100    32   8307     60 --:--:-- --:--:-- --:--:--  8368
{
  "@odata.context": "/redfish/v1/$metadata#Volume.Volume",
  "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5",
  "@odata.type": "#Volume.v1_5_0.Volume",
  "AccessCapabilities": [],
  "Actions": {
    "#Volume.AssignReplicaTarget": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.AssignReplicaTarget"
    },
    "#Volume.ChangeRAIDLayout": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.ChangeRAIDLayout"
    },
    "#Volume.CheckConsistency": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.CheckConsistency"
    },
    "#Volume.CreateReplicaTarget": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.CreateReplicaTarget"
    },
    "#Volume.ForceEnable": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.ForceEnable"
    },
    "#Volume.Initialize": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.Initialize"
    },
    "#Volume.RemoveReplicaRelationship": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.RemoveReplicaRelationship"
    },
    "#Volume.ResumeReplication": {
      "TargetVolume@Redfish.AllowableValues": [],
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.ResumeReplication"
    },
    "#Volume.ReverseReplicationRelationship": {
      "TargetVolume@Redfish.AllowableValues": [],
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.ReverseReplicationRelationship"
    },
    "#Volume.SplitReplication": {
      "TargetVolume@Redfish.AllowableValues": [],
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.SplitReplication"
    },
    "#Volume.SuspendReplication": {
      "TargetVolume@Redfish.AllowableValues": [],
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/Actions/Volume.SuspendReplication"
    },
    "Oem": {}
  },
  "AllocatedPools": {
    "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/StoragePools"
  },
  "BlockSizeBytes": null,
  "Capacity": {
    "Data": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    },
    "IsThinProvisioned": false,
    "Metadata": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    },
    "Snapshot": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    }
  },
  "CapacityBytes": null,
  "CapacitySources": [],
  "Compressed": null,
  "Deduplicated": null,
  "Description": "Volume Description",
  "DisplayName": null,
  "Encrypted": null,
  "EncryptionTypes": [],
  "IOPerfModeEnabled": null,
  "IOStatistics": {
    "NonIORequestTime": null,
    "NonIORequests": null,
    "ReadHitIORequests": null,
    "ReadIOKiBytes": null,
    "ReadIORequestTime": null,
    "ReadIORequests": null,
    "WriteHitIORequests": null,
    "WriteIOKiBytes": null,
    "WriteIORequestTime": null,
    "WriteIORequests": null
  },
  "Id": "5",
  "Identifiers": [],
  "Links": {
    "ClassOfService": null,
    "ClientEndpoints": [],
    "ConsistencyGroups": [],
    "DedicatedSpareDrives": [],
    "Drives": [],
    "JournalingMedia": null,
    "Oem": {},
    "OwningStorageResource": null,
    "OwningStorageService": null,
    "ServerEndpoints": [],
    "SpareResourceSets": [],
    "StorageGroups": []
  },
  "LogicalUnitNumber": null,
  "LowSpaceWarningThresholdPercents": [],
  "Manufacturer": null,
  "MaxBlockSizeBytes": null,
  "MediaSpanCount": null,
  "Model": null,
  "NVMeNamespaceProperties": null,
  "Name": "Test",
  "Oem": {},
  "Operations": [],
  "OptimumIOSizeBytes": null,
  "ProvisioningPolicy": null,
  "RAIDType": null,
  "ReadCachePolicy": null,
  "RecoverableCapacitySourceCount": null,
  "RemainingCapacityPercent": null,
  "ReplicaInfo": {
    "ConsistencyEnabled": false,
    "ConsistencyState": null,
    "ConsistencyStatus": null,
    "ConsistencyType": null,
    "DataProtectionLineOfService": null,
    "FailedCopyStopsHostIO": false,
    "PercentSynced": null,
    "Replica": null,
    "ReplicaFaultDomain": null,
    "ReplicaPriority": null,
    "ReplicaProgressStatus": null,
    "ReplicaReadOnlyAccess": null,
    "ReplicaRecoveryMode": null,
    "ReplicaRole": null,
    "ReplicaSkewBytes": null,
    "ReplicaState": null,
    "ReplicaType": null,
    "ReplicaUpdateMode": null,
    "RequestedReplicaState": null,
    "SourceReplica": null,
    "SyncMaintained": false,
    "UndiscoveredElement": null,
    "WhenActivated": null,
    "WhenDeactivated": null,
    "WhenEstablished": null,
    "WhenSuspended": null,
    "WhenSynced": null,
    "WhenSynchronized": null
  },
  "ReplicaTargets": [],
  "Status": {
    "Health": null,
    "HealthRollup": null,
    "Oem": {},
    "State": null
  },
  "StorageGroups": {
    "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/5/StorageGroups"
  },
  "StripSizeBytes": null,
  "VolumeType": null,
  "VolumeUsage": null,
  "WriteCachePolicy": null,
  "WriteCacheState": null,
  "WriteHoleProtectionPolicy": "Off",
  "some": "some"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:normalnormal priority, can be taken up after high priority issues are addressedstatus:newThis tag is attached to a new issue during creation onlytype:bugThis tag is attached to 'bug' issue during creation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions