Application Delivery Management
Application Modernization & Connectivity
IT Operations Management
CyberRes
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.novell.com/resource/service">
<soapenv:Header/>
<soapenv:Body>
<ser:modifyResourceRequest>
<!--Optional:-->
<ser:resource>
<ser:active>?</ser:active>
<ser:allowOverride>?</ser:allowOverride>
<ser:allowedMulty>?</ser:allowedMulty>
<ser:description>?</ser:description>
<ser:entitlementRef>
<!--Zero or more repetitions:-->
<ser:nrfentitlementref>
<ser:entitlementCorrelationId>?</ser:entitlementCorrelationId>
<ser:entitlementDn>?</ser:entitlementDn>
<ser:entitlementParameters>?</ser:entitlementParameters>
<ser:src>?</ser:src>
</ser:nrfentitlementref>
</ser:entitlementRef>
<ser:entityKey>?</ser:entityKey>
<ser:grantApprovers>
<!--Zero or more repetitions:-->
<ser:approver>
<ser:approverDN>?</ser:approverDN>
<ser:sequence>?</ser:sequence>
</ser:approver>
</ser:grantApprovers>
<ser:grantQuorum>?</ser:grantQuorum>
<ser:grantRequestDef>?</ser:grantRequestDef>
<ser:name>?</ser:name>
<ser:owners>
<!--Zero or more repetitions:-->
<ser:dnstring>
<ser:dn>?</ser:dn>
</ser:dnstring>
</ser:owners>
<ser:parameters>
<!--Zero or more repetitions:-->
<ser:resourceparameter>
<ser:codemapKey>?</ser:codemapKey>
<ser:entitlementDn>?</ser:entitlementDn>
<ser:hiddenFlag>?</ser:hiddenFlag>
<ser:key>?</ser:key>
<ser:paramLabel>?</ser:paramLabel>
<ser:staticFlag>?</ser:staticFlag>
<ser:type>?</ser:type>
<ser:value>?</ser:value>
<ser:valueLabel>?</ser:valueLabel>
</ser:resourceparameter>
</ser:parameters>
<ser:provisioningRequestDef>?</ser:provisioningRequestDef>
<ser:resourceCategoryKeys>
<!--Zero or more repetitions:-->
<ser:categorykey>
<ser:categoryKey>?</ser:categoryKey>
</ser:categorykey>
</ser:resourceCategoryKeys>
<ser:revokeApprovers>
<!--Zero or more repetitions:-->
<ser:approver>
<ser:approverDN>?</ser:approverDN>
<ser:sequence>?</ser:sequence>
</ser:approver>
</ser:revokeApprovers>
<ser:revokeQuorum>?</ser:revokeQuorum>
<ser:revokeRequestDef>?</ser:revokeRequestDef>
</ser:resource>
</ser:modifyResourceRequest>
</soapenv:Body>
</soapenv:Envelope>
### Function: modifyResource #### Cannot get it to change anything in SOAPUI. Need further testing.
# Usage:
# modifyResource username password rbpm_url output_file entityKey name active allowOverride allowMulty
# description grantApprovers grantRequestDef grantQuorum revokeApprovers revokeRequestDef
# revokeQuorum provisioningRequestDef owner category correlation_id
# You must enter a NULL value (see variable defined at top for literal string) for any empty fields
# only a subset of the SOAP call capabilities is exposed by this function
# if the $correlation_id is omitted, will call modifyRoleRequest, otherwise will call modifyRoleAidRequest
#
# Note from the forums:
# The correct endpoint to use for adding/removing a child role is the
# same one that you use to add/remove a user: requestRoleAssignment. If
# you were to create a Parent-Child relationship in the UI you would see
# that a Role Request is created in the UA for this.
#
modifyResource()
{
USAGE="Function Usage:
modifyResource username password rbpm_url output_file entityKey name active allowOverride allowMulty description
grantApprovers grantRequestDef grantQuorum revokeApprovers revokeRequestDef revokeQuorum
provisioningRequestDef owner category correlation_id
modification can be . Note that this does not cover everything the SOAP call can do, only what this function has been coded to handle
if the $correlation_id is omitted, will call modifyRoleRequest, otherwise will call modifyRoleAidRequest
rbpm_url should be in the format:
protocol://server:port/servicename
for example:
https://rbpm.lab.novell.com:8543/IDMProv";
if "X$_RBPM_SOAP_ROLE_DEBUG" = "Xtrue"
then
dbgparams=$#
dbgparam=1
while [ "$dbgparam" -le "$dbgparams" ]
do
echo -n "Parameter "
echo -n \$$dbgparam
echo -n " = "
eval echo \$$dbgparam
(( dbgparam ))
done
fi
# Initial Parameters check
if | -z "$2" || -z "$3" || -z "$4" || -z "$5" || -z "$6" || -z "$7" || -z "$8" || -z "$9" || -z "${10}" || -z "${11}" || -z "${12}" || -z "${13}" || -z "${14}" || -z "${15}" || -z "${16}" || -z "$17}" || -z "${18}" || -z "${19}"
then
echo "$USAGE"
return 1
fi
if -z "${20}"
then
NOCID=true
else
NOCID=false
CID="${20}"
fi
if "X$2" = "X-W"
then
read -sp "Please enter the password for user $1: " SENHA
echo
else
SENHA=$2
fi
# Setup for the SOAP call
URL="${3}/resource/service"
if "$NOCID" = "true"
then
ACTION="SOAPAction: 'http://www.novell.com/resource/service/modifyResource'"
SOAPCALL=modifyResourceRequest
else
ACTION="SOAPAction: 'http://www.novell.com/resource/service/modifyResourceAid'"
SOAPCALL=modifyResourceAidRequest
fi
CTYPE='Content-Type: text/xml;charset=UTF-8'
# Build SOAP XML envelope and call to be issued
POST="<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.novell.com/resource/service">
<soapenv:Header/>\
<soapenv:Body>\
<ser:${SOAPCALL}>\
<ser:resource>"
if "${6}" != "${NULL}"
then
POST="${POST}<ser:name>${6}</ser:name>"
else
POST="${POST}<ser:name/>"
fi
if "${7}" != "${NULL}"
then
POST="${POST}<ser:active>${7}</ser:active>"
else
POST="${POST}<ser:active/>"
fi
if "${8}" != "${NULL}"
then
POST="${POST}<ser:allowOverride>${8}</ser:allowOverride>"
else
POST="${POST}<ser:allowOverride/>"
fi
if "${9}" != "${NULL}"
then
POST="${POST}<ser:allowedMulty>${9}</ser:allowedMulty>"
else
POST="${POST}<ser:allowedMulty/>"
fi
if "${10}" != "${NULL}"
then
POST="${POST}<ser:description>${10}</ser:description>"
else
POST="${POST}<ser:description/>"
fi
POST="${POST}<ser:entitlementRef/>"
if "${11}" != "${NULL}"
then
POST="${POST}<ser:grantApprovers><ser:approver>
<ser:approverDN>${11}</ser:approverDN>
</ser:approver>
</ser:grantApprovers>"
else
POST="${POST}<ser:grantApprovers/>"
fi
if "${12}" != "${NULL}"
then
POST="${POST}<ser:grantRequestDef>${12}</ser:grantRequestDef>"
else
POST="${POST}<ser:grantRequestDef/>"
fi
if "${13}" != "${NULL}"
then
POST="${POST}<ser:grantQuorum>${13}</ser:grantQuorum>"
else
POST="${POST}<ser:grantQuorum/>"
fi
if "${14}" != "${NULL}"
then
POST="${POST}<ser:revokeApprovers><ser:approver>
<ser:approverDN>${14}</ser:approverDN>
</ser:approver>
</ser:revokeApprovers>"
else
POST="${POST}<ser:revokeApprovers/>"
fi
POST="${POST}<ser:parameters/>"
if "${15}" != "${NULL}"
then
POST="${POST}<ser:revokeRequestDef>${15}</ser:revokeRequestDef>"
else
POST="${POST}<ser:revokeRequestDef/>"
fi
if "${16}" != "${NULL}"
then
POST="${POST}<ser:revokeQuorum>${16}</ser:revokeQuorum>"
else
POST="${POST}<ser:revokeQuorum/>"
fi
if "${17}" != "${NULL}"
then
POST="${POST}<ser:provisioningRequestDef>${17}</ser:provisioningRequestDef>"
else
POST="${POST}<ser:provisioningRequestDef/>"
fi
if "${18}" != "${NULL}"
then
POST="${POST}<ser:owners><ser:dnstring>
<ser:dn>${18}</ser:dn>
</ser:dnstring></ser:owners>"
else
POST="${POST}<ser:owners/>"
fi
if "${19}" != "${NULL}"
then
POST="${POST}<ser:resourceCategoryKeys><ser:categorykey>
<ser:categoryKey>${19}</ser:categoryKey>
</ser:categorykey>
</ser:resourceCategoryKeys>"
else
POST="${POST}<ser:resourceCategoryKeys/>"
fi
POST="${POST}</ser:modifyResourceRequest>\
</soapenv:Body>\
</soapenv:Envelope>"
if "X$_RBPM_SOAP_ROLE_DEBUG" = "Xtrue"
then
echo
echo POST data:
echo $POST
echo
fi
# Issue the request
curl $_CURL_OPTIONS -u "$1:$SENHA" -H "$CTYPE" -H "$ACTION" -d "$POST" "$URL" -o "$4"
}