Comments (4)
I believe this should be fixed when this https://github.com/red-hat-storage/ocs-ci/pull/70/files#diff-ef93c603b643a8362ba61f8d9797bac2R656 will be merged and then you can do something like:
def create_namespace(**kwargs):
pdb.set_trace()
project_name = (kwargs['project_name'])
try:
if NAMESPACE.get(project_name):
log.info(f'project {project_name} exists, using the existing namespace ')
return True
except exceptions.CommandError:
log.info(f'Creating new project {project_name}')
NAMESPACE.create(project_name)
from ocs-ci.
Perfect, Thanks @RazTamir . As a workaround, I'm doing this for now.
project_name = (kwargs['project_name'])
sc_get = NAMESPACE.get()
namespaces = []
for i in range(len(sc_get['items'])): namespaces.append(sc_get['items'][i]['metadata']['name'])
log.info(f'checking id project {project_name} already exists')
if project_name in namespaces:
log.info(f'project {project_name} exists, using the existing namespace ')
return True
else:
log.info(f'creating a new project {project_name}')
return run_cmd(f'oc new-project {project_name}')
from ocs-ci.
Is there any work required on this issue or can we close it?
from ocs-ci.
closing this pretty old PR. This feature was made available already.
from ocs-ci.
Related Issues (20)
- OCP upgrade to 4.13 failing with timout
- Dismiss unused logic per version at `send_rpc_query` once `release-4.13` is locked
- External cluster deployment is failing with not rbdpool exists
- Disconnected deployment of 4.12 for upgrade purpose from stable branch is causing a problem with musta gather image
- Extend the timeout timer in nsfs_bucket_factory to prevent NoSuchKey Error
- MDR deployment fails with packagemanifests.packages.operators.coreos.com "advanced-cluster-management" not found HOT 4
- [IBM Z] must_gather test from tier1 fails due to missing file noobaa-db-pg-0-init.log HOT 1
- test_rgw_unavailable is falling on IBM Z
- test_daemon_kill_during_pvc_pod_creation_deletion_and_io is falling on IBM Z HOT 3
- Teardown problem in multi clones test HOT 2
- MDR deployment fails with latency error HOT 3
- Configuring submariner for mdr deployments is not required. HOT 2
- RDR Multicluster job starts test execution without deploying all ODF and DR components HOT 2
- Fix metrics according to BZ for `test_ceph_metrics_available` HOT 1
- OCP 4.14 deployment failed on AWS
- remove noobaa-db-pg-0-init.log validation for 4.13
- Tests in tests.e2e.kcs.test_maintenance_pod.TestMaintenancePod fails due to "Error is flags cannot be placed before plugin name: --kubeconfig" error HOT 3
- Missed to remove rgw_endpoint fixture from the test_obc_quota test HOT 2
- Test cases failed due to subprocess.TimeoutExpired: Command '['oc', 'debug', 'nodes/ip-10-0-230-212.us-east-2.compute.internal', '--to-namespace=openshift-storage', '--', 'df']' timed out after 600 seconds HOT 6
- pv_services/test_cephfs_with_mds_network_failure.py tests failing due to Ceph cluster health is not OK. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocs-ci.