File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,19 @@ def test_01(self):
5151 self .api .import_file (category = 'certificate' ,
5252 file = cert ,
5353 extra_qs = {
54- 'certificate-name' : 'test00' ,
54+ 'certificate-name' : cert_name ,
5555 'format' : 'pem' ,
5656 })
5757 self .assertEqual (self .api .status , 'success' )
58+ # PAN-OS
5859 path = ("/config/shared/certificate/entry[@name='%s']" %
5960 cert_name )
6061 x = self .api .get (xpath = path )
62+ if self .api .status_code == '7' :
63+ # Panorama
64+ path = ("/config/panorama/certificate/entry[@name='%s']" %
65+ cert_name )
66+ x = self .api .get (xpath = path )
6167 self .assertEqual (self .api .status , 'success' )
6268 self .assertEqual (self .api .status_code , '19' )
6369 x = self .api .delete (xpath = path )
@@ -70,8 +76,6 @@ def test_01(self):
7076 self .assertIsNotNone (x )
7177 self .assertEqual (len (x ), 0 )
7278
73-
74- class PanXapiTest (xapi_mixin .Mixin , unittest .TestCase ):
7579 def test_02 (self ):
7680 self .api .show ()
7781 self .assertEqual (self .api .status , 'success' )
You can’t perform that action at this time.
0 commit comments