summaryrefslogtreecommitdiffstats
path: root/tests/unit/apiserver
AgeCommit message (Collapse)AuthorFilesLines
2017-08-08NSB updateDeepak S2-1/+11
Refactored main NSB VNF classes accroding to class diagram https://wiki.opnfv.org/display/yardstick/NSB+class+diagram All the SampleVNFs have been separated and placed under the SampleVNF class. Added AutoConnectSSH to automatically create SSH conneciton on demand. Added VnfdHelper class to wrap the VNFD dictionary in prepartion for class-based modeling. Extracted DpdkVnfSetupEnvHelper for DPDK based VNF setup. Extracted Stats and other client config to ResourceHelper Had to replace dict_key_flatten with deepgetitem due to Python 2.7 Jinja2 infinite recursion. Change-Id: Ia8840e9c44cdbdf39aab6b02e6d2176b31937dc9 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-08-01test_env_action: speedup unittest, don't sleepRoss Brattain1-2/+2
Change-Id: Ib662032e5133b8fead1c6858905bd13ca40f4dd6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-11Yardstick API architecture improvementchenjiankun1-41/+0
JIRA: YARDSTICK-710 Since we have the plan to upload api v2 and gui. We need to add put and delete method. So the architecture need to be improved. Change-Id: Ie20a79c26ef6c581897ce4e63980fa2895b162d2 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-06-30Change prepareYardstickEnv to prepare_env and add log infochenjiankun2-26/+1
JIRA: YARDSTICK-697 Currently the action in env like prepareYardstickEnv, createGrafanaContainer, createInfluxDBContainer, this is not python style. So I do some change: prepareYardstickEnv->prepare_env createGrafanaContainer->create_grafana createInfluxDBContainer->create_influxdb And also add some log info in env_action. Change-Id: Ia91576b975f3de76b96e312779fda4911e7cac24 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-02-17Update missing license headersDeepak S1-0/+8
Change-Id: I063fd37fe25754c94d164ae5a209d15b69322093 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-02-08test_env_action: use dict literalRoss Brattain1-1/+1
use literal forms when possible Change-Id: I2d815f40007aa2259f3f3bcb2b9cd84a11027422 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-17Add unittest framework for Yardstick APIchenjiankun5-0/+195
JIRA: YARDSTICK-538 Currently it is hard to test API, So I add a base class as flask document do. In this framework I will mock a temp sqlite database and a server. Change-Id: If881233cb22655617c07ad018201b8ee08492d06 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
id='n265' href='#n265'>265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716
{
  "id": 39,
  "title": "Yardstick-TC047",
  "originalTitle": "Yardstick-TC047",
  "tags": [
    "yardstick-tc"
  ],
  "style": "dark",
  "timezone": "browser",
  "editable": true,
  "hideControls": false,
  "sharedCrosshair": false,
  "rows": [
    {
      "collapse": false,
      "editable": true,
      "height": "",
      "panels": [
        {
          "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><center>Control Node Openstack Service High Availability - Glance Api</center> </a></h5>\n<center>\n<p>This test case will verify the high availability of the image service provided by OpenStack (glance-api) on control node. For more information see <a style=\"color:#31A7D3\"; href=\"http://artifacts.opnfv.org/yardstick/colorado/docs/userguide/opnfv_yardstick_tc047.html\">TC047</a></p>\n</center>\n\n\n",
          "editable": true,
          "error": false,
          "id": 6,
          "isNew": true,
          "links": [],
          "mode": "html",
          "span": 12,
          "style": {},
          "title": "",
          "type": "text"
        }
      ],
      "title": "New row"
    },
    {
      "collapse": false,
      "editable": true,
      "height": "",
      "panels": [
        {
          "content": "",
          "editable": true,
          "error": false,
          "id": 9,
          "isNew": true,
          "links": [],
          "mode": "markdown",
          "span": 12,
          "style": {},
          "title": "Test Case Execution",
          "type": "text"
        }
      ],
      "title": "New row"
    },
    {
      "collapse": false,
      "editable": true,
      "height": "300px",
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "datasource": "yardstick-vtc",
          "decimals": 2,
          "editable": true,
          "error": false,
          "fill": 1,
          "grid": {
            "leftLogBase": 1,
            "leftMax": null,
            "leftMin": null,
            "rightLogBase": 1,
            "rightMax": null,
            "rightMin": null,
            "threshold1": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2": null,
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "hideTimeOverride": false,
          "id": 1,
          "interval": "",
          "isNew": true,
          "leftYAxisLabel": "sla_pass",
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "hideEmpty": false,
            "hideZero": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "sort": "avg",
            "sortDesc": false,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "links": [],
          "nullPointMode": "connected",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "rightYAxisLabel": "",
          "seriesOverrides": [],
          "span": 12,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "$tag_pod_name - $tag_deploy_scenario",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "pod_name"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "task_id"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "deploy_scenario"
                  ],
                  "type": "tag"
                }
              ],
              "hide": false,
              "measurement": "opnfv_yardstick_tc047",
              "query": "SELECT \"sla_pass\" FROM \"opnfv_yardstick_tc047\" WHERE \"pod_name\" =~ /$POD$/ AND \"deploy_scenario\" =~ /$SCENARIO$/ AND $timeFilter GROUP BY \"pod_name\", \"task_id\", \"deploy_scenario\"",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "sla_pass"
                    ],
                    "type": "field"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "pod_name",
                  "operator": "=~",
                  "value": "/$POD$/"
                },
                {
                  "condition": "AND",
                  "key": "deploy_scenario",
                  "operator": "=~",
                  "value": "/$SCENARIO$/"
                }
              ]
            }
          ],
          "timeFrom": "7d",
          "timeShift": null,
          "title": "SLA PASS",
          "tooltip": {
            "shared": true,
            "value_type": "cumulative"
          },
          "type": "graph",
          "x-axis": true,
          "y-axis": true,
          "y_formats": [
            "none",
            "short"
          ]
        }
      ],
      "showTitle": false,
      "title": "Row"
    },
    {
      "collapse": false,
      "editable": true,
      "height": "",
      "panels": [
        {
          "content": "",
          "editable": true,
          "error": false,
          "id": 10,
          "isNew": true,
          "links": [],
          "mode": "markdown",
          "span": 12,
          "style": {},
          "title": "Daily Averages",
          "type": "text"
        }
      ],
      "title": "New row"
    },
    {
      "collapse": false,
      "editable": true,
      "height": "",
      "panels": [
        {
          "columns": [],
          "datasource": "yardstick-vtc",
          "editable": true,
          "error": false,
          "fontSize": "90%",
          "height": "",
          "id": 2,
          "isNew": true,
          "links": [],
          "minSpan": 2,
          "pageSize": 100,
          "repeat": "POD",
          "scopedVars": {
            "POD": {
              "selected": true,
              "text": "lf-pod2",
              "value": "lf\\-pod2"
            }
          },
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 2,
            "desc": false
          },
          "span": 12,
          "styles": [
            {
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "deploy_scenario",
              "thresholds": [],
              "type": "string",
              "unit": "short"
            },
            {
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "ms"
            }
          ],
          "targets": [
            {
              "alias": "",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "deploy_scenario"
                  ],
                  "type": "tag"
                }
              ],
              "measurement": "opnfv_yardstick_tc047",
              "query": "SELECT mean(\"rtt.ares\") FROM \"opnfv_yardstick_tc047\" WHERE \"pod_name\" =~ /$POD$/ AND \"deploy_scenario\" =~ /$SCENARIO$/ AND $timeFilter GROUP BY \"deploy_scenario\"",
              "rawQuery": false,
              "refId": "A",
              "resultFormat": "table",
              "select": [
                [
                  {
                    "params": [
                      "rtt.ares"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "pod_name",
                  "operator": "=~",
                  "value": "/$POD$/"
                },
                {
                  "condition": "AND",
                  "key": "deploy_scenario",
                  "operator": "=~",
                  "value": "/$SCENARIO$/"
                }
              ]
            }
          ],
          "timeFrom": "7d",
          "title": "$POD",
          "transform": "table",
          "transparent": false,
          "type": "table"
        }
      ],
      "showTitle": false,
      "title": "New row"
    },
    {
      "collapse": false,
      "editable": true,
      "height": "250px",
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "datasource": "yardstick-vtc",
          "editable": true,
          "error": false,
          "fill": 1,
          "grid": {
            "leftLogBase": 1,
            "leftMax": null,
            "leftMin": 0,
            "rightLogBase": 1,
            "rightMax": null,
            "rightMin": null,
            "threshold1": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2": null,
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "height": "",
          "id": 3,
          "interval": "",
          "isNew": true,
          "leftYAxisLabel": "<sla_pass>",
          "legend": {
            "alignAsTable": false,
            "avg": false,
            "current": false,
            "hideEmpty": false,
            "hideZero": false,
            "max": false,
            "min": false,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "minSpan": 2,
          "nullPointMode": "connected",
          "percentage": false,
          "pointradius": 1,
          "points": true,
          "renderer": "flot",
          "repeat": "POD",
          "scopedVars": {
            "POD": {
              "selected": true,
              "text": "lf-pod2",
              "value": "lf\\-pod2"
            }
          },
          "seriesOverrides": [
            {
              "alias": "os-odl_l2-nofeature-ha",
              "color": "#7EB26D"
            },
            {
              "alias": "os-nosdn-nofeature-ha",
              "color": "#E24D42"
            },
            {
              "alias": "os-onos-nofeature-ha",
              "color": "#6ED0E0"
            },
            {
              "alias": "os-nosdn-ovs-ha",
              "color": "#EAB839"
            },
            {
              "alias": "os-odl_l3-nofeature-ha",
              "color": "#E5A8E2"
            },
            {
              "alias": "os-odl_l2-bgpvpn-ha",
              "color": "#E0752D"
            },
            {
              "alias": "os-odl_l2-sfc-ha",
              "color": "#508642"
            }
          ],
          "span": 12,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "$tag_deploy_scenario",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "24h"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "deploy_scenario"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "pod_name"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "opnfv_yardstick_tc047",
              "query": "SELECT mean(\"sla_pass\") FROM \"opnfv_yardstick_tc047\" WHERE \"pod_name\" =~ /$POD$/ AND \"deploy_scenario\" =~ /$SCENARIO$/ AND $timeFilter GROUP BY time(24h), \"deploy_scenario\", \"pod_name\" fill(null)",
              "rawQuery": false,
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "sla_pass"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "pod_name",
                  "operator": "=~",
                  "value": "/$POD$/"
                },
                {
                  "condition": "AND",
                  "key": "deploy_scenario",
                  "operator": "=~",
                  "value": "/$SCENARIO$/"
                }
              ]
            }
          ],
          "timeFrom": "7d",
          "timeShift": null,
          "title": "$POD",
          "tooltip": {
            "shared": true,
            "value_type": "individual"
          },
          "type": "graph",
          "x-axis": true,
          "y-axis": true,
          "y_formats": [
            "none",
            "short"
          ]
        }
      ],
      "showTitle": false,
      "title": ""
    }
  ],
  "time": {
    "from": "now-7d",
    "to": "now"
  },
  "timepicker": {
    "now": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "templating": {
    "list": [
      {
        "allFormat": "regex values",
        "current": {
          "tags": [],
          "text": "lf-pod2",
          "value": "lf\\-pod2"
        },
        "datasource": "yardstick-vtc",
        "hideLabel": false,
        "includeAll": true,
        "label": "",
        "multi": true,
        "multiFormat": "regex values",
        "name": "POD",
        "options": [
          {
            "selected": false,
            "text": "All",
            "value": "(elxg482ls42|ericsson\\-pod1|ericsson\\-pod2|huawei\\-pod1|huawei\\-pod2|huawei\\-us\\-deploy\\-bare\\-1|intel\\-pod5|intel\\-pod6|lf\\-pod1|lf\\-pod2|opnfv\\-jump\\-1|opnfv\\-jump\\-2|orange\\-fr\\-pod2|unknown|zte\\-pod1)"
          },
          {
            "selected": false,
            "text": "elxg482ls42",
            "value": "elxg482ls42"
          },
          {
            "selected": false,
            "text": "ericsson-pod1",
            "value": "ericsson\\-pod1"
          },
          {
            "selected": false,
            "text": "ericsson-pod2",
            "value": "ericsson\\-pod2"
          },
          {
            "selected": false,
            "text": "huawei-pod1",
            "value": "huawei\\-pod1"
          },
          {
            "selected": false,
            "text": "huawei-pod2",
            "value": "huawei\\-pod2"
          },
          {
            "selected": false,
            "text": "huawei-us-deploy-bare-1",
            "value": "huawei\\-us\\-deploy\\-bare\\-1"
          },
          {
            "selected": false,
            "text": "intel-pod5",
            "value": "intel\\-pod5"
          },
          {
            "selected": false,
            "text": "intel-pod6",
            "value": "intel\\-pod6"
          },
          {
            "selected": false,
            "text": "lf-pod1",
            "value": "lf\\-pod1"
          },
          {
            "selected": true,
            "text": "lf-pod2",
            "value": "lf\\-pod2"
          },
          {
            "selected": false,
            "text": "opnfv-jump-1",
            "value": "opnfv\\-jump\\-1"
          },
          {
            "selected": false,
            "text": "opnfv-jump-2",
            "value": "opnfv\\-jump\\-2"
          },
          {
            "selected": false,
            "text": "orange-fr-pod2",
            "value": "orange\\-fr\\-pod2"
          },
          {
            "selected": false,
            "text": "unknown",
            "value": "unknown"
          },
          {
            "selected": false,
            "text": "zte-pod1",
            "value": "zte\\-pod1"
          }
        ],
        "query": "SHOW TAG VALUES WITH KEY = \"pod_name\"",
        "refresh": false,
        "regex": "",
        "type": "query",
        "useTags": false
      },
      {
        "allFormat": "regex values",
        "current": {
          "tags": [],
          "text": "All",
          "value": "(os\\-nosdn\\-nofeature\\-ha|os\\-nosdn\\-ovs\\-ha|os\\-odl_l2\\-bgpvpn\\-ha|os\\-odl_l2\\-nofeature\\-ha|os\\-odl_l2\\-nofeature\\-noha|os\\-odl_l2\\-sfc\\-ha|os\\-odl_l3\\-nofeature\\-ha|os\\-onos\\-nofeature\\-ha)"
        },
        "datasource": "yardstick-vtc",
        "hideLabel": false,
        "includeAll": true,
        "label": "",
        "multi": true,
        "multiFormat": "regex values",
        "name": "SCENARIO",
        "options": [
          {
            "selected": true,
            "text": "All",
            "value": "(os\\-nosdn\\-nofeature\\-ha|os\\-nosdn\\-ovs\\-ha|os\\-odl_l2\\-bgpvpn\\-ha|os\\-odl_l2\\-nofeature\\-ha|os\\-odl_l2\\-nofeature\\-noha|os\\-odl_l2\\-sfc\\-ha|os\\-odl_l3\\-nofeature\\-ha|os\\-onos\\-nofeature\\-ha)"
          },
          {
            "selected": false,
            "text": "os-nosdn-nofeature-ha",
            "value": "os\\-nosdn\\-nofeature\\-ha"
          },
          {
            "selected": false,
            "text": "os-nosdn-ovs-ha",
            "value": "os\\-nosdn\\-ovs\\-ha"
          },
          {
            "selected": false,
            "text": "os-odl_l2-bgpvpn-ha",
            "value": "os\\-odl_l2\\-bgpvpn\\-ha"
          },
          {
            "selected": false,
            "text": "os-odl_l2-nofeature-ha",
            "value": "os\\-odl_l2\\-nofeature\\-ha"
          },
          {
            "selected": false,
            "text": "os-odl_l2-nofeature-noha",
            "value": "os\\-odl_l2\\-nofeature\\-noha"
          },
          {
            "selected": false,
            "text": "os-odl_l2-sfc-ha",
            "value": "os\\-odl_l2\\-sfc\\-ha"
          },
          {
            "selected": false,
            "text": "os-odl_l3-nofeature-ha",
            "value": "os\\-odl_l3\\-nofeature\\-ha"
          },
          {
            "selected": false,
            "text": "os-onos-nofeature-ha",
            "value": "os\\-onos\\-nofeature\\-ha"
          }
        ],
        "query": "SHOW TAG VALUES WITH KEY = \"deploy_scenario\"",
        "refresh": false,
        "regex": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "annotations": {
    "list": []
  },
  "refresh": "15m",
  "schemaVersion": 8,
  "version": 1,
  "links": []
}