Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate caslib exists in /createpublishdest.py cas before creating publishing destination #49

Open
dwstern opened this issue Apr 2, 2020 · 0 comments

Comments

@dwstern
Copy link
Contributor

dwstern commented Apr 2, 2020

Attempting to create CAS pub dest in nonexistant caslib with createpublishdest.py half-works but should fail.

You can run createpublishdest.py using a command such as the following, where the argument -c nonexistantcaslib passes in the name of a CAS library which does not exist:

./createpublishdest.py cas -n newcasdest -s cas-shared-default -c nonexistantcaslib -t thetable

The command succeeds, reporting that it has created a publishing destination. However, the publishing destination does not appear in the SAS Environment Manager Publishing Destinations page. Attempting to re-run the same command results in an HTTP 409 response something like this:

{"errorCode":21904,"message":"The destination name \"newcasdest\" is already in use. You must specify a unique name.","details":["traceId: 66a865672d30378b","path: /modelPublish/destinations/"],"links":[],"version":2,"httpStatusCode":409}

Modify createpublishdest.py so that for a CAS publishing destination, it validates that the CAS library exists before proceeding to attempt to create the publishing destination which uses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant