Giter Site home page Giter Site logo

Comments (3)

jfilak avatar jfilak commented on July 26, 2024

Oh, this is going to be tough. Do you mind sharing content of /sap/bc/adt/core/discovery (I have no 7.40 for testing)? Hmm, I shall add a command to sapcli.

Could you try changing:
https://github.com/jfilak/sapcli/blob/master/sap/adt/package.py#L39
'packages to vit/wb/object_type/devck/object_name?

from sapcli.

fabianlupa avatar fabianlupa commented on July 26, 2024

Oh, this is going to be tough. Do you mind sharing content of /sap/bc/adt/core/discovery (I have no 7.40 for testing)? Hmm, I shall add a command to sapcli.

Sure, I'll send it to you.

Could you try changing:
https://github.com/jfilak/sapcli/blob/master/sap/adt/package.py#L39
'packages to vit/wb/object_type/devck/object_name?

I was looking for that line but my non-existent python knowledge held me back...
I changed it and the request now looks the same except for the additional options-block. However, I still get the same result. Which is very surprising to me. Seems like my assumption was wrong that it was related to the object syntax, sorry.

I also deleted the options block

diff --git a/sap/adt/aunit.py b/sap/adt/aunit.py
index 460eeb5..1bc3cd3 100644
--- a/sap/adt/aunit.py
+++ b/sap/adt/aunit.py
@@ -38,12 +38,6 @@ class AUnit:
   <external>
     <coverage active="false"/>
   </external>
-  <options>
-    <uriType value="semantic"/>
-    <testDeterminationStrategy sameProgram="true" assignedTests="false" appendAssignedTestsPreview="true"/>
-    <testRiskLevels harmless="true" dangerous="true" critical="true"/>
-    <testDurations short="true" medium="true" long="true"/>
-  </options>
   <adtcore:objectSets xmlns:adtcore="http://www.sap.com/adt/core">
     <objectSet kind="inclusive">
       <adtcore:objectReferences>

That didn't change the result either. The requests now look identical to me, except for the upper / lower case of the package name.

./sapcli aunit run package '/ABC/PACKAGE'

<?xml version="1.0" encoding="UTF-8"?>
<aunit:runConfiguration xmlns:aunit="http://www.sap.com/adt/aunit">
  <external>
    <coverage active="false"/>
  </external>
  <adtcore:objectSets xmlns:adtcore="http://www.sap.com/adt/core">
    <objectSet kind="inclusive">
      <adtcore:objectReferences>
        <adtcore:objectReference adtcore:uri="/sap/bc/adt/vit/wb/object_type/devck/object_name/%2Fabc%2Fpackage"/>
      </adtcore:objectReferences>
    </objectSet>
  </adtcore:objectSets>
</aunit:runConfiguration>

ADT

<?xml version="1.0" encoding="UTF-8"?>
<aunit:runConfiguration xmlns:aunit="http://www.sap.com/adt/aunit">
  <external>
    <coverage active="false"/>
  </external>
  <adtcore:objectSets xmlns:adtcore="http://www.sap.com/adt/core">
    <objectSet kind="inclusive">
      <adtcore:objectReferences>
        <adtcore:objectReference adtcore:uri="/sap/bc/adt/vit/wb/object_type/devck/object_name/%2abc%2Fpackage"/>
      </adtcore:objectReferences>
    </objectSet>
  </adtcore:objectSets>
</aunit:runConfiguration>

....even later....

OK, this fixes it, apparently 740SP20 is case sensitive in regards to the package name. The other patch regarding the uri is also needed, deleting the options block is not required.

diff --git a/sap/adt/objects.py b/sap/adt/objects.py
index 1559494..922b6ff 100644
--- a/sap/adt/objects.py
+++ b/sap/adt/objects.py
@@ -413,7 +413,7 @@ class ADTObject(metaclass=OrderedClassMembers):
         """ADT object URL fragment"""

         # pylint: disable=no-member
-        return self.objtype.basepath + '/' + quote_plus(self.name.lower())
+        return self.objtype.basepath + '/' + quote_plus(self.name)

     @property
diff --git a/sap/adt/package.py b/sap/adt/package.py
index 7160d21..548348f 100644
--- a/sap/adt/package.py
+++ b/sap/adt/package.py
@@ -36,7 +36,7 @@ class Package(ADTObject):

     OBJTYPE = ADTObjectType(
         'DEVC/K',
-        'packages',
+        'vit/wb/object_type/devck/object_name',
         xmlns_adtcore_ancestor('pak', 'http://www.sap.com/adt/packages'),
         'application/vnd.sap.adt.packages.v1+xml',
         {},

from sapcli.

jfilak avatar jfilak commented on July 26, 2024

Well done! Thank you very much.

from sapcli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.