Ignore warning while importing package through script mode | Community
Skip to main content
Level 2
November 14, 2019
Solved

Ignore warning while importing package through script mode

  • November 14, 2019
  • 2 replies
  • 2470 views

Hi,

we have a requirement to ignore warning for one of the package type to import it.

Can some one help what should be added or command for doing that.

package -instance:stage -import:/sftp/incoming/from_campaign/test/<%= instance.vars.packageName %> -verbose

when importing manually it fails if you do not select ignore warning because the package has some reference to internal value not present in next environment.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

In the <package/> node at the top of your xml add ignoreWarnings="true"; maybe something like `perl -pi -e 's/<package/<package ignoreWarnings="true"/' file` ahead of the import call.

Obligatory note of caution:

It looks like you're automating import of campaigns uploaded to an sftp. Just know that there is a ton of danger in this, ranging from innocuous user error to not-so-innocuous trivial root exploitation of the app. If you're sure of this approach, consider at least adding a check to constrain import to nms:operation schema.

Thanks,

-Jon

2 replies

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
November 18, 2019

Hi,

In the <package/> node at the top of your xml add ignoreWarnings="true"; maybe something like `perl -pi -e 's/<package/<package ignoreWarnings="true"/' file` ahead of the import call.

Obligatory note of caution:

It looks like you're automating import of campaigns uploaded to an sftp. Just know that there is a ton of danger in this, ranging from innocuous user error to not-so-innocuous trivial root exploitation of the app. If you're sure of this approach, consider at least adding a check to constrain import to nms:operation schema.

Thanks,

-Jon

April 21, 2020

Hi : I tried with ignoreWarning = "true" but it doesn't work. Do you know the correct format how it can be given in the below schema xml file which we import

 

<package author="test" buildDate="2019-07-09 08:36:27.500Z"
buildNumber="8850" buildVersion="6.7" img="xtk:installedPackage.png" label="Shared schema"
name="sharedSchemas" namespace="test" vendor="">