Hey
I was looking for some help in understanding how the domain for
InstanceGoup is modelled in AAI. This came across while we were creating data
for migration.
* InstanceGroup can be linked to a model via a model-invariant-id
* InstanceGroup could even have a version, tied to model-version-id
Both the invariant and version id's are unique properties of Model and
Model-Ver entities.
However when the schema is generated, the unique properties are treated as below
if( obj.getUniqueProperties().contains(propName) ){
imsg = "Add Unique index for PropertyKey: [" + dbPropName + "]";
System.out.println(imsg);
LOGGER.info(imsg);
graphMgmt.buildIndex(dbPropName,Vertex.class).addKey(propK).unique().buildCompositeIndex();
}
Per my understanding the above code makes the invariantId and versionId unique
across the entire Graph.
While creating data on Amsterdam & Casablanca too, we are able to create an
InstanceGroup with a model-invariant-id which exists (for a model) in graph.
However while we try to use a model-version-id which exists as well, we get the
error below
ankibhat@ANKIBHAT02 MINGW64 ~/Desktop/Work/Bell/AAI DATA Execution/bell request
$ curl -X PUT
https://10.53.234.219:30233/aai/v11/network/instance-groups/instance-group/12222
-d @instanceGroupv11.json --header "Content-Type: Application/json" --header
"Authorization: Basic QUFJOkFBSQ==" --header "X-FromAppId: AAI" --header
"X-TransactionId: get_aai_subscr" --insecure
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1122 0 780 100 342 580 254 0:00:01 0:00:01 --:--:--
835<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Fault>
<requestError>
<serviceException>
<messageId>SVC3000</messageId>
<text>Invalid input performing %1 on %2 (msg=%3) (ec=%4)</text>
<variables>
<variable>PUT</variable>
<variable>network/instance-groups/instance-group/12222</variable>
<variable>Uniqueness constraint
violated:com.thinkaurelius.titan.core.SchemaViolationException: Adding this
property for key [model-version-id] and value
[22104c9f-29fd-462f-be07-96cd6b46dd33] violates a uniqueness constraint
[model-version-id]</variable>
<variable>ERR.5.4.6117</variable>
</variables>
</serviceException>
</requestError>
</Fault>
Now, I'm pretty certain that there is something trivial I'm missing, given the
fact that this is running in production, things should be working smoothly.
Would you be able to point any obvious issue you see in what I'm trying to
do/suspecting
Anand
“Amdocs’ email platform is based on a third-party, worldwide, cloud-based
system. Any emails sent to Amdocs will be processed and stored using such
system and are accessible by third party providers of such system on a limited
basis. Your sending of emails to Amdocs evidences your consent to the use of
such system and such processing, storing and access”.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13578): https://lists.onap.org/g/onap-discuss/message/13578
Mute This Topic: https://lists.onap.org/mt/28022294/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-