func()

in api/om/om.go [109:129]


func (om *OmClient) CreateKey(volume string, bucket string, key string) (*ozone_proto.CreateKeyResponse, error) {
	req := ozone_proto.CreateKeyRequest{
		KeyArgs: &ozone_proto.KeyArgs{
			VolumeName: &volume,
			BucketName: &bucket,
			KeyName:    &key,
		},
	}

	createKeys := ozone_proto.Type_CreateKey
	wrapperRequest := ozone_proto.OMRequest{
		CmdType:          &createKeys,
		CreateKeyRequest: &req,
		ClientId:         &om.clientId,
	}
	resp, err := om.submitRequest(&wrapperRequest)
	if err != nil {
		return nil, err
	}
	return resp.CreateKeyResponse, nil
}