Fedora Account System
Red Hat Associate
Red Hat Customer
These commands don't seem to work. In my experiments, I found that the string after double equal sign cannot be in double quotes. JsonPath recommends that strings in filter expressions be single quoted. What worked for me though, is replacing the double equal sign with a " CONTAINS " filter. Reported by: rtalur https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/4.2/html/deploying_openshift_container_storage/uninstalling-openshift-container-storage_rhocs#annotations:615af246-8366-44a8-bdfd-18be800760f6
yes, the command oc get pvc -o=jsonpath='{range .items[?(@.spec.storageClassName=='ocs-storagecluster-ceph-rbd')]}{"Name: "}{@.metadata.name}{" Namespace: "}{@.metadata.namespace}{"\n"}{end}' --all-namespaces|grep -v db-noobaa-core-0 doesnt work because what happeins is that this part is seen like one full quote '{range .items[?(@.spec.storageClassName==' this is the correct one: oc get pvc -o=jsonpath='{range .items[?(@.spec.storageClassName=="ocs-storagecluster-ceph-rbd")]}{"Name: "}{@.metadata.name}{" Namespace: "}{@.metadata.namespace}{"\n"}{end}' --all-namespaces|grep -v db-noobaa-core-0