Openshift:获取当前的窗格名称

时间:2018-07-04 06:21:41

标签: kubernetes openshift

我想知道我是否能够重新启动Pod或使用api进行部署。

我正在一个容器中运行一个容器,该容器正在监视目录。在目录上进行更改后,我需要重新启动Pod或进行部署。

这是我的shell脚本代码段:

while inotifywait -e modify $ENV_LOCATION; do
    curl -k \
      -X DELETE \
      -H "Authorization: Bearer $TOKEN" \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      $SERVER_URL/api/v1/namespaces/$NAMESPACE/pods/$NAME
done

那么,如何获取当前的广告连播名称?

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

看看here

您可以使用元数据:

        // load the shapefile in a datasoure
        Driver shpDriver = Ogr.GetDriverByName("ESRI Shapefile");
        DataSource shpDatasource = Ogr.Open(shapefilePath, 0);
        if (shpDatasource == null)
            return false;

        // load the shapefile layer
        Layer shpLayer = shpDatasource.GetLayerByIndex(0);

        // create the KML datasource layer
        Driver kmlDriver = Ogr.GetDriverByName("KML");
        DataSource KmlDatasource = Ogr.Open(KmlPath, 0);            
        KmlDatasource = kmlDriver.CreateDataSource(KmlPath, new string[] {});

        // copy the shapefile layer
        Layer newLayer = KmlDatasource.CopyLayer(shpLayer, shpLayer.GetName(), new string[] { });